跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

react-quality-engineering

Design, write, run, and review tests for React, Next.js, or Vite frontends. Use for Vitest/Jest, React Testing Library, MSW, Playwright, E2E, accessibility testing, visual regression, responsive/adversarial UI testing, flaky tests, test data, CI quality gates, or frontend verification plans.

Taimoor Khan · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add Taimoorkhan1122/boring-react --skill react-quality-engineering

技能说明


name: react-quality-engineering description: Design, write, run, and review tests for React, Next.js, or Vite frontends. Use for Vitest/Jest, React Testing Library, MSW, Playwright, E2E, accessibility testing, visual regression, responsive/adversarial UI testing, flaky tests, test data, CI quality gates, or frontend verification plans. license: MIT compatibility: React projects with Node-based test tooling; Playwright guidance applies when browser automation is configured. metadata: author: Taimoor Khan version: "1.0.0"

React Quality Engineering

Verify user-observable behavior with the cheapest reliable test layer. Do not make implementation details the contract.

Apply react-production-engineering for architecture and react-component-engineering for semantic/accessibility implementation.

Workflow

  1. Identify the behavior/risk and choose the lowest-cost test layer that can prove it.
  2. Reuse the repository's test stack and conventions.
  3. Test success plus meaningful empty/error/pending/permission/race states.
  4. Use user-facing locators and realistic interactions.
  5. For browser tests, rely on readiness assertions and isolation—not sleeps.
  6. Add accessibility and responsive/adversarial coverage for important UI.
  7. Diagnose flaky tests at the root cause before adding retries.
  8. Report what was executed, what failed, and what remains unverified.

Test layer selection

  • Unit: pure domain/format/validation logic.
  • Component: React Testing Library for rendered behavior and interaction.
  • Integration: component + MSW for network states and mutations.
  • E2E: Playwright for critical user journeys and browser integration.
  • Manual: keyboard/screen-reader-critical behavior and subjective visual hierarchy.

Do not duplicate every assertion across every layer.

Non-negotiable rules

  • Test behavior, not private functions, internal state, component tree shape, or arbitrary CSS selectors.
  • Prefer role + accessible name, then label/text; use test IDs only when a user-facing locator is unsuitable.
  • Do not fix Playwright timing with arbitrary waitForTimeout sleeps.
  • Do not use networkidle as a universal readiness signal.
  • Keep E2E tests independently runnable and data-isolated.
  • Prefer MSW over mocking fetch/Axios internals for frontend network behavior.
  • Automated accessibility checks do not prove WCAG conformance; important flows need keyboard/manual verification.
  • Never update visual snapshots blindly to make CI green.
  • Retries are a safety net after diagnosis, not a root-cause fix.

When to load references

  • Test pyramid/coverage choice: references/testing-strategy.md
  • React Testing Library: references/testing-library.md
  • MSW/network states: references/msw.md
  • Playwright/E2E: references/playwright.md
  • Accessibility testing: references/accessibility-testing.md
  • Visual/responsive testing: references/visual-regression.md
  • Flakiness diagnosis: references/flaky-tests.md
  • CI/release gates: references/ci-quality-gates.md

Completion contract

If tests cannot be run, provide the exact intended verification and mark it not run. Never imply green CI from code inspection alone.