From kernel
End-to-end testing with Playwright using Page Object Model, flaky test strategies, and CI integration. Automatically activated when users ask about e2e, browser, or integration tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kernel:e2eThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<skill id="e2e">
<on_start> agentdb read-start Grep for existing Page Objects (pages/*.ts). Check playwright.config.ts exists. </on_start>
Skill-specific: skills/e2e/reference/e2e-research.mdScope — identify critical user paths only (auth, checkout, core workflows). E2E tests are slow; reject requests to test everything. (gate: list of paths defined, count ≤ what team can maintain)
Check existing Page Objects — grep -r "class.*Page" tests/pages/ or equivalent. Extend existing POM before creating new.
(gate: no duplicate selector sets)
Create/update Page Objects — one file per page/component. Locators use data-testid > role > text > CSS (last resort). Selectors in constructor; actions and assertions as methods.
(gate: no inline selectors in test files)
Write tests — test.describe blocks per feature. beforeEach for setup via POM. Each test asserts one outcome.
(gate: no waitForTimeout in any test)
Async correctness — replace all arbitrary timeouts with condition waits:
waitForResponse(r => r.url().includes('/api/...'))locator(...).waitFor({ state: 'visible' })waitForURL(/pattern/)waitForLoadState('networkidle')
(gate: grep -r "waitForTimeout" tests/ returns nothing)Handle flaky tests — detect with --repeat-each=10. Fix root cause (race condition, animation timing, network timing). If fix deferred: test.fixme(true, 'Flaky - Issue #NNN'). Never silent-skip.
(gate: no test.skip() without issue reference)
Configure Playwright — verify playwright.config.ts has: retries: CI ? 2 : 0, forbidOnly: !!CI, trace: 'on-first-retry', screenshot: 'only-on-failure'. See reference for full config template.
(gate: config file present, CI retries ≥ 2)
CI integration — add/verify GitHub Actions workflow: install with --with-deps, upload playwright-report/ as artifact if: always(). See reference for full YAML.
(gate: artifact upload step present)
Run suite — npx playwright test. All tests pass or are explicitly quarantined with issue refs.
(gate: exit 0, or all failures are test.fixme)
<anti_patterns> E2E tests are slow. Test critical paths, not every feature. waitForTimeout is flaky. Wait for specific conditions. CSS classes change. Use data-testid, role, or text. Flaky tests erode confidence. Fix or quarantine immediately. Selectors scattered = maintenance nightmare. Use Page Objects. </anti_patterns>
<on_complete> agentdb write-end '{"skill":"e2e","tests_written":,"page_objects":[""],"flaky_fixed":,"ci_configured":}'
Record tests added, page objects created, and CI status. </on_complete>
npx claudepluginhub ariaxhan/kernel-claude --plugin kernelWrites and debugs E2E tests with Playwright using Page Object Model, API mocking, and visual regression. Configures test infrastructure and CI integration.
Guides writing E2E tests with Playwright, configuring test infrastructure, debugging flaky browser tests, creating page objects, setting up fixtures, reporters, CI integration, API mocking, and visual regression testing.
Generates page objects and test infrastructure for Playwright, Cypress, or Selenium E2E tests. Covers critical-path test implementation and flakiness remediation.