.cursor/skills/qa-cypress-writer/SKILL.md
Generate Cypress E2E and component tests for TypeScript with time-travel debugging, cy.intercept for network mocking, and component testing via cy.mount.
npx skillsauth add AZANIR/qa-skills qa-cypress-writerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write Cypress E2E and component tests from test case specifications. Transform structured test cases into executable TypeScript test files with proper selectors, network mocking, and component isolation.
| Type | Scope | When to Use | |------|-------|-------------| | E2E | Full user flows, page navigation | Critical paths, user journeys | | Component | Isolated UI components | React/Vue/Angular/Svelte components |
*.cy.ts in cypress/e2e/ or cypress/component/cy.intercept(), cy.fixture() for network controldata-cy attributes; avoid brittle CSSUses Context7 MCP to fetch current Cypress documentation when needed. Query for Cypress API, commands, or configuration when patterns are unclear.
cy.visit(), cy.go(), cy.reload()cy.get(), cy.contains(), cy.find() — chainable, retry-ablecy.click(), cy.type(), cy.clear(), cy.select(), cy.check()component.devServer in config (Vite, Webpack, etc.)cy.fixture() for response data; cy.intercept('GET', '/api/users', { fixture: 'users.json' })cy.intercept('GET', '/api/users').as('getUsers'); cy.wait('@getUsers')cy.login(), cy.fillForm(), cy.logout()describe / it, beforeEach / afterEachcy.session() for login state caching (Cypress 8+)cy.screenshot() for debugging; auto on failuredata-cy="submit-btn" for stable selectorsshould() / expect(); avoid implicit passesbaseUrl, viewportWidth/viewportHeight, video, retries, component.devServercypress/support/e2e.ts, commands.tsSee references/config.md for full configuration guide.
cypress/e2e/{feature}.cy.ts — E2E testscypress/component/{Component}.cy.tsx — Component testsreferences/patterns.md — E2E flows, component mounting, custom commands, fixtures, aliasesreferences/assertions.md — should, expect, assert patterns (Chai)references/config.md — cypress.config.ts, env, plugins, support filesreferences/best-practices.md — data-cy, anti-patterns, flake prevention, CICan do (autonomous):
cy.intercept() for API stubbing/spyingcommands.tscy.fixture() and cy.session() where appropriatecypress.config.ts for baseUrl, viewport, retriesdata-cy selectors in generated tests (recommend adding to app if missing)Cannot do (requires confirmation):
data-cy attributesWill not do (out of scope):
cy.wait(ms) — use cy.wait('@alias') or assertions insteaddata-cy attributes for selectors where possible| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| Element not found | Selector too brittle or timing | Use data-cy; ensure element exists before action; increase timeout if needed |
| cy.wait(ms) flakiness | Arbitrary delays | Replace with cy.wait('@alias') or should() assertions |
| Intercept not matching | URL/pattern mismatch | Use cy.intercept('**/api/users*') or exact URL; check method |
| Session not persisting | cy.session misconfigured | Ensure cy.session() in beforeEach; validate cache key |
| Component mount fails | Missing provider/wrapper | Add providers in cy.mount(<Provider><Component /></Provider>) |
| Cross-origin errors | Navigating to different domain | Use cy.origin() for cross-origin flows |
| Timeout on assertion | Element never meets condition | Verify selector; check if element is in iframe (not supported) |
tools
Analyze OpenAPI/Swagger spec (JSON or YAML) against existing test files and generate an HTML coverage report with QA automation tasks. Use when user provides an OpenAPI spec file and wants to know test coverage status.
testing
Universal QA plan generator supporting 10 plan types including test plans, sprint plans, regression plans, release plans, UAT plans, performance plans, migration plans, onboarding plans, and custom plans.
development
Generate consumer-driven contract tests using Pact for JavaScript and Python to verify microservice API compatibility between consumer and provider.
development
Master skill coordinating all QA skills through pipeline modes (full-cycle, docs-only, testcases-only, write-tests, report), formalized handoff chains, scheduler rules, and framework/language selection based on project context.