Stats
Actions
Tags
From adlc-team
Generate Playwright UI tests from BDD scenarios. Shared by DEV (happy path) and QA (edge cases). Trigger: 'UI tests for [FEAT-ID]', 'Playwright tests', 'behavior tests', 'e2e tests'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adlc-team:shared-write-ui-testsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<context>
CRITICAL: The enforce-worktree hook will DENY test file edits from main conversation. You MUST spawn an agent.
Read:
.sdlc/specs/[FEAT-ID]-*-spec.md — acceptance criteria.sdlc/domain-terms.md — use correct terminologyAsk the user:
Plan the test list:
Tests to write:
1. [FEAT-ID] AC-001: [happy path behavior]
2. [FEAT-ID] AC-002: [happy path behavior]
3. [FEAT-ID] Edge: [error state]
...
Choose agent based on mode:
Spawn Agent:
type: general-purpose
model: sonnet
isolation: worktree
prompt: |
You are writing Playwright UI tests for [FEAT-ID].
## Tests to write
[paste planned test list from Phase 1]
## Selector strategy (in priority order)
1. data-testid attributes (preferred)
2. ARIA roles: page.getByRole('button', { name: 'Submit' })
3. Text content: page.getByText('Welcome')
4. Placeholder: page.getByPlaceholder('Enter email')
5. NEVER use CSS selectors, XPath, or DOM structure
## Test structure
- File: tests/e2e/[FEAT-ID].spec.ts (or match existing convention)
- Naming: test('[FEAT-ID] AC-[N]: [behavior]', ...)
- Format: Arrange (Given) → Act (When) → Assert (Then)
## After writing
1. Run: npx playwright test tests/e2e/[FEAT-ID].spec.ts
2. If components need data-testid attributes, list them:
"[component] needs data-testid='[id]'"
3. Update .sdlc/specs/[FEAT-ID]-registry.json:
Set test_function and passes for each AC tested
## Report back with:
- Tests written (names and file paths)
- Test results (pass/fail)
- Missing data-testid attributes (if any)
- Registry updates made
After agent completes:
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub obacker/claude-code-plugins --plugin adlc-team