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 search page with a debounced text input and category filters. Write Cypress E2E tests for the search functionality.
The app runs on http://localhost:3000 with these pages:
/search -- search page with a text input (300ms debounce), category filter dropdown, and results gridThe app has these API endpoints:
GET /api/search?q=<query>&category=<cat> -- returns search resultsGET /api/categories -- returns available filter categoriesProduce:
cypress.config.ts -- Cypress configurationcypress/e2e/search.cy.ts -- tests for search input, debounce behavior, filters, results display, and empty statecypress/support/commands.ts -- any reusable test helperscypress/fixtures/search-results.json -- fixture data for search API responsespackage.json -- with cypress dependency listedYou may create additional files for good test organization.