e2e-testing
Skill1 starsChanged 57 days agoMITView on GitHub
Playwright browser end-to-end testing, covering suite layout, the Page Object Model, configuration, semantic locators, the canonical flaky-test policy, artifacts, and CI wiring. Use when you say "write a Playwright test for the login flow", "our e2e suite is flaky", "set up playwright.config.ts", "add e2e tests to CI", or "test the checkout journey in a browser". Not for backend capability sweeps against a live stack, use `e2e-runbooks`.
- Reads credentials
48 other projects use a version of this, 21 of them edited.
Adopted by
Most recently taken up by
- CrowdStrike/foundry-skillstheir own version, first seen Oct 1, 2026
- philtzjp/skillstheir own version, first seen Sep 30, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Sep 28, 2026
- mthines/agent-skillstheir own version, first seen Sep 25, 2026
- HACK-WU/skillstheir own version, first seen Sep 23, 2026
- lintangknitto/agent-skillstheir own version, first seen Sep 23, 2026
Used with
Projects with it also use swift-protocol-di-testing, content-hash-cache-pattern and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
InfopibeSkillswift-protocol-di-testing
Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.
Also in 8 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 8 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 7 projects that use this
- +9 more from Infopibe
Other versions48 projects use a version of this.
Word for word · 0
None found.
Edited · 21
- xu-xiang/everything-claude-code-zh★ 2k14% same
- loulanyue/awesome-claude-notes★ 27213% same
- tpavanipradeep/everything-claude-code★ 13413% same
- templetongroup/radiant★ 11313% same
- Jamkris/everything-gemini-code★ 8713% same
- woxiangyangzhimao/skills★ 1413% same
- Infopibe/everything-claude-code★ 813% same
- zero-click/zero-ratchet★ 813% same
- GPTtang/skill-atlas★ 413% same
- socialadsmentor/sam-agentic-harness★ 413% same
11 more not listed
Wrote their own version · 27
- nodetool-ai/nodetool★ 551same name
- ai-dashboad/flutter-skill★ 384same name
- cohen-liel/hivemind★ 110same name
- JasonxzWen/harness-hub★ 71same name
- nahid-sparktales/agent-dispatcher★ 59same name
- drvoss/everything-copilot-cli★ 47same name
- Svenja-dev/claude-code-skills★ 38same name
- CrowdStrike/foundry-skills★ 30same name
- mhylle/claude-skills-collection★ 19same name
- mthines/agent-skills★ 13same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agentic-engineeringSkill
- ai-regression-testingSkill
- angularSkill
- ansibleSkill
- api-designSkill
- architecture-decision-recordsSkill
- ascend-memorySkill
- ascend-web-hunterSkill
- audio-scribeSkill
- automation-inventorySkill
- backend-patternsSkill
- bashSkill
- build-dependency-managementSkill
- code-formatterSkill
- code-reviewerSkill
- coding-standardsSkill
- dart-flutter-patternsSkill
- database-migrationsSkill
- deployment-patternsSkill
- design-systemSkill
- docker-patternsSkill
- e2e-runbooksSkill
- embedded-c-arduinoSkill
- frontend-designSkill
- g-code-3d-printingSkill
- github-opsSkill
- git-workflowSkill
- golang-patternsSkill
- hexagonal-architectureSkill
- home-assistantSkill
- java-coding-standardsSkill
- jetbrains-ide-opsSkill
- jira-integrationSkill
- keycloak-patternsSkill
- kicadSkill
- markdown-writerSkill
- mongodb-patternsSkill
- nextjs-app-router-patternsSkill
- node-backend-patternsSkill
- observability-and-loggingSkill
- obsidianSkill
- performance-optimizationSkill
- postgres-patternsSkill
- powershellSkill
- project-trackingSkill
- python-patternsSkill
- pytorch-patternsSkill
- react-patternsSkill
- researchSkill
- review-duplicationSkill
- security-reviewSkill
- seoSkill
- soap-webservicesSkill
- springboot-patternsSkill
- tdd-workflowSkill
- unitySkill
- web-accessibilitySkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 64
Put selectors and waiting behind a page object so a markup change costs one edit rather than twenty.
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
E2E Testing Patterns
Build Playwright suites that stay stable, fast, and readable as the UI changes underneath them. This skill owns browser end-to-end testing and is the canonical home of the flaky-test policy that the other testing skills defer to.
When to activate
- Writing or restructuring Playwright tests for a user journey through the browser.
- A browser suite is flaky, slow, or full of hardcoded waits, and needs a policy as well as a fix.
- Setting up
playwright.config.ts, choosing projects and reporters, or wiring the suite into CI. - Deciding how a UI test should locate elements, or where its page objects live.
- Another testing skill has deferred a flaky-test decision to this one.
When not to activate
- Verifying a deployed backend capability with an API client rather than a browser. Use
e2e-runbooks. - Unit and integration tests inside the codebase, and the red-green-refactor loop. Use
tdd-workflow, or the language testing skill (python-patterns,golang-patterns,springboot-patterns). - Sandbox-mode API regression tests that need no browser and no database. Use
ai-regression-testing. - Auditing a page for keyboard operability and screen-reader behaviour. Use
web-accessibility. - Load, soak, or chaos testing. Out of scope here, which is about correctness rather than capacity.
Suite layout
Group specs by the journey they exercise, keep fixtures separate from specs, and keep page objects out of the spec tree so a spec file only reads as a scenario.
tests/
├── e2e/
│ ├── auth/
│ │ ├── login.spec.ts
│ │ ├── logout.spec.ts
│ │ └── register.spec.ts
│ ├── features/
│ │ ├── browse.spec.ts
│ │ ├── search.spec.ts
│ │ └── checkout.spec.ts
│ └── api/
│ └── endpoints.spec.ts
├── fixtures/
│ ├── auth.ts
│ └── data.ts
├── pages/
│ └── ItemsPage.ts
└── playwright.config.tsPage Object Model
Put selectors and waiting behind a page object so a markup change costs one edit rather than twenty. A page object
exposes intent (search, submitOrder) and never leaks a raw selector into a spec.
Fail: the spec owns the selectors and the waits.
test('search', async ({ page }) => {
await page.goto('/items')
await page.locator('[data-testid="search-input"]').fill('test')
await page.waitForTimeout(500)
expect(await page.locator('[data-testid="item-card"]').count()).toBeGreaterThan(0)
})Pass: the page object owns them, and the spec reads as the journey.
export class ItemsPage {
readonly page: Page
readonly searchInput: Locator
readonly itemCards: Locator
constructor(page: Page) {
this.page = page
this.searchInput = page.getByTestId('search-input')
this.itemCards = page.getByTestId('item-card')
}
async goto() {
await this.page.goto('/items')
}
async search(query: string) {
await this.searchInput.fill(query)
await this.page.waitForResponse(resp => resp.url().includes('/api/search'))
}
async itemCount() {
return this.itemCards.count()
}
}test.describe('Item search', () => {
let itemsPage: ItemsPage
test.beforeEach(async ({ page }) => {
itemsPage = new ItemsPage(page)
await itemsPage.goto()
})
test('finds items by keyword', async () => {
await itemsPage.search('test')
expect(await itemsPage.itemCount()).toBeGreaterThan(0)
await expect(itemsPage.itemCards.first()).toContainText(/test/i)
})
test('shows the empty state when nothing matches', async ({ page }) => {
await itemsPage.search('xyznonexistent123')
await expect(page.getByTestId('no-results')).toBeVisible()
expect(await itemsPage.itemCount()).toBe(0)
})
})Locators
Locate by role, label, or an explicit test id. A locator tied to a generated class name breaks on the next styling change and tells the reader nothing.
Fail: brittle and meaningless.
await page.click('.css-1x7hj2k > div:nth-child(3) button')Pass: semantic, and stable across restyling.
await page.getByRole('button', { name: 'Submit order' }).click()
await page.getByTestId('submit-order').click()Flaky tests, the canonical policy
A flaky test is a blocking defect, not background noise. It costs more than a failing test because it teaches the team
to ignore red. This section is the project-wide policy: tdd-workflow and the language testing skills defer to it
rather than restating it.
| Rule | Value |
| Fix or quarantine SLA | 2 business days from the first observed flake |
| Maximum quarantine period | 2 sprints |
| Action when quarantine expires | Delete the test and rewrite it from scratch |
| Prohibited in assertions | Thread.sleep(), time.sleep(), setTimeout, page.waitForTimeout |
| Allowed retry | Framework-level retry (retries in Playwright, @RetryingTest in JUnit) only for genuinely non-deterministic integration paths, never to paper over a race |
Quarantine explicitly and link the tracking issue, so the test cannot quietly rot.
test('complex search', async ({ page }) => {
test.fixme(true, 'Flaky, tracked in issue #123')
})Confirm a suspected flake before spending time on it.
npx playwright test tests/search.spec.ts --repeat-each=10The three causes worth knowing. Race conditions: assert through an auto-waiting locator rather than a bare click on a possibly unmounted element.
Fail:
await page.click('[data-testid="submit"]')Pass:
await page.getByTestId('submit').click()Network timing: wait for the response the UI depends on, never for a wall-clock guess.
Fail:
await page.waitForTimeout(5000)Pass:
await page.waitForResponse(resp => resp.url().includes('/api/data') && resp.ok())Animation timing: wait for the element to be stable before interacting with it.
Fail:
await page.click('[data-testid="menu-item"]')Pass:
const item = page.getByTestId('menu-item')
await item.waitFor({ state: 'visible' })
await item.click()External providers and third-party widgets
A journey that depends on a third-party provider (an identity provider, a payment widget, an analytics beacon) should stub the provider at the browser boundary. Stubbing keeps the test hermetic and fast, and it is the only way to make the failure paths reachable.
Fail: the test drives the real provider, so it is slow, rate limited, and untestable for the declined case.
test('user signs in', async ({ page }) => {
await page.goto('/login')
await page.getByLabel('Email').fill(process.env.REAL_TEST_ACCOUNT!)
await page.getByRole('button', { name: 'Continue with provider' }).click()
})Pass: the provider is stubbed, the app under test is real, and both outcomes are reachable.
test('user signs in with the external provider', async ({ page, context }) => {
await context.route('**/oauth/token', route =>
route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({ access_token: 'test-token', expires_in: 3600 }),
}),
)
await page.goto('/login')
await page.getByRole('button', { name: 'Continue with provider' }).click()
await expect(page.getByTestId('user-menu')).toContainText('Signed in')
})The same shape covers any browser-injected global a widget provides: install the stub with context.addInitScript
before navigation, then assert on what the application does with it.
Critical flows that move money
A checkout, a payment, or anything that debits a real account gets three extra rules: it never runs against production, it asserts the confirmation state rather than the click, and it waits on the settlement response rather than a timeout.
test('user completes checkout', async ({ page }) => {
test.skip(process.env.NODE_ENV === 'production', 'Never charge a real account from a test')
await page.goto('/cart')
await page.getByTestId('quantity').fill('2')
await page.getByRole('button', { name: 'Go to checkout' }).click()
await expect(page.getByTestId('order-total')).toContainText('49.98')
await page.getByRole('button', { name: 'Place order' }).click()
await page.waitForResponse(
resp => resp.url().includes('/api/orders') && resp.status() === 201,
{ timeout: 30000 },
)
await expect(page.getByTestId('order-confirmation')).toBeVisible()
})Reference map
| Task | Open |
Write playwright.config.ts, decide the retry and artifact policy, wire the suite into CI | references/config-and-ci.md |
Related skills
e2e-runbookscovers the backend counterpart: one capability per spec, driven by an API client against a live stack.tdd-workflowowns the unit and integration layers below this one and defers its flaky policy here.ai-regression-testingcovers DB-free API regression tests for AI-introduced defects.web-accessibilitycovers keyboard and screen-reader auditing, which a functional browser test does not prove.deployment-patternscovers where the suite runs in the pipeline and what a failure gates.
Checklist
- Specs are grouped by journey, page objects live outside the spec tree.
- No raw selector appears in a spec file.
- Every locator is role, label, or test-id based.
- No
waitForTimeoutanywhere in the suite. - Base URL and every environment value come from the environment.
- Trace, screenshot and video kept on failure, all under one artifact directory.
- Every quarantined test carries a tracking issue and a quarantine date.
- Third-party providers are stubbed at the browser boundary.
- Money-moving flows are skipped against production and assert the confirmed state.
- CI uploads the report on failure as well as success.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

