Cypress E2E testing patterns -- selectors, cy.intercept, cy.session, cy.clock, custom commands, test isolation, and anti-patterns
98
99%
Does it follow best practices?
Impact
97%
1.25xAverage score across 4 eval scenarios
Passed
No known issues
{
"instruction": "Write E2E tests for a multi-step form wizard with validation on each step",
"relevant_when": "Agent writes Cypress E2E tests for multi-step forms, wizards, or multi-page form flows",
"context": "Proactively verify that agents apply Cypress best practices when testing multi-step form wizards. The scenario involves navigating between form steps, validating required fields per step, and submitting the final form. The agent should use data-testid selectors, cy.intercept() for form submission, custom commands for repeated step navigation, and test both validation and happy path without conditional DOM testing.",
"sources": [
{
"type": "file",
"filename": "skills/cypress-testing/SKILL.md",
"tile": "tessl-labs/cypress-testing"
}
],
"checklist": [
{
"name": "data-testid-selectors",
"rule": "Agent uses data-testid or data-cy attributes for form fields, step indicators, next/back buttons, and submit button -- not CSS classes or structural selectors",
"relevant_when": "Agent writes Cypress selectors for multi-step form elements"
},
{
"name": "step-validation-tested",
"rule": "Agent writes at least one test that attempts to advance to the next step without filling required fields, and asserts that validation errors appear and the step does not advance",
"relevant_when": "Agent writes Cypress tests for form wizard validation"
},
{
"name": "happy-path-full-flow",
"rule": "Agent writes a test that completes all steps of the wizard with valid data and submits successfully, verifying a success message or redirect at the end",
"relevant_when": "Agent writes Cypress tests for complete form wizard flow"
},
{
"name": "intercept-form-submission",
"rule": "Agent uses cy.intercept() on the form submission endpoint, aliases it with .as(), and uses cy.wait('@alias') to verify the submission was made",
"relevant_when": "Agent writes Cypress tests for form wizard submission"
},
{
"name": "custom-command-for-steps",
"rule": "Agent extracts repeated step-filling logic into custom commands or helper functions rather than duplicating field-filling code in every test",
"relevant_when": "Agent writes multiple tests that navigate through wizard steps"
},
{
"name": "no-conditional-testing",
"rule": "Agent does not use if/else conditional logic based on DOM state (e.g., checking which step is active). Each test follows a deterministic path through specific steps.",
"relevant_when": "Agent writes Cypress tests that navigate between form steps"
},
{
"name": "beforeeach-isolation",
"rule": "Agent uses beforeEach() to visit the form page so each test starts from step 1 with a clean state",
"relevant_when": "Agent writes a describe block with multiple wizard tests"
},
{
"name": "no-arbitrary-waits",
"rule": "Agent does not use cy.wait(ms) -- uses assertions or cy.wait('@alias') for async operations",
"relevant_when": "Agent writes Cypress tests with async form operations"
}
]
}