mirror of
https://github.com/readur/readur.git
synced 2026-02-09 00:19:37 -06:00
feat(tests): configure PLAYWRIGHT_BASE_URL for use in CI tests
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user