AGENT SKILL

playwright-testing

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from Cypress/Selenium. TypeScript and JavaScript.

License 许可
MIT
最近更新
2026-11-04
Stars
★ 0
Forks
0

01 前言 Front Matter

name
playwright-testing
license
MIT
description
Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from Cypress/Selenium. TypeScript and JavaScript.
user-invocable
false

02 资源文件 1

03 SKILL.md 正文

Playwright Skill

Opinionated, production-tested Playwright guidance — every pattern includes when (and when not) to use it.

50+ reference guides covering the full Playwright surface: selectors, assertions, fixtures, page objects, network mocking, auth, visual regression, accessibility, API testing, CI/CD, debugging, and more — with TypeScript and JavaScript examples throughout.

Golden Rules

  1. getByRole() over CSS/XPath — resilient to markup changes, mirrors how users see the page
  2. Never page.waitForTimeout() — use expect(locator).toBeVisible() or page.waitForURL()
  3. Web-first assertions — expect(locator) auto-retries; expect(await locator.textContent()) does not
  4. Isolate every test — no shared state, no execution-order dependencies
  5. baseURL in config — zero hardcoded URLs in tests
  6. Retries: 2 in CI, 0 locally — surface flakiness where it matters
  7. Traces: 'on-first-retry' — rich debugging artifacts without CI slowdown
  8. Fixtures over globals — share state via test.extend(), not module-level variables
  9. One behavior per test — multiple related expect() calls are fine
  10. Mock external services only — never mock your own app; mock third-party APIs, payment gateways, email

Guide Index

Writing Tests

What you're doing Guide Deep dive
Choosing selectors locators.md locator-strategy.md
Assertions & waiting assertions-and-waiting.md
Organizing test suites test-organization.md test-architecture.md
Playwright config configuration.md
Page objects page-object-model.md pom-vs-fixtures-vs-helpers.md
Fixtures & hooks fixtures-and-hooks.md
Test data test-data-management.md
Auth & login authentication.md auth-flows.md
API testing (REST/GraphQL) api-testing.md
Visual regression visual-regression.md
Accessibility accessibility.md
Mobile & responsive mobile-and-responsive.md
Component testing component-testing.md
Network mocking network-mocking.md when-to-mock.md
Forms & validation forms-and-validation.md
File uploads/downloads file-operations.md file-upload-download.md
Error & edge cases error-and-edge-cases.md
CRUD flows crud-testing.md
Drag and drop drag-and-drop.md
Search & filter UI search-and-filter.md

Debugging & Fixing

Problem Guide
General debugging workflow debugging.md
Specific error message error-index.md
Flaky / intermittent tests flaky-tests.md
Common beginner mistakes common-pitfalls.md

Framework Recipes

Framework Guide
Next.js (App Router + Pages Router) nextjs.md
React (CRA, Vite) react.md
Vue 3 / Nuxt vue.md
Angular angular.md

Migration Guides

From Guide
Cypress from-cypress.md
Selenium / WebDriver from-selenium.md

Architecture Decisions

Question Guide
Which locator strategy? locator-strategy.md
E2E vs component vs API? test-architecture.md
Mock vs real services? when-to-mock.md
POM vs fixtures vs helpers? pom-vs-fixtures-vs-helpers.md

CI/CD & Infrastructure

Topic Guide
GitHub Actions ci-github-actions.md
GitLab CI ci-gitlab.md
CircleCI / Azure DevOps / Jenkins ci-other.md
Parallel execution & sharding parallel-and-sharding.md
Docker & containers docker-and-containers.md
Reports & artifacts reporting-and-artifacts.md
Code coverage test-coverage.md
Global setup/teardown global-setup-teardown.md
Multi-project config projects-and-dependencies.md

Specialized Topics

Topic Guide
Multi-user & collaboration multi-user-and-collaboration.md
WebSockets & real-time websockets-and-realtime.md
Browser APIs (geo, clipboard, permissions) browser-apis.md
iframes & Shadow DOM iframes-and-shadow-dom.md
Canvas & WebGL canvas-and-webgl.md
Service workers & PWA service-workers-and-pwa.md
Electron apps electron-testing.md
Browser extensions browser-extensions.md
Security testing security-testing.md
Performance & benchmarks performance-testing.md
i18n & localization i18n-and-localization.md
Multi-tab & popups multi-context-and-popups.md
Clock & time mocking clock-and-time-mocking.md
Third-party integrations third-party-integrations.md

CLI Browser Automation

What you're doing Guide
CLI browser interaction playwright-cli/SKILL.md
Core commands (open, click, fill, navigate) core-commands.md
Network mocking & interception request-mocking.md
Running custom Playwright code running-custom-code.md
Multi-session browser management session-management.md
Cookies, localStorage, auth state storage-and-auth.md
Test code generation from CLI test-generation.md
Tracing and debugging tracing-and-debugging.md
Screenshots, video, PDF screenshots-and-media.md
Device & environment emulation device-emulation.md
Complex multi-step workflows advanced-workflows.md

Language Note

All guides include TypeScript and JavaScript examples. When the project uses .js files or has no tsconfig.json, examples are adapted to plain JavaScript.

04 同仓库更多 Skills

justin-pitt
justin-pitt/pitt-skills

vibesec

This skill helps Claude write secure web applications. Use this when working on any web application or when a user requests a scan or audit to ensure security best practices are followed.

★ 0
justin-pitt
justin-pitt/pitt-skills

ui-ux-guide

Modern, clean UI/UX guidance + review skill. Use when you need actionable UX/UI recommendations, design principles, or a design review checklist for new features or existing systems (web/app). Focus on CRAP (Contrast/Repetition/Alignment/Proximity) plus task-first UX, information architecture, feedback & system status, consistency, affordances, error prevention/recovery, and cognitive load. Enforce a modern minimal style (clean, spacious, typography-led), reduce unnecessary copy, forbid emoji as icons, and recommend intuitive refined icons from a consistent icon set.

★ 0
justin-pitt
justin-pitt/pitt-skills

tufin

暂无简介

★ 0
justin-pitt
justin-pitt/pitt-skills

tines

Tines is a no-code automation and orchestration platform commonly used as a SOAR replacement, IT automation engine, and workflow builder. Use this skill whenever the user mentions Tines, Tines stories, actions, the AI Agent action, Story copilot, Webhook actions, HTTP Request actions, Event Transform, Send to Story, Resources, Pages, Cases, Records, credentials, Connect Flows, formulas, pills (`<<slug.body.field>>` syntax), the Tines API, the Tines Terraform provider, tenants, change control, self-hosted Tines, Helm charts for Tines, Tines Tunnel, Command-over-HTTP, Tines on Azure or AWS, Tines credits and the AI credit pool, the Workbench, MCP server templates exposed by Tines, or any automation or workflow build inside Tines. Also trigger when the user asks about migrating from Cortex XSOAR / XSIAM or other SOAR platforms to Tines, designing playbook or story patterns, integrating security tools through Tines, building forms with Pages, running case management in Tines, or is debugging a Tines workflow, even if they don't name a specific Tines concept.

★ 0
justin-pitt
justin-pitt/pitt-skills

tines-3b

Tines 3B is a separate product from Tines (Stories), not an upgrade path. Workflows are git repositories, steps are containerized code directories that pipe stdin to stdout, and an AI agent builds them from prompts. Use this skill whenever the user mentions Tines 3B, 3B spaces, 3B workflows, steps, config.toml, route_auth, route_type, webpage routes, volumes and /storage, Tines units (TUs), connectors and the credential proxy, 3B skills, watchtower, autofix, autotune, solo runs, 3B branches or push-live, the 3B REST API or MCP endpoint, GitSync, tunnels and networks, or docs.3b.tines.com. Also trigger when comparing 3B against Tines Stories, deciding which of the two a use case belongs in, or migrating between them. For classic Tines (stories, actions, pills, formulas, Cases, Records, Pages), use the `tines` skill instead.

★ 0
justin-pitt
justin-pitt/pitt-skills

threatconnect

ThreatConnect TIP and Polarity overlay expert. Use for any task involving ThreatConnect or Polarity: REST API calls (v2/v3), authentication (Token/HMAC), TQL queries, Indicators, Groups, Cases, Workflow, Tags, Security Labels, Associations, ThreatAssess scoring, CAL configuration, indicator deprecation, exclusion lists, TAXII feeds (inbound/outbound), feed metrics, dashboards, Query Cards, Threat Graph, ATT&CK Visualizer, Risk Quantifier, Polarity integrations (Core, IOC Submission, Intel Search, CAL, XSOAR), Polarity custom development (Node.js), Polarity server administration, Playbooks, Components, Workflow Playbooks, App Builder, TcEx, indicator distribution to SIEM/SOAR (XSIAM, Sentinel, Splunk, Elastic, Tines, Torq, BlinkOps), HTTP errors, HMAC signature failures, indicator formatting (ASN, CIDR, Host, URL, Registry Key), or troubleshooting. Trigger even without explicit ThreatConnect/Polarity mention if the task involves threat intelligence platform operations.

★ 0