e2e-test-create

Generates Cypress E2E tests for Metabase by analyzing React component source code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing end-to-end tests for a large React application requires knowing exact DOM selectors, API calls, and project conventions, which is slow and error-prone when done by hand.

Core Features & Use Cases

  • Code-First Analysis: Reads React components in frontend/src/metabase/ to extract data-testid attributes, aria labels, visible text, and API calls before writing any test.
  • Convention-Aligned Generation: Produces Cypress specs that match existing patterns in e2e/test/scenarios/ and reuse shared helpers from e2e/support/helpers/.
  • Automated Validation Loop: Starts the Metabase backend, runs tests via the /e2e-test skill, fixes failures from screenshots and console output, and falls back to Playwright browser exploration only after two failed fix attempts.
  • Use Case: Ask for a test covering a new dashboard filter interaction, and receive a runnable Cypress spec that follows Metabase conventions and has been executed against a live backend.

Quick Start

Generate a Cypress E2E test for the dashboard filter component and run it against a local Metabase backend.

Frequently Asked Questions about e2e-test-create

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

FAQPage Schema
How do I write Cypress E2E tests for a React application?

Start by reading the React component source to extract data-testid attributes, aria labels, and event handlers, then write Cypress specs that reuse existing test helpers and intercept patterns. This skill automates that workflow for the Metabase codebase.

How do I find reliable selectors for Cypress tests?

Grep the component source for data-testid attributes and aria-label values rather than guessing from rendered output. Cross-reference existing specs in the same feature area to reuse proven selectors and cy.intercept patterns.

When should I use Playwright instead of Cypress for testing?

In this workflow, Playwright is only a fallback for debugging after two failed attempts to fix a Cypress test from screenshots and console output. It is used to observe live DOM behavior, not to author the final tests.

Why does my Cypress test fail against a local Metabase backend?

Common causes include stale test data, missing API intercepts, or selectors that do not match the component source. Restore clean data via the testing API, verify helpers exist in e2e/support/helpers, and check the failure screenshot.

Does this workflow support enterprise edition tests?

Yes, but the backend defaults to MB_EDITION=oss. Enterprise tests are only started with MB_EDITION=ee when the user explicitly requests an enterprise test.