diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index c176af4..d206675 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ * Maximum time expect() should wait for the condition to be met. * For example in `await expect(locator).toHaveText();` */ - timeout: 5000, + timeout: 5 * 1000, }, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, @@ -31,16 +31,19 @@ export default defineConfig({ reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { + viewport: { width: 1280, height: 720 }, /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ - actionTimeout: 0, - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: process.env.CI ? 'http://localhost:4173' : 'http://localhost:5173', + actionTimeout: 5 * 1000, + /* Base URL to use in actions like `await page.goto('/')`. + needs to be in sync with "webserver" config below*/ + // baseURL: process.env.CI ? 'http://localhost:4173' : 'http://localhost:5173', + baseURL: 'http://localhost:5173', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', /* Only on CI systems run the tests headless */ - /*headless: !!process.env.CI,*/ + headless: !!process.env.CI, }, /* Configure projects for major browsers */ @@ -103,8 +106,10 @@ export default defineConfig({ * Use the preview server on CI for more realistic testing. * Playwright will re-use the local server if there is already a dev-server running. */ - command: process.env.CI ? 'npm run preview' : 'npm run dev', - port: process.env.CI ? 4173 : 5173, + // command: process.env.CI ? 'npm run preview' : 'npm run dev', + command: 'npm run dev', + // port: process.env.CI ? 4173 : 5173, + port: 5173, reuseExistingServer: !process.env.CI, }, })