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
A web application has a multi-step form wizard for user onboarding. Write Cypress E2E tests covering each step and the full completion flow.
The app runs on http://localhost:3000 with these pages:
/onboarding -- multi-step wizard with 3 steps:
/welcome -- success page shown after completing onboardingThe app has these API endpoints:
POST /api/onboarding -- submits the completed onboarding dataGET /api/onboarding/validate -- validates form data for the current stepForm validation rules:
Produce:
cypress.config.ts -- Cypress configurationcypress/e2e/onboarding.cy.ts -- tests for the multi-step wizard (navigation, validation, submission)cypress/support/commands.ts -- any reusable test helperspackage.json -- with cypress dependency listedYou may create additional files for good test organization.