feat(tests): configure PLAYWRIGHT_BASE_URL for use in CI tests

This commit is contained in:
perf3ct 2025-06-19 21:56:19 +00:00
parent b19123e6f2
commit dfb39782c7
3 changed files with 5 additions and 2 deletions

View File

@ -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 }) => {

View File

@ -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 }) => {

View File

@ -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,