diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ac206d611..02ff382fb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -57,6 +57,8 @@ jobs: - name: Run tests run: npm run test:e2e + env: + PLAYWRIGHT_TEST_BASE_URL: ${{ needs.test_setup.outputs.preview_url }} - uses: actions/upload-artifact@v2 if: always() diff --git a/playwright.config.ts b/playwright.config.ts index 885656169..90ed1b6f2 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -24,7 +24,7 @@ const config: PlaywrightTestConfig = { // contextOptions: { // ignoreHTTPSErrors: true, // }, - baseURL: 'http://localhost:4000', + baseURL: process.env.PLAYWRIGHT_TEST_BASE_URL || 'http://localhost:4000', }, projects: [ {