frontend-test-workflow
Orchestrates a complete frontend testing workflow by combining qa-test-planner (strategy) and frontend-testing (implementation). Use this when you need to rigorously test a component or feature from scratch.
Install
mkdir -p .claude/skills/frontend-test-workflow && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14848" && unzip -o skill.zip -d .claude/skills/frontend-test-workflow && rm skill.zipInstalls to .claude/skills/frontend-test-workflow
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Orchestrates a complete frontend testing workflow by combining qa-test-planner (strategy) and frontend-testing (implementation). Use this when you need to rigorously test a component or feature from scratch.About this skill
Frontend Test Workflow Skill
This skill orchestrates the end-to-end process of adding high-quality tests to the Bloom Mindful Companion frontend. It chains the strategic planning of qa-test-planner with the tactical implementation of frontend-testing.
When to Use
Use this skill when:
- You need to add tests to a specific feature or component.
- You want to ensure tests cover edge cases and safety requirements (essential for mental health apps).
- You want a reliable, standardized process for testing.
Workflow Steps
Follow these steps sequentially. Do not skip the planning phase.
Phase 1: Strategy & Planning (qa-test-planner)
- Analyze the Target: Identify the component, hook, or flow to be tested.
- Trigger
qa-test-planner: Explicitly ask the planner to "Create a test plan for [Target]".- Prompt: "Using
qa-test-planner, create a test plan for the[Component/Feature]."
- Prompt: "Using
- Review the Plan: Ensure the plan covers:
- Happy Path: Standard usage.
- Edge Cases: Empty states, errors, loading.
- Safety/Privacy: PII handling, verified outcomes.
- Database State: If applicable (Supabase integration).
Phase 2: Implementation (frontend-testing)
- Refactor for Testability (If needed):
- Extract complex logic into pure utility functions (e.g.,
src/utils/). - Ensure components are isolated or mockable.
- Extract complex logic into pure utility functions (e.g.,
- Trigger
frontend-testing: Explicitly ask the testing skill to generate the code.- Prompt: "Using
frontend-testing, generate Vitest/RTL tests for[Component]following the test plan."
- Prompt: "Using
- Incremental Creation:
- Create
[Component].spec.tsx. - DO NOT generate all tests at once if complex. Start with rendering, then interaction.
- Create
Phase 3: Verification & Execution
- Run Tests:
- Command:
npm test src/path/to/test.spec.tsx
- Command:
- Fix & Iterate:
- If tests fail, analyze the failure.
- Adjust code or test expectations.
- Final Polish:
- Ensure no lint errors in test files.
- Verify 100% pass rate for the target.
Example Usage
"Run the frontend-test-workflow for the
EmergencySOScomponent."
Agent Action:
- Call
qa-test-plannerto list scenarios (Trigger: "Pressing SOS button", "Network failure during SOS"). - Call
frontend-testingto writeEmergencySOS.spec.tsx. - Run
npm testto verify.