playwright
Skill1 starsChanged 20 days agoApache-2.0View on GitHub
Write E2E tests for Yukta UI using Playwright and MSW mocking. Tests run against mocked APIs with no backend calls needed.
99 other projects use a version of this.
Adopted by
Most recently taken up by
- Floppa2003/skillstheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- tkbk-online/skillstheir own version, first seen Nov 15, 2026
- dovuthanhhien1609/claude-skillstheir own version, first seen Nov 15, 2026
- nicholasjconn/skillstheir own version, first seen Nov 15, 2026
- oberemokis/skillstheir own version, first seen Nov 15, 2026
Used with
Projects with it also use develop-web-game, msw and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
hebertzhuSkilldevelop-web-game
Use when building or iterating on a web game and you need a tight implement-test-observe loop; prefer the bundled Playwright client, inspect screenshots and text state, and validate every meaningful change before moving on.
Also in 4 projects that use this
thongdn-itSkillmsw
MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.
Also in 3 projects that use this
SupabaseSkillreact-hook-form
Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,
Also in 3 projects that use this
thongdn-itSkilltailwind
Tailwind CSS v4 performance optimization and best practices guidelines (formerly tailwindcss-v4-style). This skill should be used when writing, reviewing, or refactoring Tailwind CSS v4 code to ensure optimal build performance, minimal CSS output, and correct usage of v4 features. Triggers on tasks involving Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.
Also in 5 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 6 projects that use this
OpenAISkillweb-perf
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.
Also in 5 projects that use this
- +1 more from thongdn-it
Other versions99 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 99
- openai/openai-agents-python★ 31ksame name
- openai/skills★ 27ksame name
- prowler-cloud/prowler★ 15ksame name
- hyperdxio/hyperdx★ 10ksame name
- bluesky-social/atproto★ 9.7ksame name
- Kiln-AI/Kiln★ 5.3ksame name
- freestylefly/wesight★ 969same name
- Gram-ax/gramax★ 609same name
- JetBrains/skills★ 386same name
- Mindrally/skills★ 275same name
89 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- architecture/CLAUDE.mdCLAUDE.md
- boot/CLAUDE.mdCLAUDE.md
- build-logic/CLAUDE.mdCLAUDE.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- cli/CLAUDE.mdCLAUDE.md
- core/CLAUDE.mdCLAUDE.md
- mcp/CLAUDE.mdCLAUDE.md
- messaging/CLAUDE.mdCLAUDE.md
- plugin-api/CLAUDE.mdCLAUDE.md
- plugins/CLAUDE.mdCLAUDE.md
- plus/CLAUDE.mdCLAUDE.md
- ui/CLAUDE.mdCLAUDE.md
- web/CLAUDE.mdCLAUDE.md
- ide-index-mcpSkill
- pickupSkill
- testsSkill
- ticketSkill
- yuktaSkill
- yukta-supervisorSkill
- yukta-workflowsSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 83 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Write comprehensive E2E tests for the Yukta UI application using Playwright and MSW mocking.
- Very specific: line 121
Use page.waitForTimeout() — use semantic waits instead
- Distinctive: line 124
Use fragile selectors — prefer data-testid
- Very specific: line 127
Use semantic waits: waitForLoadingComplete(), waitForApiResponse()
- Very specific: line 128
Use fixture data: mockSessions
- Distinctive: line 130
Test user-visible behavior, not implementation
- Distinctive: line 150
Follow patterns from Core Patterns section above
- Distinctive: line 156
Add handler following existing pattern (timestamp, status, data)
- Very specific: line 158
Use in tests: await waitForApiResponse(page, { url: '/api/new' })
“Common” is measured: kept by at least 6 in 10 of the 83 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright E2E Testing Skill
Write comprehensive E2E tests for the Yukta UI application using Playwright and MSW mocking.
Quick Reference
Test Data Available
// From fixtures
mockSessions: [
{ sessionId: 'session-1', name: 'Build Pipeline', ... },
{ sessionId: 'session-2', name: 'Code Review', ... },
{ sessionId: 'session-3', name: 'Data Pipeline', ... },
]Essential Utilities
import { test, expect } from '../fixtures';
import {
waitForApiResponse,
fillForm,
waitForLoadingComplete,
getTableRow,
countTableRows,
assertTableColumns,
clickAndWait,
getTextContent,
} from '../utils';Common Commands
pnpm test:e2e # All tests
pnpm test:e2e tests/file.spec.ts # Specific file
pnpm test:e2e --grep "pattern" # Match pattern
pnpm test:e2e --headed # See browser
pnpm test:e2e --debug # Interactive debugCore Patterns
List Page Test
test('should display sessions', async ({ page, mockSessions }) => {
await page.goto('/');
await waitForLoadingComplete(page);
const rowCount = await countTableRows(page);
expect(rowCount).toBe(mockSessions.length);
});API Error Test
test('should handle error', async ({ page }) => {
// Register waiter BEFORE navigation
const responsePromise = waitForApiResponse(page, { url: '/api/sessions/summaries' });
// Then navigate
await page.goto('/?error=true');
// Await the response
const response = await responsePromise;
expect(response.status()).toBe(500);
});Form Test
test('should submit form', async ({ page }) => {
await fillForm(page, { 'Name': 'Session', 'Description': 'Test' });
await clickAndWait(page, 'button[type="submit"]', {
waitForResponse: '/api/sessions',
});
});Navigation Test
test('should navigate to details', async ({ page }) => {
const row = await getTableRow(page, 'Build Pipeline');
await clickAndWait(page, row.locator('a'), {
waitForUrl: '/sessions/**',
});
});Selector Priority
- data-testid (most stable)
page.locator('[data-testid="submit"]') - Accessible roles
page.getByRole('button', { name: 'Submit' }) - Labels
page.getByLabel('Email') - Text (last resort)
page.getByText('Sessions')
Critical Rules
❌ NEVER
- Use
page.waitForTimeout()— use semantic waits instead - Hardcode test data — use
mockSessionsfixture - Depend on test order — each test must be independent
- Use fragile selectors — prefer data-testid
✅ ALWAYS
- Use semantic waits:
waitForLoadingComplete(),waitForApiResponse() - Use fixture data:
mockSessions - Setup in
beforeEach()— avoid repetition - Test user-visible behavior, not implementation
File Structure
e2e/
├── fixtures.ts # Test data & imports
├── utils.ts # 15+ helper functions
├── mocks/handlers.ts # API mocks (extensible)
└── tests/
├── session-list.spec.ts # Reference: 26 tests
├── error-handling.spec.ts # Reference: 8 tests
└── theme.spec.ts # Reference: 6 testsWorkflow
Writing New Tests
- Create file:
e2e/tests/feature-name.spec.ts - Copy template from
e2e/tests/session-list.spec.ts - Follow patterns from Core Patterns section above
- Run:
pnpm test:e2e tests/feature-name.spec.ts --headed - Debug with
--debugif failing
Adding API Endpoints
- Open:
e2e/mocks/handlers.ts - Add handler following existing pattern (timestamp, status, data)
- Export in handlers array (automatic)
- Use in tests:
await waitForApiResponse(page, { url: '/api/new' })
Application Routes
/— Session list (main page)/sessions/:id— Session details/sessions/:id/workflow/:wid— Workflow view/control— Control bus/history— History
Test Checklist
- Test name describes expected behavior
- Setup in
beforeEach(), not repeated - Uses
mockSessionsfixture, not hardcoded - Uses semantic waits (no
waitForTimeout) - Uses stable selectors (data-testid preferred)
- Specific assertions (not generic checks)
- Test is independent (no dependencies)
- Error scenarios covered (if applicable)
- Runs in < 5 seconds
- Passes locally:
pnpm test:e2e --grep "name"
Screenshot Tests
Visual regression testing included in e2e/tests/screenshots.spec.ts:
# Run only screenshot tests
pnpm test:e2e screenshots.spec.ts
# Update baseline screenshots
UPDATE_SNAPSHOTS=true pnpm test:e2e screenshots.spec.ts
# View screenshot diffs
pnpm exec playwright show-reportCovers:
- Full page layout (desktop, tablet, mobile)
- Dark/light mode themes
- Component states (hover, error, empty)
- Responsive breakpoints
- UI component details
Stored in: e2e/__snapshots__/
CI Integration
Tests run automatically when PR changes ui/ module:
- Triggered by GitHub Actions on PR
- Fails if screenshots don't match baseline (use
UPDATE_SNAPSHOTS=trueto update) - Results posted to PR comments
- Reports uploaded as artifacts
Reference Files
- Guide:
ui/.claude/playwright-testing-guide.md— Detailed patterns - Examples:
e2e/tests/session-list.spec.ts— 26 reference tests - Screenshots:
e2e/tests/screenshots.spec.ts— Visual regression tests - Utilities:
e2e/utils.ts— All helper functions with docs - Handlers:
e2e/mocks/handlers.ts— API mocks (extensible) - Fixtures:
e2e/fixtures.ts— Test data setup - Config:
playwright.config.ts— Framework settings
Session Model
interface SessionListItem {
sessionId: string;
name: string;
description: string;
initiator: string;
tags: string[];
projectPath: string;
workflowCount: number;
}API Response Format
All mocked responses:
{
timestamp: string, // ISO format
status: number, // 200, 201, 500, etc
message: string, // Human readable
path: string, // Request path
data: T, // Actual response data ← use this
error?: string,
errors?: Record<string, string[]>,
}Debugging
# Interactive step-through
pnpm test:e2e --debug
# See browser + slow motion
pnpm test:e2e --headed --slow-mo=1000
# View HTML report
pnpm exec playwright show-report
# Specific test only
pnpm test:e2e --grep "exact test name"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

