Skip to content

Commit

Permalink
Try hardcoded npm run dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes-mk committed Dec 16, 2024
1 parent f92c2b3 commit 0cf8903
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions frontend/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 */
Expand Down Expand Up @@ -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,
},
})

0 comments on commit 0cf8903

Please sign in to comment.