Skip to content

Reliable Cypress E2E and component testing patterns for stable, low-flake browser suites.

CCM score
61 of 100
skills.sh installs
672
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers stable selectors, deterministic waiting, network stubbing with cy.intercept, and cached authentication via cy.session
  • Includes component testing with cy.mount alongside CI guidance for artifacts, retries, and Cypress Cloud parallelization
  • Enforces no fixed sleeps, no deep CSS selectors, and separation of stubbed tests from real-backend smoke tests
  • Designed for teams debugging flaky UI tests or adding browser-level E2E coverage to a modern frontend

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill cypress -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Cypress (E2E + Component Testing)

Overview

Cypress runs browser automation with first-class network control, time-travel debugging, and a strong local dev workflow. Use it for critical path E2E tests and for component tests when browser-level rendering matters.

Quick Start

Install and open

npm i -D cypress
npx cypress open

Minimal spec

// cypress/e2e/health.cy.ts
describe("health", () => {
  it("loads", () => {
    cy.visit("/");
    cy.contains("Hello").should("be.visible");
  });
});

Core Patterns

1) Stable selectors

Prefer data-testid (or data-cy) attributes for selectors. Avoid brittle CSS chains and text-only selectors for critical interactions.

<button data-testid="save-user">Save</button>
cy.get('[data-testid="save-user"]').click();

2) Deterministic waiting (avoid fixed sleeps)

Wait on app-visible conditions or network aliases rather than cy.wait(1000).

cy.intercept("GET", "/api/users/*").as("getUser");
cy.visit("/users/1");
cy.wait("@getUser");
cy.get('[data-testid="user-email"]').should("not.be.empty");

3) Network control with cy.intercept

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Testing & QA, Frontend & UI Code
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Cypress

More Testing & QA