e2e-test-writing
작성자: shopify
고품질 Playwright E2E 테스트를 Hydrogen용으로 작성하기 위한 가이드입니다. 사용자가 "e2e 테스트 작성", "playwright 테스트 추가", "이 기능 테스트…"를 요청할 때 사용하세요.
npx skills add https://github.com/shopify/hydrogen --skill e2e-test-writing/e2e-test-writing - E2E Test Writing for Hydrogen
Use this skill when implementing or reviewing Playwright E2E tests in this repository.
Syntax
/e2e-test-writing <task>
Examples:
/e2e-test-writing add recipe coverage for cart drawer quantity changes/e2e-test-writing review locator quality in e2e/tests/cart.test.ts
Source of Truth
- Follow
e2e/CLAUDE.mdfor all active test patterns and conventions. - Do not duplicate large guidance here; keep this skill as the entry point.
Core Expectations
- Prefer role-based, accessibility-first selectors.
- Assert user-visible behavior, not implementation details.
- Wait for visible effects (
expect,expect.poll), never arbitrary timeouts. - Keep tests isolated and organize shared setup with
beforeEachwhen it improves clarity. - Run Playwright tests in headless mode.
Workflow
- Read
e2e/CLAUDE.mdbefore writing tests. - Implement or update tests with user-centric assertions.
- Improve accessibility markup when it enables stronger locators.
- Run targeted Playwright tests first, then broader suites if needed.
Verification Commands
pnpm exec playwright test --project=skeleton
Use narrower test paths during iteration, then run the appropriate full project suite before finishing.