testing-conventions
CommunityUI testing conventions for Vitest + Playwright
Software Engineering#vitest#playwright#ui-testing#seed-data#test-isolation#testing-conventions#fake-indexeddb
Authoralexanderop
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill codifies standardized UI testing conventions for Vitest 4 + Playwright to improve test reliability, readability, and maintainability across modern web applications.
Core Features & Use Cases
- Query Priority: enforce a preferred order using page.getByRole, page.getByLabelText, page.getByText, and finally page.getByTestId
- Seed-Data Resilience: tests should not rely on fragile seed details; create controlled data as needed
- Realistic Flows: cover happy path and early finish scenarios to reflect actual user behavior
- Virtualized Lists: handle long lists with scrolling and off-screen elements
- Fake IndexedDB Isolation: ensure tests run in isolation without touching real storage
- Factories & Test Data: use factories to generate predictable, repeatable data
- Gotchas: remember to reset the database, use userEvent, and prefer locators over raw elements
Quick Start
Run a Vitest 4 + Playwright UI test following the query-priority rules and a seed data setup to demonstrate a realistic login/workflow.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: testing-conventions Download link: https://github.com/alexanderop/workoutTracker/archive/main.zip#testing-conventions Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.