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

cypress-ecommerce-checkout.jsonverifiers/

{
  "instruction": "Write E2E tests for a shopping cart and checkout flow in an e-commerce app",
  "relevant_when": "Agent writes Cypress E2E tests for e-commerce features like product listing, cart management, or checkout",
  "context": "Proactively verify that agents apply Cypress best practices when testing e-commerce flows. The scenario involves browsing products, adding to cart, filling checkout form, and submitting an order. The agent should use cy.intercept() for API mocking, data-testid selectors, beforeEach isolation, custom commands for repeated flows, and handle both success and error states.",
  "sources": [
    {
      "type": "file",
      "filename": "skills/cypress-testing/SKILL.md",
      "tile": "tessl-labs/cypress-testing"
    }
  ],
  "checklist": [
    {
      "name": "intercept-product-api",
      "rule": "Agent uses cy.intercept() to stub the product listing API with fixture data or inline body, aliased with .as() and awaited with cy.wait('@alias')",
      "relevant_when": "Agent writes Cypress tests that load product data from an API"
    },
    {
      "name": "intercept-order-submission",
      "rule": "Agent uses cy.intercept() on the order/checkout POST endpoint, aliases it, and uses cy.wait('@alias') to verify the submission was made and check the response",
      "relevant_when": "Agent writes Cypress tests for checkout form submission"
    },
    {
      "name": "data-testid-selectors",
      "rule": "Agent uses data-testid or data-cy attributes for product cards, cart items, form fields, and submit button -- not CSS classes",
      "relevant_when": "Agent writes Cypress selectors for e-commerce UI elements"
    },
    {
      "name": "custom-command-for-cart",
      "rule": "Agent extracts repeated multi-step flows (e.g., adding item to cart, filling checkout form) into custom Cypress commands to avoid duplication across tests",
      "relevant_when": "Agent writes multiple Cypress tests that share common cart or checkout steps"
    },
    {
      "name": "beforeeach-isolation",
      "rule": "Agent uses beforeEach() with cy.visit() and necessary intercepts to ensure each test starts with a clean, known state",
      "relevant_when": "Agent writes a describe block with multiple e-commerce tests"
    },
    {
      "name": "error-state-stubbed",
      "rule": "Agent writes at least one test that stubs an API error (e.g., checkout failure with statusCode: 500) and verifies the UI shows an error message",
      "relevant_when": "Agent writes Cypress tests for checkout or cart operations"
    },
    {
      "name": "no-arbitrary-waits",
      "rule": "Agent does not use cy.wait(ms) with a numeric delay -- uses assertions like .should('be.visible') or cy.wait('@alias') instead",
      "relevant_when": "Agent writes Cypress tests with async operations"
    },
    {
      "name": "form-validation-tested",
      "rule": "Agent writes at least one test for form validation (e.g., submitting checkout with missing required fields) and asserts validation error is shown",
      "relevant_when": "Agent writes Cypress tests for checkout forms"
    }
  ]
}

tile.json