oakoss/agent-skills/e2e-testing

Claude Code and agent skill by oakoss/agent-skills

Trust tier 2
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

E2E test architecture and patterns with Playwright. Use when designing test suites, structuring Page Object Models, planning CI sharding strategies, setting up authentication flows, or organizing tests with tags and annotations. Use for test architecture, accessibility auditing with axe-core, network mocking strategies, visual regression workflows, HAR replay, and storageState authentication patterns. For Playwright API details, browser automation, or web scraping, use the playwright skill instead.

Install

npx vskill@latest install oakoss/agent-skills/e2e-testing

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

E2E Testing

Overview

Covers E2E test architecture and patterns using Playwright — how to structure test suites, organize tests, and apply proven patterns for authentication, mocking, visual regression, accessibility auditing, and CI parallelism. Focuses on the WHY and WHEN of test patterns rather than Playwright API specifics.

When to use: Designing test suite architecture, structuring Page Object Models, planning CI sharding strategies, setting up authentication flows, organizing tests with tags and annotations, implementing visual regression workflows, mocking network requests, auditing accessibility.

When NOT to use: Unit testing (use Vitest/Jest), API-only testing (use integration tests), component testing in isolation (use component test runners). For Playwright API details, browser automation, scraping, or troubleshooting Playwright errors, use the playwright skill.

Quick Reference

PatternAPI/ToolKey Points
Role-based locatorsgetByRole, getByText, getByLabelPreferred over CSS/XPath selectors
Page Object ModelClasses in tests/pages/Encapsulate all page-specific locators and actions
AuthenticationstorageState + setup projectsAuthenticate once, reuse across tests
Visual regressionexpect(page).toHaveScreenshot()Mask dynamic content to prevent flakes
Accessibility auditAxeBuilder from @axe-core/playwright.withTags() + .analyze() on key flows
Trace debuggingtrace: 'on-first-retry'Full DOM snapshots, network logs, and timeline
Network mockingpage.route()Stable tests without third-party dependencies
HAR replaypage.routeFromHAR()High-fidelity mocks from recorded traffic
Image blockingpage.route('**/*.{png,jpg}', abort)Speed up tests by skipping images
CI sharding--shard=1/4Split suite across parallel CI machines
Blob reports--reporter=blob + merge-reportsMerge sharded results into a single report
Test tags{ tag: ['@smoke'] }Filter tests by category with --grep
Test stepstest.step('name', async () => {})Group actions in trace viewer and reports
Changed tests only--only-changed=$GITHUB_BASE_REFRun only test files changed since base branch
Native a11y checkstoHaveAccessibleName, toHaveRoleLightweight alternative to full axe-core scans
Git info in reportscaptureGitInfo reporter optionLink test reports to commits for CI debugging
Web-first assertionsexpect(element).toBeVisible()Auto-wait instead of waitForTimeout
Fixture compositionmergeTests() / mergeExpects()Combine 3+ fixture modules into one test
Auto fixtures{ auto: true } on test.extend()Run for every test (logging, screenshots)
Fixture options{ option: true } on test.extend()Configurable via config or test.use()
Data-driven testsfor...of loop generating test() callsParameterized tests from arrays or CSV files
Context emulationbrowser.newContext() optionslocale, timezone, colorScheme, offline, isMobile
Two roles in one testConcurrent browser.newContext() callsSeparate storageState per context

Common Mistakes

MistakeCorrect Pattern
Using page.waitForTimeout() for element visibilityUse web-first assertions like expect(element).toBeVisible() which auto-wait
Writing raw locators directly in test filesEncapsulate all selectors in Page Object Model classes
Testing third-party APIs (Stripe, Auth0) directlyMock external services with page.route() for stable, fast tests
Debugging CI failures with screenshots instead of tracesConfigure trace: 'on-first-retry' and use Playwright Trace Viewer
Sharing state between tests via global variablesUse a fresh BrowserContext per test for full isolation
Running all tests in a single CI jobUse Playwright sharding (--shard=1/N) across parallel machines
Using CSS/XPath selectors for element locationUse role-based locators that survive refactors and enforce accessibility
Logging in via UI in every testUse storageState with setup projects to authenticate once
Using injectAxe/checkA11y from axe-playwrightUse AxeBuilder from @axe-core/playwright with .analyze()
Committing storageState JSON files to gitAdd playwright/.auth/ to .gitignore
Relying on storageState for sign-out testsSign-out invalidates server session — sign in via UI for each sign-out test
Assuming storageState persists sessionStorageIt only saves cookies + localStorage — use addInitScript() for sessionStorage
Duplicating test code for locale/currency variantsUse fixture options ({ option: true }) with per-project config overrides
Creating fixtures without mergeTests() for 3+ modulesUse mergeTests() to compose fixture files into a single test export

Delegation

  • Discover which user flows lack E2E coverage: Use Explore agent
  • Build a full Page Object Model test suite for an application: Use Task agent
  • Plan a CI sharding strategy for a large test suite: Use Plan agent
For Playwright API details, browser automation, scraping, stealth mode, screenshots/PDFs, Docker deployment, or troubleshooting Playwright errors, use the playwright skill.

References

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
7
Repository forks
1
Repository npm downloads, 7 days
140
7-day trend score
23

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 1 Apr 2026, 8 months ago.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/oakoss/agent-skills/e2e-testing/badge)](https://verified-skill.com/skills/oakoss/agent-skills/e2e-testing)

Something wrong with this skill or its page? Tell us.