fix-ci-e2e-flake

Diagnose and fix flaky Playwright Electron e2e tests that fail only in CI.

Updated May 13, 2026
One-click install
npx skills add https://github.com/lovebirdsx/universe-editor --skill fix-ci-e2e-flake-lovebirdsx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-ci-e2e-flake
Source: https://github.com/lovebirdsx/universe-editor/tree/main/.claude/skills/fix-ci-e2e-flake
Command: npx skills add https://github.com/lovebirdsx/universe-editor --skill fix-ci-e2e-flake-lovebirdsx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? End-to-end tests that pass locally but fail intermittently in CI waste engineering time and erode trust in the test suite. This Skill provides a systematic diagnostic workflow to distinguish real regressions from flakes, harden fragile assertions, and eliminate CI environment noise in a Playwright + Electron e2e suite. ## Core Features & Use Cases - Regression vs flake triage: Classify failures using local --repeat-each reproduction, retry behavior, and git history before touching any code. - Failure-signature playbook: Read Playwright call logs (toHaveCount, toBeVisible, timeout, intercepts pointer events) to map each failure shape to a known root cause via a 90+ case knowledge base. - Minimal robust fixes: Converge assertions onto the tested subject with locator filters, expect.poll, and source-level noise suppression—without weakening real coverage. - Use Case: A CI run shows Test timeout of 30000ms exceeded on a spec that passes locally. The Skill guides you to identify a missing test.slow(), apply the fix, verify the happy path still works, and record the new pattern in the case library. ## Quick Start Ask the assistant to diagnose why the CI e2e test smoke.outline fails intermittently while passing locally, and fix the flake.

Frequently Asked Questions about fix-ci-e2e-flake

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix flaky Playwright tests that only fail in CI?

First classify the failure: run the spec locally with --repeat-each=5, check whether retry recovers it, and inspect git history for recent changes to the spec. Then read the call log failure shape—fluctuating counts mean background noise, stable wrong values mean the tested subject never became ready—and harden the assertion accordingly.

How to tell a real regression from an e2e flake?

A flake passes locally with --repeat-each and recovers on CI retry, while a regression fails deterministically everywhere and retry cannot save it. Also check whether the same commit fails consistently, and use git stash on a clean baseline to compare behavior.

Why does my Playwright test timeout in CI but pass locally?

CI runners are slower, so a poll window equal to the global test timeout gets cut off before the condition is met. Common fixes include adding test.slow(), raising the specific poll timeout, and removing hardcoded timeouts that override CI-scaled config values.

What causes 'intercepts pointer events' click failures in Playwright?

The element is visible but a sibling element overlaps it at the click point, so the hit-target check fails. This often happens with horizontal layout overflow at CI viewport sizes; fix by adjusting layout assumptions or scrolling the target into a clickable position.

Should I weaken assertions to make CI e2e tests pass?

No. Robustness means excluding background noise while keeping the tested assertion at full strength. If the only way to pass is loosening the real assertion, treat it as a likely genuine regression rather than a flake.

When should a flaky e2e fix be recorded in a case library?

After every diagnosed flake, append the failure signal, root cause, and fix to the case reference file and update the signal index. This builds a lookup table so future failures with the same signature are resolved in minutes.