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 search page with debounced input and filter options",
"relevant_when": "Agent writes Cypress E2E tests for search functionality, autocomplete, debounced inputs, or filtering",
"context": "Proactively verify that agents apply Cypress best practices when testing search and filter UIs. The scenario involves a search input that debounces requests, filter dropdowns, and result display. The agent should use cy.clock()/cy.tick() for debounce timing, cy.intercept() for search API mocking, and data-testid selectors. This scenario deliberately omits mention of specific Cypress time-control APIs.",
"sources": [
{
"type": "file",
"filename": "skills/cypress-testing/SKILL.md",
"tile": "tessl-labs/cypress-testing"
}
],
"checklist": [
{
"name": "clock-for-debounce",
"rule": "Agent uses cy.clock() and cy.tick() to control debounce timing in search tests, rather than using cy.wait(ms) or real-time delays to wait for debounce to fire",
"relevant_when": "Agent writes Cypress tests for debounced search input"
},
{
"name": "intercept-search-api",
"rule": "Agent uses cy.intercept() to stub the search API endpoint with fixture or inline data, aliased with .as() and awaited with cy.wait('@alias')",
"relevant_when": "Agent writes Cypress tests that trigger search API calls"
},
{
"name": "data-testid-selectors",
"rule": "Agent uses data-testid or data-cy attributes for search input, filter controls, and result items -- not CSS classes or positional selectors",
"relevant_when": "Agent writes Cypress selectors for search and filter elements"
},
{
"name": "empty-results-tested",
"rule": "Agent writes a test for the empty results state by stubbing the search API to return an empty array and asserting an empty-state message is shown",
"relevant_when": "Agent writes Cypress tests for search results display"
},
{
"name": "filter-changes-results",
"rule": "Agent writes a test that applies a filter and verifies the results update accordingly (intercept with different response data per filter value)",
"relevant_when": "Agent writes Cypress tests for filter controls"
},
{
"name": "no-arbitrary-waits",
"rule": "Agent does not use cy.wait(ms) with a numeric delay for debounce or loading -- uses cy.clock()/cy.tick() for timing and cy.wait('@alias') for network",
"relevant_when": "Agent writes Cypress tests with debounce or async search"
},
{
"name": "beforeeach-isolation",
"rule": "Agent uses beforeEach() to visit the page and set up intercepts so each test starts clean",
"relevant_when": "Agent writes a describe block with multiple search/filter tests"
}
]
}