Skip to content

Commit

Permalink
Set a fallback for the Playwright base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmyersdev committed Jul 29, 2024
1 parent babdeba commit 15a83fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: process.env.BASE_URL,
baseURL: process.env.BASE_URL || 'http://127.0.0.1:8888',

testIdAttribute: 'data-test-id',

Expand Down Expand Up @@ -74,7 +74,7 @@ export default defineConfig({
/* Run your local dev server before starting the tests */
webServer: {
command: 'pnpm dev:full',
url: 'http://127.0.0.1:8888',
url: process.env.BASE_URL || 'http://127.0.0.1:8888',
reuseExistingServer: !process.env.CI,
},
})

0 comments on commit 15a83fa

Please sign in to comment.