Skip to content

test(e2e): retry Playground smoke tests in CI to absorb boot flakiness#63

Merged
dknauss merged 1 commit into
mainfrom
ci/playwright-e2e-retries
Jun 23, 2026
Merged

test(e2e): retry Playground smoke tests in CI to absorb boot flakiness#63
dknauss merged 1 commit into
mainfrom
ci/playwright-e2e-retries

Conversation

@dknauss

@dknauss dknauss commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Problem

The Playwright Playground smoke job (npm run test:e2e:playground) has been flaking: a single test intermittently times out in the shared ensurePluginActivated helper waiting for the wp-admin Plugins <h1> to render (30s timeout), while 8/9 tests pass — and tests after the timeout also pass, so WordPress is up, just momentarily slow on one request.

This hit main and multiple branches in the same ~16:58 UTC window today (e.g. main run 27969931878), pointing at a transient slowdown of the unpinned @wp-playground/cli@latest server the harness boots — not any code regression. The failing test is non-deterministic (different spec each run), all failing at the identical boot-wait point.

Why it was fatal

playwright.config.js had no retries key, so retries defaulted to 0 in CI. A single transient timeout failed the entire smoke job with no second attempt.

Fix

retries: process.env.CI ? 2 : 0,

Flaky single-test timeouts now self-heal with up to 2 retries in CI; local runs keep fast-fail (retries: 0). The tests run against an ephemeral WordPress instance, so retries are safe and idempotent. Consistent with the repo's existing posture of guarding E2E against editor-not-ready races (d961392).

Verification

  • CI= node -e "require('./playwright.config.js').retries"0; CI=true …2
  • npx playwright test --list loads the config and enumerates the suite without error
  • Unit tests / lint / build green via pre-commit gate

Note

This is a separate, main-targeted fix because the flake affects main itself, not just #62. Once merged, #62 (and other branches) can be re-run / rebased and will benefit from the retry behavior.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.80%. Comparing base (4918807) to head (1a573ac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   80.80%   80.80%           
=======================================
  Files          44       44           
  Lines        3084     3084           
  Branches      523      523           
=======================================
  Hits         2492     2492           
  Misses        185      185           
  Partials      407      407           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The Playwright Playground smoke job intermittently fails when a single test
times out in ensurePluginActivated waiting for the wp-admin Plugins heading —
a transient slow-boot of the @wp-playground/cli@latest server, not a real
regression (8/9 tests pass, and tests after the timeout pass). With no retries
configured, one such hiccup failed the whole job, which hit main and several
branches in the same window.

Add retries: 2 in CI (0 locally) so flaky single-test timeouts self-heal. Tests
run against an ephemeral WordPress instance, so retries are safe and idempotent.
Consistent with the existing editor-not-ready race guard (d961392).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dknauss dknauss force-pushed the ci/playwright-e2e-retries branch from d677d5d to 1a573ac Compare June 23, 2026 01:23
@dknauss dknauss merged commit e7c829b into main Jun 23, 2026
15 checks passed
@dknauss dknauss deleted the ci/playwright-e2e-retries branch June 23, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant