Skip to content

Commit 32a9e4b

Browse files
mirqtioclaude
andcommitted
fix(test): properly exclude tests using project-level testIgnore arrays
ROOT CAUSE: Playwright project-level testIgnore REPLACES (not extends) top-level config. Previous commits (72531af, fb0070b) added patterns to top-level testIgnore, but these were completely ignored because each project had its own testIgnore that overrode them. SOLUTION: Create EXCLUDED_TESTS array and apply to all main browser projects at the project level where it actually takes effect. Changes: - playwright.config.ci.ts: * Created EXCLUDED_TESTS constant with all 6 exclusion patterns * Applied to all 5 main browser projects (chromium/firefox/webkit desktop/mobile) * Consent projects continue using testMatch (they only run consent tests) - playwright.config.ts: * Same fix applied for local/CI parity * EXCLUDED_TESTS array applied to all 5 projects Tests excluded: - waitlist-functional.spec.ts (incomplete functionality) - purchase-payment-element.spec.ts (incomplete payment tests) - journeys.spec.ts (incomplete journey tests) - _debug/*.spec.ts (diagnostic/debug tests) - waitlist.spec.ts (11 tests, did NOT run in local baseline 5438b418d431bae7) - consent*.spec.ts (run separately in dedicated consent projects) Expected impact: - Test count should drop from 665 to ~615 tests - Removes ~50 test executions (10 waitlist tests × 5 browsers) - Establishes local/CI parity matching baseline run 5438b418d431bae7 Documentation: See SCRATCHPAD.md "testIgnore Override Issue" section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent fb0070b commit 32a9e4b

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed

playwright.config.ci.ts

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ import base from './playwright.config'
1111
* - Chromium only (vs 5 browsers locally)
1212
* - Longer timeouts for cold starts
1313
*/
14+
15+
// Tests to exclude from main browser projects (incomplete/debug/consent tests)
16+
// IMPORTANT: Project-level testIgnore REPLACES (not extends) top-level config
17+
// Must combine all patterns at project level for proper exclusion
18+
const EXCLUDED_TESTS = [
19+
/.*waitlist-functional\.spec\.ts$/,
20+
/.*purchase-payment-element\.spec\.ts$/,
21+
/.*journeys\.spec\.ts$/,
22+
/.*\/_debug\/.*\.spec\.ts$/,
23+
/.*waitlist\.spec\.ts$/, // Did NOT run in local baseline run 5438b418d431bae7
24+
/.*consent.*\.spec\.ts$/, // Consent tests run separately in dedicated projects
25+
]
26+
1427
export default defineConfig({
1528
...base,
1629
workers: 6, // Conservative parallelism for CI
@@ -19,21 +32,13 @@ export default defineConfig({
1932
expect: {
2033
timeout: 15_000, // 15s for production build hydration (increased from 8s)
2134
},
22-
// Skip incomplete/debug tests (match local run 5438b418d431bae7)
23-
testIgnore: [
24-
/.*waitlist-functional\.spec\.ts$/,
25-
/.*purchase-payment-element\.spec\.ts$/,
26-
/.*journeys\.spec\.ts$/,
27-
/.*\/_debug\/.*\.spec\.ts$/,
28-
/.*waitlist\.spec\.ts$/, // Did NOT run in local baseline run
29-
],
3035
// CI tests all 5 browsers via matrix strategy
3136
// Regular tests use storageState to bypass consent modal (fixes 80% timeout issue)
3237
// Consent tests run without storageState to actually test the consent modal
3338
projects: [
3439
{
3540
name: 'chromium-desktop',
36-
testIgnore: /.*consent.*\.spec\.ts$/,
41+
testIgnore: EXCLUDED_TESTS,
3742
use: {
3843
...devices['Desktop Chrome'],
3944
viewport: { width: 1920, height: 1080 },
@@ -51,7 +56,7 @@ export default defineConfig({
5156
},
5257
{
5358
name: 'firefox-desktop',
54-
testIgnore: /.*consent.*\.spec\.ts$/,
59+
testIgnore: EXCLUDED_TESTS,
5560
use: {
5661
...devices['Desktop Firefox'],
5762
viewport: { width: 1920, height: 1080 },
@@ -71,7 +76,7 @@ export default defineConfig({
7176
},
7277
{
7378
name: 'webkit-desktop',
74-
testIgnore: /.*consent.*\.spec\.ts$/,
79+
testIgnore: EXCLUDED_TESTS,
7580
use: {
7681
...devices['Desktop Safari'],
7782
viewport: { width: 1920, height: 1080 },
@@ -91,7 +96,7 @@ export default defineConfig({
9196
},
9297
{
9398
name: 'chromium-mobile',
94-
testIgnore: /.*consent.*\.spec\.ts$/,
99+
testIgnore: EXCLUDED_TESTS,
95100
use: {
96101
...devices['Pixel 7'],
97102
storageState: 'e2e/storage/consent-accepted.json',
@@ -107,7 +112,7 @@ export default defineConfig({
107112
},
108113
{
109114
name: 'webkit-mobile',
110-
testIgnore: /.*consent.*\.spec\.ts$/,
115+
testIgnore: EXCLUDED_TESTS,
111116
use: {
112117
...devices['iPhone 14'],
113118
actionTimeout: 20_000, // Extra time for WebKit

playwright.config.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
import { defineConfig, devices } from '@playwright/test'
22

3+
// Tests to exclude (incomplete/debug tests)
4+
// IMPORTANT: Project-level testIgnore REPLACES (not extends) top-level config
5+
// Must combine all patterns at project level for proper exclusion
6+
const EXCLUDED_TESTS = [
7+
/.*waitlist-functional\.spec\.ts$/,
8+
/.*purchase-payment-element\.spec\.ts$/,
9+
/.*journeys\.spec\.ts$/,
10+
/.*\/_debug\/.*\.spec\.ts$/,
11+
/.*waitlist\.spec\.ts$/, // Did NOT run in local baseline run 5438b418d431bae7
12+
]
13+
314
export default defineConfig({
415
testDir: './e2e',
516
fullyParallel: true,
@@ -10,14 +21,6 @@ export default defineConfig({
1021
expect: {
1122
timeout: 5_000,
1223
},
13-
// Skip incomplete/debug tests (match local run 5438b418d431bae7)
14-
testIgnore: [
15-
/.*waitlist-functional\.spec\.ts$/,
16-
/.*purchase-payment-element\.spec\.ts$/,
17-
/.*journeys\.spec\.ts$/,
18-
/.*\/_debug\/.*\.spec\.ts$/,
19-
/.*waitlist\.spec\.ts$/, // Did NOT run in local baseline run
20-
],
2124

2225
reporter: [
2326
['list'],
@@ -36,13 +39,15 @@ export default defineConfig({
3639
projects: [
3740
{
3841
name: 'chromium-desktop',
42+
testIgnore: EXCLUDED_TESTS,
3943
use: {
4044
...devices['Desktop Chrome'],
4145
viewport: { width: 1920, height: 1080 },
4246
},
4347
},
4448
{
4549
name: 'firefox-desktop',
50+
testIgnore: EXCLUDED_TESTS,
4651
use: {
4752
...devices['Desktop Firefox'],
4853
viewport: { width: 1920, height: 1080 },
@@ -53,19 +58,22 @@ export default defineConfig({
5358
},
5459
{
5560
name: 'webkit-desktop',
61+
testIgnore: EXCLUDED_TESTS,
5662
use: {
5763
...devices['Desktop Safari'],
5864
viewport: { width: 1920, height: 1080 },
5965
},
6066
},
6167
{
6268
name: 'chromium-mobile',
69+
testIgnore: EXCLUDED_TESTS,
6370
use: {
6471
...devices['Pixel 7'],
6572
},
6673
},
6774
{
6875
name: 'webkit-mobile',
76+
testIgnore: EXCLUDED_TESTS,
6977
use: {
7078
...devices['iPhone 14'],
7179
},

0 commit comments

Comments
 (0)