CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/cypress-testing

Cypress E2E testing patterns -- selectors, cy.intercept, cy.session, cy.clock, custom commands, test isolation, and anti-patterns

98

1.25x
Quality

99%

Does it follow best practices?

Impact

97%

1.25x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-3/

{
  "context": "Tests whether the agent proactively uses cy.clock()/cy.tick() for debounce testing, cy.intercept() for API stubbing, and avoids conditional testing when writing E2E tests for a search page. The task describes only business requirements -- it does not mention time control APIs or Cypress patterns.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "cy.clock and cy.tick for debounce",
      "description": "The agent uses cy.clock() and cy.tick() to control time and test the debounce behavior deterministically, rather than using cy.wait(ms) or relying on real-time delays.",
      "max_score": 18
    },
    {
      "name": "cy.intercept with aliases for search API",
      "description": "The agent uses cy.intercept() with .as() aliases for the search endpoint and waits with cy.wait('@alias') before asserting on search results.",
      "max_score": 14
    },
    {
      "name": "No conditional testing",
      "description": "The agent does not use if/else based on DOM state (e.g., checking if results exist before asserting). Each test has a single deterministic path with explicit assertions.",
      "max_score": 12
    },
    {
      "name": "Empty state tested",
      "description": "At least one test stubs the search API to return an empty array and verifies the empty state message is displayed.",
      "max_score": 10
    },
    {
      "name": "data-testid selectors",
      "description": "The agent uses data-testid or data-cy attributes for selecting the search input, filter dropdown, result cards, and empty state -- not CSS class selectors.",
      "max_score": 10
    },
    {
      "name": "Fixture data for deterministic results",
      "description": "The agent uses fixture files or inline body objects with cy.intercept() to return deterministic search results rather than relying on live API data.",
      "max_score": 8
    },
    {
      "name": "beforeEach test isolation",
      "description": "Each test uses beforeEach() to set up state independently (visit page, set up clock, stub APIs) so no test depends on state from a previous test.",
      "max_score": 8
    },
    {
      "name": "No arbitrary waits",
      "description": "The agent does not use cy.wait(ms) with a numeric delay for any purpose. All timing is handled via cy.clock()/cy.tick() or cy.wait('@alias').",
      "max_score": 10
    },
    {
      "name": "Filter interaction tested",
      "description": "At least one test verifies that selecting a category filter triggers a new search request with the selected category parameter.",
      "max_score": 6
    },
    {
      "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": 4
    }
  ]
}

evals

tile.json