Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/rules/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ path: tests/**
## Things That Break

- **Never use `page.goBack()`.** WP Playground crashes. Split into separate tests instead.
- **No `retries` in playwright config.** Retries mask real failures. Use `retries: 0`.
- **Retries are CI-only.** `retries: process.env.CI ? 1 : 0`. One CI retry absorbs WP Playground flakes (random 500s, crashes); local runs stay at 0 so real failures surface.
- **Tests share state within a spec.** Settings persist between tests in the same spec file. Explicitly reset anything a previous test might have changed.
- **Isolate heavy tests.** Complex tests (WASM compilation, multi-step workflows) should get their own directory with a `blueprint.json` so they run in a fresh Playground instance.

Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/playwright-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ jobs:
- uses: actions/checkout@v6
- id: find
run: |
# Same-dir-only checks silently drop specs using the shared tests/blueprint.json
suites=$(find . -name '*.spec.ts' -not -path '*/node_modules/*' | while read spec; do
dir=$(dirname "$spec")
if [ -f "$dir/blueprint.json" ]; then
basename "$spec" .spec.ts
fi
while [ "$dir" != "." ] && [ "$dir" != "/" ]; do
if [ -f "$dir/blueprint.json" ]; then
basename "$spec" .spec.ts
break
fi
dir=$(dirname "$dir")
done
done | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "suites=$suites" >> "$GITHUB_OUTPUT"

Expand Down Expand Up @@ -52,7 +57,7 @@ jobs:
run: echo "version=$(npx playwright --version | awk '{print $2}')" >> "$GITHUB_OUTPUT"

- name: Cache Playwright browsers
uses: actions/cache@v4
uses: actions/cache@v5
id: pw-cache
with:
path: ~/.cache/ms-playwright
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ jobs:
- uses: actions/checkout@v6
- id: find
run: |
# Same-dir-only checks silently drop specs using the shared tests/blueprint.json
suites=$(find . -name '*.spec.ts' -not -path '*/node_modules/*' | while read spec; do
dir=$(dirname "$spec")
if [ -f "$dir/blueprint.json" ]; then
basename "$spec" .spec.ts
fi
while [ "$dir" != "." ] && [ "$dir" != "/" ]; do
if [ -f "$dir/blueprint.json" ]; then
basename "$spec" .spec.ts
break
fi
dir=$(dirname "$dir")
done
done | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "suites=$suites" >> "$GITHUB_OUTPUT"

Expand Down Expand Up @@ -51,7 +56,7 @@ jobs:
run: echo "version=$(npx playwright --version | awk '{print $2}')" >> "$GITHUB_OUTPUT"

- name: Cache Playwright browsers
uses: actions/cache@v4
uses: actions/cache@v5
id: pw-cache
with:
path: ~/.cache/ms-playwright
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down
Loading