feat(tests): configure PLAYWRIGHT_BASE_URL for use in CI tests
This commit is contained in:
parent
c93b5dd537
commit
3a580ff4fe
|
|
@ -9,6 +9,7 @@ test.describe('Document Management', () => {
|
|||
helpers = new TestHelpers(authenticatedPage);
|
||||
await helpers.navigateToPage('/documents');
|
||||
// Ensure we have test documents for tests that need them
|
||||
await helpers.ensureTestDocumentsExist();
|
||||
});
|
||||
|
||||
test('should display document list', async ({ authenticatedPage: page }) => {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ test.describe('Search Functionality', () => {
|
|||
test.beforeEach(async ({ authenticatedPage }) => {
|
||||
helpers = new TestHelpers(authenticatedPage);
|
||||
await helpers.navigateToPage('/search');
|
||||
// Ensure we have test documents for search functionality
|
||||
await helpers.ensureTestDocumentsExist();
|
||||
});
|
||||
|
||||
test('should display search interface', async ({ authenticatedPage: page }) => {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default defineConfig({
|
|||
],
|
||||
outputDir: 'test-results/e2e-artifacts',
|
||||
use: {
|
||||
baseURL: 'http://localhost:5173',
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:5173',
|
||||
trace: 'on-first-retry',
|
||||
screenshot: 'only-on-failure',
|
||||
video: 'retain-on-failure',
|
||||
|
|
@ -36,7 +36,7 @@ export default defineConfig({
|
|||
use: { ...devices['Desktop Safari'] },
|
||||
},
|
||||
],
|
||||
webServer: {
|
||||
webServer: process.env.CI ? undefined : {
|
||||
command: 'npm run dev',
|
||||
url: 'http://localhost:5173',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
|
|
|
|||
Loading…
Reference in New Issue