Bug
frontend/playwright.config.ts has:
baseURL: 'http://localhost:3000',
This makes it impossible to run E2E tests against a staging environment, CI testnet deployment, or any other URL without modifying the config file itself.
Fix
Read baseURL from an environment variable with a localhost fallback:
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:3000';
export default defineConfig({
use: { baseURL },
});
Add to frontend/.env.example:
# For running E2E tests against a remote environment
PLAYWRIGHT_BASE_URL=https://staging.astera.io
Update CI to pass the variable when running against testnet:
- name: Run E2E tests
run: npm run test:e2e
env:
PLAYWRIGHT_BASE_URL: ${{ steps.deploy.outputs.frontend_url }}
Acceptance Criteria
References
frontend/playwright.config.ts
.github/workflows/ci.yml — E2E test job
Bug
frontend/playwright.config.tshas:This makes it impossible to run E2E tests against a staging environment, CI testnet deployment, or any other URL without modifying the config file itself.
Fix
Read
baseURLfrom an environment variable with a localhost fallback:Add to
frontend/.env.example:Update CI to pass the variable when running against testnet:
Acceptance Criteria
baseURLreads fromPLAYWRIGHT_BASE_URLenv variablehttp://localhost:3000when not set.env.exampledocuments the variableReferences
frontend/playwright.config.ts.github/workflows/ci.yml— E2E test job