Commit b324b2a
fix(ci): align environment variables with local .env.test for test parity
ROOT CAUSE: CI was executing 31 more tests than local (92 vs 81 per browser).
Tests that should skip via test.skip() were running in CI due to missing
environment variables that control feature flags and test behavior.
SOLUTION: Add missing environment variables to playwright.config.ci.ts webServer
env section to match local .env.test configuration exactly.
Changes to playwright.config.ci.ts:
- Added USE_MOCK_PURCHASE='true' (server-side mock control)
- Added NEXT_PUBLIC_FF_PURCHASE_ENABLED='true' (purchase feature flag)
- Added BYPASS_UTM_VALIDATION='false' (UTM redirect testing control)
- Added NEXT_PUBLIC_ENABLE_TEST_HARNESS='true' (test utilities)
- Added NEXT_PUBLIC_TEST_HARNESS_KEY='test-key-12345' (test auth)
Expected Impact:
- Test count per browser should drop from 98 to ~74 (matching local 81 executed)
- Runtime test.skip() calls will now work correctly in CI
- Tests skipped locally will also skip in CI (full parity)
- Focus testing on the 81 tests that passed 100% in local baseline
Local verification:
- 111 tests declared across 17 spec files (matches expected after exclusions)
- Same spec files as local baseline minus 5 excluded patterns
- Environment variables now aligned for consistent test.skip() behavior
Related: Commit 32a9e4b fixed testIgnore (spec-level exclusion)
This commit fixes runtime skipping (test-level exclusion via test.skip())
Baseline: Local run 5438b418d431bae7 (81 passed, 37 skipped per browser)
Documentation: See SCRATCHPAD.md for full investigation details
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 32a9e4b commit b324b2a
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
| |||
0 commit comments