src/orchestrator/plugins/cypress/SKILL.md
Writes Cypress E2E/component tests, configures `cy.intercept()` and `cy.session()`, authors custom commands, and wires CI artifacts. Use when creating E2E specs, component tests, or CI test pipelines. Trigger terms: cypress, e2e, component test, cy.intercept, cy.session
npx skillsauth add etylsarin/opencastle cypress-testingInstall 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.
Cypress-specific E2E and component testing patterns. For project-specific test configuration and breakpoints, see testing-config.md.
# Interactive runner
npx cypress open
# Headless run (CI) — target a specific spec with --spec when needed
npx cypress run
npm install --save-dev cypress then npx cypress verify.data-testid attributes to key elements. Write custom commands in cypress/support/commands.ts, configure cy.intercept() stubs, and author fixtures under cypress/fixtures/.cypress/e2e/ using data-testid selectors. After authoring a spec, validate the setup by running a single spec: npx cypress run --spec "cypress/e2e/auth/login.cy.ts" --headed (quick smoke check).npx cypress open (interactive) or npx cypress run (headless). If a spec fails, re-run the failing spec directly and inspect cypress/screenshots/ and cypress/videos/ for evidence.npx cypress run — assert exit code 0; upload videos/screenshots on failures.Tests: cypress/e2e/ • Fixtures: cypress/fixtures/ • Commands: cypress/support/commands.ts
// cypress/e2e/auth/login.cy.ts
describe('Login', () => {
beforeEach(() => cy.visit('/login'));
it('logs in with valid credentials and lands on dashboard', () => {
cy.get('[data-testid="email-input"]').type('[email protected]');
cy.get('[data-testid="password-input"]').type('password123');
cy.get('[data-testid="login-button"]').click();
cy.url().should('include', '/dashboard');
cy.get('[data-testid="user-menu"]').should('be.visible');
});
});
// cypress/support/commands.ts
Cypress.Commands.add('login', (email: string, password: string) => {
cy.session([email, password], () => {
cy.visit('/login');
cy.get('[data-testid="email-input"]').type(email);
cy.get('[data-testid="password-input"]').type(password);
cy.get('[data-testid="login-button"]').click();
cy.url().should('include', '/dashboard');
});
});
Priority: prefer data-testid, then aria-* attributes or role. Avoid fragile selectors (auto-generated classes, deep CSS paths). See REFERENCE.md for CI selector consistency rules.
cy.intercept() with deterministic fixture payloads over test-time seeding for flaky network scenarioscy.session() with serialized auth state to speed repeatable suites; persist and reuse tokens across related specs@alias names per spec) to avoid cross-test waits when running in parallelFor CI pipeline examples and cypress.config.ts snippets, see REFERENCE.md.
For advanced configuration examples and CI optimizations, see REFERENCE.md.
development
Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, and smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation.
development
Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, and flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.
development
Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, and defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting a delegation session, running a multi-agent workflow, delegating work, choosing which model to use, or assigning tasks.
testing
Saves and restores session state including task progress, file changes, and delegation history. Use when saving progress, resuming interrupted work, picking up where you left off, or checkpointing current work.