e2e-test-review

Reviews Cypress E2E spec files for Metabase conventions, flakiness, and performance issues.

49.0k|6.8k|Updated Feb 2, 2015
One-click install
npx skills add https://github.com/metabase/metabase --skill e2e-test-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2e-test-review
Source: https://github.com/metabase/metabase/tree/main/.claude/skills/e2e-test-review
Command: npx skills add https://github.com/metabase/metabase --skill e2e-test-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing Cypress end-to-end test specs by hand is slow and inconsistent — reviewers miss flaky patterns like numeric waits, unscoped text selectors, and hardcoded IDs, and rarely assess whether a test should be an e2e test at all. This Skill applies a structured checklist and pattern table to catch convention violations, flakiness risks, and wasted CI time in every review.

Core Features & Use Cases

  • Convention and anti-pattern review: Scans specs against a detailed checklist covering selectors, helpers, waits, assertions, cy.within usage, and Cypress framework anti-patterns, with a quick-scan pattern matching table.
  • Dual review modes: Posts issues as a cohesive pending GitHub PR review when MCP GitHub tools are available, or outputs a numbered issue list for local reviews.
  • E2E-vs-unit cost analysis: Every report ends with an honest breakdown of which tests genuinely need a browser plus backend and which belong in cheaper Jest + RTL unit tests, grounded in CI timing data from e2e/support/timings.json.
  • Use Case: When reviewing a pull request that adds a new spec under e2e/test/scenarios/, invoke this Skill to get numbered, actionable issues plus a recommendation on which tests to push down to the unit layer.

Quick Start

Review the Cypress spec changes in this pull request for Metabase e2e conventions, flakiness risks, and whether each test belongs in e2e.

Frequently Asked Questions about e2e-test-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Cypress e2e tests for flakiness?

Scan for numeric cy.wait() calls, intercepts placed after the triggering action, unscoped text selectors, negative-only assertions, and long custom timeouts. This Skill applies a full checklist and pattern table to flag these flakiness risks automatically.

What Cypress selector patterns should be avoided in tests?

Avoid generated CSS classes, raw data-testid attribute selectors, XPath, and unguarded positional selectors like .eq() or :nth-child. Prefer accessibility queries such as findByRole and findByLabelText, with findByTestId for test IDs.

When should a test be a unit test instead of a Cypress e2e test?

A test belongs in Jest + RTL when it only asserts element existence, pure frontend logic, or component state wiring without real backend interaction. E2e is justified only for real backend queries, chart interaction, routing, or cross-screen traversal.

Can this review post comments directly on a GitHub pull request?

Yes, when the GitHub MCP tools are available it creates a pending pull request review, adds each issue as a separate comment, and submits it as a COMMENT event. Otherwise it outputs a numbered issue list locally.

What are the limitations of automated Cypress spec review?

The review does not fetch external issue context or fix flakiness itself; that belongs to a dedicated flake-fixing workflow. It also skips formatting concerns handled by ESLint and Prettier, flagging lint-covered patterns only when they slip through.