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
{
"context": "Tests whether the agent proactively uses cy.intercept() with aliases, custom commands, fixture data, and Cypress best practices when writing E2E tests for a shopping cart and checkout flow. The task describes only business requirements -- it does not prescribe Cypress patterns.",
"type": "weighted_checklist",
"checklist": [
{
"name": "cy.intercept with aliases for API calls",
"description": "The agent uses cy.intercept() with .as() aliases for product listing, cart operations, and order creation endpoints, and waits on them with cy.wait('@alias') before asserting results.",
"max_score": 16
},
{
"name": "Fixture data for API stubbing",
"description": "The agent uses cy.intercept with { fixture: '...' } or { body: ... } to provide deterministic product and cart data rather than relying on live API responses.",
"max_score": 12
},
{
"name": "Custom commands for repeated flows",
"description": "The agent extracts repeated multi-step interactions (e.g., adding a product to cart, filling checkout form) into custom Cypress commands rather than duplicating steps across tests.",
"max_score": 12
},
{
"name": "data-testid selectors",
"description": "The agent uses data-testid or data-cy attributes for selecting product cards, cart items, form fields, and buttons -- not CSS class selectors or fragile structural selectors.",
"max_score": 12
},
{
"name": "Form validation tested",
"description": "At least one test verifies that the checkout form shows validation errors when submitted with missing or invalid fields (e.g., empty shipping address).",
"max_score": 10
},
{
"name": "beforeEach test isolation",
"description": "Each describe block uses beforeEach() to set up state independently (visit page, stub APIs) so no test depends on state from a previous test.",
"max_score": 10
},
{
"name": "No arbitrary waits",
"description": "The agent does not use cy.wait(ms) with a numeric delay. All waits use cy.wait('@alias') or rely on Cypress assertion retryability.",
"max_score": 10
},
{
"name": "Error state coverage",
"description": "At least one test stubs an API error response (e.g., order creation fails with 500) and verifies the app displays an appropriate error message.",
"max_score": 8
},
{
"name": "baseUrl in config",
"description": "cypress.config.ts sets baseUrl and tests use relative paths in cy.visit() rather than hardcoding the full URL.",
"max_score": 6
},
{
"name": "Empty cart state tested",
"description": "At least one test verifies the empty cart state (no items) displays an appropriate message or empty state UI.",
"max_score": 4
}
]
}