@athenaflow/plugin-e2e-test-builder 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +20 -0
- package/.codex-plugin/plugin.json +15 -0
- package/dist/2.0.8/.agents/plugins/marketplace.json +14 -0
- package/dist/2.0.8/claude/plugin/.claude-plugin/plugin.json +20 -0
- package/dist/2.0.8/claude/plugin/package.json +9 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/SKILL.md +217 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/agents/claude.yaml +1 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/references/authentication.md +8 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/references/error-recovery.md +43 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/references/scaffolding.md +12 -0
- package/dist/2.0.8/claude/plugin/skills/add-e2e-tests/references/tracker-template.md +53 -0
- package/dist/2.0.8/claude/plugin/skills/analyze-test-codebase/SKILL.md +142 -0
- package/dist/2.0.8/claude/plugin/skills/analyze-test-codebase/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/analyze-test-codebase/agents/openai.yaml +4 -0
- package/dist/2.0.8/claude/plugin/skills/fix-flaky-tests/SKILL.md +160 -0
- package/dist/2.0.8/claude/plugin/skills/fix-flaky-tests/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/fix-flaky-tests/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/fix-flaky-tests/references/fix-patterns.md +91 -0
- package/dist/2.0.8/claude/plugin/skills/generate-test-cases/SKILL.md +184 -0
- package/dist/2.0.8/claude/plugin/skills/generate-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/generate-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/generate-test-cases/references/scenario-categories.md +36 -0
- package/dist/2.0.8/claude/plugin/skills/plan-test-coverage/SKILL.md +116 -0
- package/dist/2.0.8/claude/plugin/skills/plan-test-coverage/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/plan-test-coverage/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/review-test-cases/SKILL.md +147 -0
- package/dist/2.0.8/claude/plugin/skills/review-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/review-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/review-test-code/SKILL.md +189 -0
- package/dist/2.0.8/claude/plugin/skills/review-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/review-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/SKILL.md +227 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/references/anti-patterns.md +88 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/references/api-setup-teardown.md +83 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/references/auth-patterns.md +63 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/references/mapping-tables.md +56 -0
- package/dist/2.0.8/claude/plugin/skills/write-test-code/references/network-interception.md +56 -0
- package/dist/2.0.8/codex/plugin/.codex-plugin/plugin.json +15 -0
- package/dist/2.0.8/codex/plugin/package.json +9 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/SKILL.md +217 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/agents/claude.yaml +1 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/references/authentication.md +8 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/references/error-recovery.md +43 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/references/scaffolding.md +12 -0
- package/dist/2.0.8/codex/plugin/skills/add-e2e-tests/references/tracker-template.md +53 -0
- package/dist/2.0.8/codex/plugin/skills/analyze-test-codebase/SKILL.md +142 -0
- package/dist/2.0.8/codex/plugin/skills/analyze-test-codebase/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/analyze-test-codebase/agents/openai.yaml +4 -0
- package/dist/2.0.8/codex/plugin/skills/fix-flaky-tests/SKILL.md +160 -0
- package/dist/2.0.8/codex/plugin/skills/fix-flaky-tests/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/fix-flaky-tests/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/fix-flaky-tests/references/fix-patterns.md +91 -0
- package/dist/2.0.8/codex/plugin/skills/generate-test-cases/SKILL.md +184 -0
- package/dist/2.0.8/codex/plugin/skills/generate-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/generate-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/generate-test-cases/references/scenario-categories.md +36 -0
- package/dist/2.0.8/codex/plugin/skills/plan-test-coverage/SKILL.md +116 -0
- package/dist/2.0.8/codex/plugin/skills/plan-test-coverage/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/plan-test-coverage/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/review-test-cases/SKILL.md +147 -0
- package/dist/2.0.8/codex/plugin/skills/review-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/review-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/review-test-code/SKILL.md +189 -0
- package/dist/2.0.8/codex/plugin/skills/review-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/review-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/SKILL.md +227 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/references/anti-patterns.md +88 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/references/api-setup-teardown.md +83 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/references/auth-patterns.md +63 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/references/mapping-tables.md +56 -0
- package/dist/2.0.8/codex/plugin/skills/write-test-code/references/network-interception.md +56 -0
- package/dist/2.0.8/release.json +18 -0
- package/dist/2.0.9/.agents/plugins/marketplace.json +14 -0
- package/dist/2.0.9/claude/plugin/.claude-plugin/plugin.json +20 -0
- package/dist/2.0.9/claude/plugin/package.json +9 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/SKILL.md +215 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/references/authentication.md +8 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/references/error-recovery.md +43 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/references/scaffolding.md +12 -0
- package/dist/2.0.9/claude/plugin/skills/add-e2e-tests/references/tracker-template.md +53 -0
- package/dist/2.0.9/claude/plugin/skills/analyze-test-codebase/SKILL.md +142 -0
- package/dist/2.0.9/claude/plugin/skills/analyze-test-codebase/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/analyze-test-codebase/agents/openai.yaml +4 -0
- package/dist/2.0.9/claude/plugin/skills/fix-flaky-tests/SKILL.md +160 -0
- package/dist/2.0.9/claude/plugin/skills/fix-flaky-tests/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/fix-flaky-tests/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/fix-flaky-tests/references/fix-patterns.md +91 -0
- package/dist/2.0.9/claude/plugin/skills/generate-test-cases/SKILL.md +184 -0
- package/dist/2.0.9/claude/plugin/skills/generate-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/generate-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/generate-test-cases/references/scenario-categories.md +36 -0
- package/dist/2.0.9/claude/plugin/skills/plan-test-coverage/SKILL.md +117 -0
- package/dist/2.0.9/claude/plugin/skills/plan-test-coverage/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/plan-test-coverage/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/review-test-cases/SKILL.md +147 -0
- package/dist/2.0.9/claude/plugin/skills/review-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/review-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/review-test-code/SKILL.md +189 -0
- package/dist/2.0.9/claude/plugin/skills/review-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/review-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/SKILL.md +227 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/references/anti-patterns.md +88 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/references/api-setup-teardown.md +83 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/references/auth-patterns.md +63 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/references/mapping-tables.md +56 -0
- package/dist/2.0.9/claude/plugin/skills/write-test-code/references/network-interception.md +56 -0
- package/dist/2.0.9/codex/plugin/.codex-plugin/plugin.json +15 -0
- package/dist/2.0.9/codex/plugin/package.json +9 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/SKILL.md +215 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/references/authentication.md +8 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/references/error-recovery.md +43 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/references/scaffolding.md +12 -0
- package/dist/2.0.9/codex/plugin/skills/add-e2e-tests/references/tracker-template.md +53 -0
- package/dist/2.0.9/codex/plugin/skills/analyze-test-codebase/SKILL.md +142 -0
- package/dist/2.0.9/codex/plugin/skills/analyze-test-codebase/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/analyze-test-codebase/agents/openai.yaml +4 -0
- package/dist/2.0.9/codex/plugin/skills/fix-flaky-tests/SKILL.md +160 -0
- package/dist/2.0.9/codex/plugin/skills/fix-flaky-tests/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/fix-flaky-tests/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/fix-flaky-tests/references/fix-patterns.md +91 -0
- package/dist/2.0.9/codex/plugin/skills/generate-test-cases/SKILL.md +184 -0
- package/dist/2.0.9/codex/plugin/skills/generate-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/generate-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/generate-test-cases/references/scenario-categories.md +36 -0
- package/dist/2.0.9/codex/plugin/skills/plan-test-coverage/SKILL.md +117 -0
- package/dist/2.0.9/codex/plugin/skills/plan-test-coverage/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/plan-test-coverage/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/review-test-cases/SKILL.md +147 -0
- package/dist/2.0.9/codex/plugin/skills/review-test-cases/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/review-test-cases/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/review-test-code/SKILL.md +189 -0
- package/dist/2.0.9/codex/plugin/skills/review-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/review-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/SKILL.md +227 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/agents/claude.yaml +3 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/agents/openai.yaml +10 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/references/anti-patterns.md +88 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/references/api-setup-teardown.md +83 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/references/auth-patterns.md +63 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/references/mapping-tables.md +56 -0
- package/dist/2.0.9/codex/plugin/skills/write-test-code/references/network-interception.md +56 -0
- package/dist/2.0.9/release.json +18 -0
- package/package.json +13 -0
- package/skills/add-e2e-tests/SKILL.md +215 -0
- package/skills/add-e2e-tests/agents/claude.yaml +3 -0
- package/skills/add-e2e-tests/agents/openai.yaml +10 -0
- package/skills/add-e2e-tests/references/authentication.md +8 -0
- package/skills/add-e2e-tests/references/error-recovery.md +43 -0
- package/skills/add-e2e-tests/references/scaffolding.md +12 -0
- package/skills/add-e2e-tests/references/tracker-template.md +53 -0
- package/skills/analyze-test-codebase/SKILL.md +142 -0
- package/skills/analyze-test-codebase/agents/claude.yaml +3 -0
- package/skills/analyze-test-codebase/agents/openai.yaml +4 -0
- package/skills/fix-flaky-tests/SKILL.md +160 -0
- package/skills/fix-flaky-tests/agents/claude.yaml +3 -0
- package/skills/fix-flaky-tests/agents/openai.yaml +10 -0
- package/skills/fix-flaky-tests/references/fix-patterns.md +91 -0
- package/skills/generate-test-cases/SKILL.md +184 -0
- package/skills/generate-test-cases/agents/claude.yaml +3 -0
- package/skills/generate-test-cases/agents/openai.yaml +10 -0
- package/skills/generate-test-cases/references/scenario-categories.md +36 -0
- package/skills/plan-test-coverage/SKILL.md +117 -0
- package/skills/plan-test-coverage/agents/claude.yaml +3 -0
- package/skills/plan-test-coverage/agents/openai.yaml +10 -0
- package/skills/review-test-cases/SKILL.md +147 -0
- package/skills/review-test-cases/agents/claude.yaml +3 -0
- package/skills/review-test-cases/agents/openai.yaml +10 -0
- package/skills/review-test-code/SKILL.md +189 -0
- package/skills/review-test-code/agents/claude.yaml +3 -0
- package/skills/review-test-code/agents/openai.yaml +10 -0
- package/skills/write-test-code/SKILL.md +227 -0
- package/skills/write-test-code/agents/claude.yaml +3 -0
- package/skills/write-test-code/agents/openai.yaml +10 -0
- package/skills/write-test-code/references/anti-patterns.md +88 -0
- package/skills/write-test-code/references/api-setup-teardown.md +83 -0
- package/skills/write-test-code/references/auth-patterns.md +63 -0
- package/skills/write-test-code/references/mapping-tables.md +56 -0
- package/skills/write-test-code/references/network-interception.md +56 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-e2e-tests
|
|
3
|
+
description: >
|
|
4
|
+
THE DEFAULT ENTRY POINT for all Playwright / E2E test work. This skill should be used FIRST
|
|
5
|
+
whenever the user wants to add, create, or set up end-to-end tests for any feature, page, or
|
|
6
|
+
application. Runs the full pipeline: analyze codebase, explore the live site, plan coverage,
|
|
7
|
+
generate TC-ID specs, run quality-gate reviews, write production-grade test code, and execute.
|
|
8
|
+
Delegates to sub-skills (analyze-test-codebase, plan-test-coverage, generate-test-cases,
|
|
9
|
+
review-test-cases, write-test-code, review-test-code, fix-flaky-tests) internally — do NOT
|
|
10
|
+
skip to sub-skills directly unless the user explicitly requests a narrow activity.
|
|
11
|
+
Iterative and resumable via tracker file. Uses subagent delegation to save context.
|
|
12
|
+
allowed-tools: Read Write Edit Glob Grep Bash Task
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Add E2E Tests
|
|
16
|
+
|
|
17
|
+
Go from zero to passing Playwright tests for the target feature in one interactive session.
|
|
18
|
+
|
|
19
|
+
## Input
|
|
20
|
+
|
|
21
|
+
Parse the target URL and feature description from: $ARGUMENTS
|
|
22
|
+
|
|
23
|
+
Derive a **feature slug** from the feature description (e.g., "Login flow" → `login`, "Checkout with payment" → `checkout`). Use this slug for file naming throughout.
|
|
24
|
+
|
|
25
|
+
## Session Protocol
|
|
26
|
+
|
|
27
|
+
### 1. Orient: Understand the Project, the Product, and Your Capabilities
|
|
28
|
+
|
|
29
|
+
Before planning any work, build deep situational awareness. This step determines the quality of everything that follows — rushed orientation leads to missed test cases and wasted effort.
|
|
30
|
+
|
|
31
|
+
**Check for existing progress:**
|
|
32
|
+
- If `e2e-tracker.md` exists in the project root, read it and resume from where you left off — skip to **step 2 (Plan)** with the remaining work.
|
|
33
|
+
- If no tracker exists, this is a fresh start. Proceed with orientation below.
|
|
34
|
+
|
|
35
|
+
#### First: create initial tasks and tracker
|
|
36
|
+
|
|
37
|
+
As soon as you parse the user's request:
|
|
38
|
+
|
|
39
|
+
1. **Create the tracker** — write `e2e-tracker.md` with the goal (URL, feature, slug) and a skeleton plan.
|
|
40
|
+
2. **Create high-level tasks** for the work ahead — analyze codebase, explore the product, plan coverage, generate test specs, write tests, verify tests.
|
|
41
|
+
|
|
42
|
+
These are your starting skeleton. As you work through orientation and discover the actual shape of the work, refine both the tasks and the tracker — break tasks into granular sub-tasks, add new ones, remove ones that don't apply.
|
|
43
|
+
|
|
44
|
+
Treat the task list as a visible milestone log. Keep it concise, but update it continuously. Do not leave broad tasks open until the end and then mark everything complete in one batch.
|
|
45
|
+
|
|
46
|
+
#### 1a. Understand the codebase
|
|
47
|
+
|
|
48
|
+
- Does a Playwright config exist (`playwright.config.{ts,js,mjs}`)? If not, you will need to scaffold one (see Scaffolding section).
|
|
49
|
+
- Are there existing tests? What conventions do they follow — naming, locators, fixtures, page objects, auth?
|
|
50
|
+
- Load the `analyze-test-codebase` skill and follow its methodology.
|
|
51
|
+
|
|
52
|
+
#### 1b. Understand the product
|
|
53
|
+
|
|
54
|
+
This is the most important part of orientation. You cannot write good tests for a product you don't understand.
|
|
55
|
+
|
|
56
|
+
- **Read existing test cases** — if `test-cases/*.md` files exist, read them to understand what journeys have been mapped. Look at what's covered AND what's missing.
|
|
57
|
+
- **Browse the actual product** — load the `agent-web-interface-guide` skill and use the browser MCP tools to walk through the feature you're testing. Don't just skim the page — interact with it as a user would: fill forms, click buttons, trigger validation, navigate between pages, check error states.
|
|
58
|
+
- **Map the user journey in detail** — understand the complete flow: entry points, happy paths, error paths, edge cases, what happens with invalid input, what happens when the user goes back, what conditional UI exists.
|
|
59
|
+
|
|
60
|
+
Why this matters: absent explicit exploration, agents tend to write tests based on assumptions about how a product works rather than how it actually works. The result is tests that target imaginary behavior or miss critical real behavior. Spending time here prevents both.
|
|
61
|
+
|
|
62
|
+
#### 1c. Know your skills
|
|
63
|
+
|
|
64
|
+
You have access to specialized skills that contain deep domain knowledge. Load the relevant skill before performing each activity — skills prevent improvisation and encode best practices.
|
|
65
|
+
|
|
66
|
+
| Activity | Skill |
|
|
67
|
+
|----------|-------|
|
|
68
|
+
| Analyzing test setup, config, conventions | `analyze-test-codebase` |
|
|
69
|
+
| Deciding what to test, coverage gaps, priorities | `plan-test-coverage` |
|
|
70
|
+
| Opening a URL, browsing, using browser MCP tools | `agent-web-interface-guide` |
|
|
71
|
+
| Creating TC-ID specs from site exploration | `generate-test-cases` |
|
|
72
|
+
| Reviewing TC-ID specs before implementation | `review-test-cases` |
|
|
73
|
+
| Writing, editing, or refactoring test code | `write-test-code` |
|
|
74
|
+
| Reviewing test code before execution signoff | `review-test-code` |
|
|
75
|
+
| Debugging test failures, checking stability | `fix-flaky-tests` |
|
|
76
|
+
|
|
77
|
+
Before doing a substantial activity, load the skill that covers that activity so you can follow its workflow rather than improvising.
|
|
78
|
+
|
|
79
|
+
#### 1d. Update the tracker with orientation findings
|
|
80
|
+
|
|
81
|
+
After orienting, update the tracker with what you learned about the codebase and product, conventions discovered, and your refined plan. The tracker must always answer these four questions for anyone reading it cold:
|
|
82
|
+
|
|
83
|
+
1. What is the goal?
|
|
84
|
+
2. What has been done?
|
|
85
|
+
3. What is remaining?
|
|
86
|
+
4. What should I do next?
|
|
87
|
+
|
|
88
|
+
See [references/tracker-template.md](references/tracker-template.md) for a concrete template.
|
|
89
|
+
|
|
90
|
+
### 2. Plan: Refine Tasks Into Granular Checkpoints
|
|
91
|
+
|
|
92
|
+
By now you have initial tasks and a tracker from step 1. Refine tasks into granular checkpoints. The plan should flow from what you learned during orientation, not from a fixed template.
|
|
93
|
+
|
|
94
|
+
#### Task granularity
|
|
95
|
+
|
|
96
|
+
Think in small checkpoints, not big phases. Each task should represent a concrete, verifiable unit of progress.
|
|
97
|
+
|
|
98
|
+
Too coarse: "Analyze codebase", "Write tests", "Verify tests"
|
|
99
|
+
|
|
100
|
+
Right granularity:
|
|
101
|
+
- "Read playwright.config.ts — extract baseURL, testDir, projects"
|
|
102
|
+
- "Read 2 existing test files — identify locator strategy and naming pattern"
|
|
103
|
+
- "Write conventions report to e2e-plan/conventions.md"
|
|
104
|
+
- "Navigate to /login — catalog all form fields, buttons, and validation messages"
|
|
105
|
+
- "Submit login form empty — record all validation error messages and their positions"
|
|
106
|
+
- "Submit login with invalid email format — record inline validation behavior"
|
|
107
|
+
- "Write TC-LOGIN-001: happy path login with valid credentials"
|
|
108
|
+
- "Write TC-LOGIN-002: login with empty email shows required field error"
|
|
109
|
+
- "Run login.spec.ts and record full output"
|
|
110
|
+
- "Fix TC-LOGIN-003: selector not found — browse page and re-extract selector"
|
|
111
|
+
- "Re-run login.spec.ts — verify fix didn't break other tests"
|
|
112
|
+
- "Check all TC-IDs from spec are present in test files"
|
|
113
|
+
|
|
114
|
+
**Never be conservative.** More tasks is better than fewer. If you discover new work mid-session (a test fails, a selector changed, a form has unexpected validation), add tasks dynamically. The task list is a living document that reflects the real state of the work.
|
|
115
|
+
|
|
116
|
+
Create tasks for verification steps too (running tests, checking coverage, browsing to confirm selectors), not just implementation.
|
|
117
|
+
|
|
118
|
+
Update task status as each checkpoint completes. A good pattern is: finish exploration and mark it complete, finish coverage/spec work and mark it complete, finish implementation and mark it complete, then finish review/execution and mark it complete. Do not keep all milestones open until session end.
|
|
119
|
+
|
|
120
|
+
### 3. Execute
|
|
121
|
+
|
|
122
|
+
Work through your tasks. Load the relevant skill before each activity.
|
|
123
|
+
|
|
124
|
+
#### Planning uses the browser heavily
|
|
125
|
+
|
|
126
|
+
When planning what to test (coverage planning, test case generation), use the browser extensively. Don't just catalog elements — interact with the product to discover:
|
|
127
|
+
- What validation messages appear for each field?
|
|
128
|
+
- What happens when you submit with missing data?
|
|
129
|
+
- What error states exist (network errors, empty states, permission errors)?
|
|
130
|
+
- What does the flow look like end-to-end, not just page-by-page?
|
|
131
|
+
- What edge cases exist (special characters, long inputs, rapid clicks)?
|
|
132
|
+
- What UI changes conditionally (loading states, disabled buttons, progressive disclosure)?
|
|
133
|
+
|
|
134
|
+
Every test case you generate should trace back to something you actually observed or deliberately triggered in the browser. This is how you avoid introducing useless test cases (testing imaginary behavior) and avoid missing important ones (behavior you didn't think to check).
|
|
135
|
+
|
|
136
|
+
#### Subagent delegation
|
|
137
|
+
|
|
138
|
+
Delegate heavy browser exploration and test writing to subagents when that saves context for orchestration, verification, and debugging. When delegating:
|
|
139
|
+
- Pass the relevant file paths (conventions, coverage plan, test specs)
|
|
140
|
+
- Instruct the subagent to invoke the appropriate skill (subagents inherit access to plugin skills)
|
|
141
|
+
- Specify concrete output expectations (file path, format, TC-ID conventions)
|
|
142
|
+
|
|
143
|
+
#### Quality gates
|
|
144
|
+
|
|
145
|
+
Two review gates and a test execution checkpoint are mandatory during execution. The review gates are review-only — they produce findings but do not modify files.
|
|
146
|
+
|
|
147
|
+
**Gate 1: Review test case specs** (after `generate-test-cases`, before `write-test-code`)
|
|
148
|
+
1. Load the `review-test-cases` skill and run it against `test-cases/<feature>.md`
|
|
149
|
+
2. If verdict is **NEEDS REVISION** — address all blockers in the spec before proceeding to implementation
|
|
150
|
+
3. If verdict is **PASS WITH WARNINGS** — address warnings if quick, otherwise note them and proceed
|
|
151
|
+
4. Record the review verdict in the tracker
|
|
152
|
+
|
|
153
|
+
**Gate 2: Review test code** (after `write-test-code`, before final test execution)
|
|
154
|
+
1. Load the `review-test-code` skill and run it against the implemented test files
|
|
155
|
+
2. If verdict is **NEEDS REVISION** — fix all blockers before running tests for signoff
|
|
156
|
+
3. If verdict is **PASS WITH WARNINGS** — fix warnings that affect stability, proceed with execution
|
|
157
|
+
4. Record the review verdict in the tracker
|
|
158
|
+
|
|
159
|
+
**Checkpoint: Test execution**
|
|
160
|
+
1. Run the tests: `npx playwright test <file> --reporter=list 2>&1`
|
|
161
|
+
2. Record full output — green test output is the only proof of correctness
|
|
162
|
+
3. If tests fail, load the `fix-flaky-tests` skill and follow its structured diagnostic approach. Do not guess-and-retry.
|
|
163
|
+
4. Maximum 3 fix-and-rerun cycles per test. If stuck after 3 cycles, record the diagnostic output in the tracker and move on.
|
|
164
|
+
|
|
165
|
+
**Test execution and coverage checks must never be delegated to subagents.** Run `npx playwright test` directly and record the output.
|
|
166
|
+
|
|
167
|
+
#### Update the tracker as you work
|
|
168
|
+
|
|
169
|
+
Do not wait until session end. After each meaningful chunk of progress (completing a step, discovering a blocker, producing an artifact), update the tracker. If your context window resets, only what's in the tracker survives.
|
|
170
|
+
|
|
171
|
+
Keep the tracker and task list synchronized. If you record progress in the tracker, update the corresponding task status in the same phase of work.
|
|
172
|
+
|
|
173
|
+
#### Error recovery
|
|
174
|
+
|
|
175
|
+
If infrastructure failures occur (browser MCP unavailable, clone failures, npm install errors), see [references/error-recovery.md](references/error-recovery.md) for diagnostic steps. General pattern: diagnose, attempt one known fix, if still stuck record in tracker and ask the user.
|
|
176
|
+
|
|
177
|
+
### 4. End of Session
|
|
178
|
+
|
|
179
|
+
Before exiting:
|
|
180
|
+
1. Ensure the tracker reflects all progress, discoveries, and blockers from this session
|
|
181
|
+
2. Write clear instructions for what the next session should do
|
|
182
|
+
3. If all work is complete and all tests pass with full TC-ID coverage: write `<!-- E2E_COMPLETE -->` as the last line of the tracker
|
|
183
|
+
4. If an unrecoverable blocker prevents progress: write `<!-- E2E_BLOCKED: reason -->` as the last line
|
|
184
|
+
|
|
185
|
+
Do not write terminal markers prematurely. Only after you are confident the work is truly done or truly stuck.
|
|
186
|
+
|
|
187
|
+
## Scaffolding
|
|
188
|
+
|
|
189
|
+
If Playwright is not set up in the target project, follow the procedure in [references/scaffolding.md](references/scaffolding.md) to clone the boilerplate, merge configuration, and install dependencies. Log all scaffolding steps in the tracker.
|
|
190
|
+
|
|
191
|
+
## Authentication
|
|
192
|
+
|
|
193
|
+
If the target feature requires login, follow [references/authentication.md](references/authentication.md). Key rule: never hardcode credentials — use environment variables or `storageState`.
|
|
194
|
+
|
|
195
|
+
## Principles
|
|
196
|
+
|
|
197
|
+
- **Skills carry the knowledge** — load the relevant skill before each activity; do not improvise
|
|
198
|
+
- **Subagent-driven** — delegate heavy browser and writing work to subagents to save context
|
|
199
|
+
- **Follow existing conventions** — match the project's test style, not a generic template
|
|
200
|
+
- **Traceable** — every test links back to a TC-ID from the spec
|
|
201
|
+
- **Use what the project provides** — if the scaffolded boilerplate includes Page Object Models (BasePage, pages/), path aliases (tsconfig paths), or utility modules, USE them in generated tests. Do not ship infrastructure that tests ignore. If a boilerplate file is unused after test generation, either integrate it or remove it — dead code in test infrastructure causes confusion.
|
|
202
|
+
- **No arbitrary waits** — use Playwright's built-in auto-wait and event-driven waits
|
|
203
|
+
- **API before UI for setup** — use API calls (`request` fixture) for test data; reserve UI for what you are verifying
|
|
204
|
+
- **Test failures, not just success** — every feature needs error path coverage
|
|
205
|
+
- **Artifacts live in standard locations** — `e2e-plan/` for analysis, `test-cases/` for specs, project test dir for test files
|
|
206
|
+
|
|
207
|
+
## Example Usage
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
Claude Code: /add-e2e-tests https://myapp.com/checkout Checkout flow with cart, shipping, and payment
|
|
211
|
+
Codex: $add-e2e-tests https://myapp.com/checkout Checkout flow with cart, shipping, and payment
|
|
212
|
+
|
|
213
|
+
Claude Code: /add-e2e-tests https://myapp.com/login User authentication including social login
|
|
214
|
+
Codex: $add-e2e-tests https://myapp.com/login User authentication including social login
|
|
215
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Run Full E2E Workflow"
|
|
3
|
+
short_description: "Orchestrate browser-led E2E work from exploration to verified tests"
|
|
4
|
+
default_prompt: "Run the full E2E workflow for this feature: maintain a concise progress tracker, explore the live product first, then plan, spec, review, implement, and verify the Playwright tests."
|
|
5
|
+
|
|
6
|
+
dependencies:
|
|
7
|
+
tools:
|
|
8
|
+
- type: "mcp"
|
|
9
|
+
value: "agent-web-interface"
|
|
10
|
+
description: "Browser automation MCP used to explore the site and verify flows"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Authentication Handling for E2E Tests
|
|
2
|
+
|
|
3
|
+
If the target feature requires login or any form of authentication:
|
|
4
|
+
|
|
5
|
+
1. **Check existing infrastructure** — look for existing test fixtures, environment variables, or auth setup files that already handle authentication. Load the `analyze-test-codebase` skill to find auth patterns.
|
|
6
|
+
2. **Ask the user if no auth setup exists** — request credentials or an auth strategy (stored auth state, API tokens, test accounts). Do not proceed with tests that require login until auth is resolved.
|
|
7
|
+
3. **Never hardcode credentials** — use environment variables, Playwright's `storageState`, or the project's existing auth fixture pattern.
|
|
8
|
+
4. **Handle mid-session auth discovery** — if you discover auth is needed mid-session (e.g., a page redirects to login), ask the user immediately and add auth setup as a prerequisite task.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Error Recovery for Infrastructure Failures
|
|
2
|
+
|
|
3
|
+
When infrastructure failures occur during E2E test building, follow the general pattern: diagnose, attempt one known fix, if still stuck record in tracker and ask the user.
|
|
4
|
+
|
|
5
|
+
## Browser MCP unavailable
|
|
6
|
+
|
|
7
|
+
The browser MCP server (`agent-web-interface`) must be running for site exploration.
|
|
8
|
+
|
|
9
|
+
1. Verify the MCP server is configured in the project (check `.mcp.json` or plugin config).
|
|
10
|
+
2. Ask the user to confirm the MCP server is running or to restart it.
|
|
11
|
+
3. If unreachable after user intervention, mark the session as blocked: `<!-- E2E_BLOCKED: browser MCP server unreachable -->`.
|
|
12
|
+
|
|
13
|
+
## Boilerplate clone fails
|
|
14
|
+
|
|
15
|
+
When `git clone git@github.com:lespaceman/playwright-typescript-e2e-boilerplate.git` fails:
|
|
16
|
+
|
|
17
|
+
1. Check if SSH keys are configured — the error will usually indicate `Permission denied (publickey)`.
|
|
18
|
+
2. Fall back to HTTPS: `git clone https://github.com/lespaceman/playwright-typescript-e2e-boilerplate.git`.
|
|
19
|
+
3. If both fail, ask the user to verify network access and GitHub authentication.
|
|
20
|
+
|
|
21
|
+
## npm install fails
|
|
22
|
+
|
|
23
|
+
1. Check the Node.js version — Playwright requires Node 18+. Run `node --version`.
|
|
24
|
+
2. Clear the npm cache: `npm cache clean --force`.
|
|
25
|
+
3. Check for lockfile conflicts — if both `package-lock.json` and `yarn.lock` exist, ask the user which package manager to use.
|
|
26
|
+
4. If dependency resolution fails, try `npm install --legacy-peer-deps` as a fallback.
|
|
27
|
+
|
|
28
|
+
## Playwright browser install fails
|
|
29
|
+
|
|
30
|
+
When `npx playwright install --with-deps chromium` fails:
|
|
31
|
+
|
|
32
|
+
1. Try installing just chromium without system deps: `npx playwright install chromium`.
|
|
33
|
+
2. Check permissions — on Linux, system dependency installation may require sudo.
|
|
34
|
+
3. If behind a corporate proxy, ask the user for proxy configuration.
|
|
35
|
+
4. As a last resort, ask the user to run the install command manually and confirm when done.
|
|
36
|
+
|
|
37
|
+
## General pattern
|
|
38
|
+
|
|
39
|
+
For any infrastructure failure not listed above:
|
|
40
|
+
|
|
41
|
+
1. **Diagnose** — read the error message carefully, check logs, identify the root cause.
|
|
42
|
+
2. **Attempt one known fix** — apply the most likely solution based on the error.
|
|
43
|
+
3. **If still stuck** — record the full error output and diagnostic steps taken in the tracker, then ask the user for help. Do not loop through multiple speculative fixes.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Scaffolding Playwright from Boilerplate
|
|
2
|
+
|
|
3
|
+
If Playwright is not set up in the target project, follow this procedure:
|
|
4
|
+
|
|
5
|
+
1. Clone `git@github.com:lespaceman/playwright-typescript-e2e-boilerplate.git` into a temporary directory.
|
|
6
|
+
2. Copy config, fixtures, pages, and utils into the project. Do not overwrite existing files.
|
|
7
|
+
3. Update `baseURL` to the target URL and remove example tests.
|
|
8
|
+
- **Test execution strategy:** If the project needs role-based or category-based test filtering, configure it via Playwright `--grep` tags or file naming conventions (`*.admin.spec.ts`), NOT via `testIgnore` regex patterns. A `testIgnore` regex becomes a maintenance trap — every new test file requires updating the regex. If the boilerplate includes a `testIgnore` regex, replace it with tag-based filtering.
|
|
9
|
+
4. Merge devDependencies into `package.json`.
|
|
10
|
+
5. Run `npm install && npx playwright install --with-deps chromium`.
|
|
11
|
+
6. Clean up the temp clone.
|
|
12
|
+
7. Log all scaffolding steps in the tracker.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Tracker Template: e2e-tracker.md
|
|
2
|
+
|
|
3
|
+
Use this as a starting template when creating the tracker file. Adapt sections as needed.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# E2E Test Tracker
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
|
|
12
|
+
- **URL:** https://myapp.com/checkout
|
|
13
|
+
- **Feature:** Checkout flow with cart, shipping, and payment
|
|
14
|
+
- **Slug:** checkout
|
|
15
|
+
|
|
16
|
+
## Progress
|
|
17
|
+
|
|
18
|
+
### Session 1 — 2026-04-01
|
|
19
|
+
|
|
20
|
+
- Analyzed codebase: Playwright 1.42, TypeScript, existing auth fixture in `tests/fixtures/auth.ts`
|
|
21
|
+
- Browsed checkout flow: 4-step wizard (cart review, shipping, payment, confirmation)
|
|
22
|
+
- Discovered 3 form validation states per step
|
|
23
|
+
- Generated test spec: `test-cases/checkout.md` with TC-CHECKOUT-001 through TC-CHECKOUT-012
|
|
24
|
+
- Review gate passed with warnings (TC-CHECKOUT-008 needs clarification on coupon edge case)
|
|
25
|
+
|
|
26
|
+
### Session 2 — 2026-04-02
|
|
27
|
+
|
|
28
|
+
- Wrote `tests/checkout.spec.ts` covering TC-CHECKOUT-001 through TC-CHECKOUT-012
|
|
29
|
+
- Code review gate passed
|
|
30
|
+
- Ran tests: 10/12 passing, 2 failing (TC-CHECKOUT-006: selector stale, TC-CHECKOUT-011: timeout)
|
|
31
|
+
- Fixed TC-CHECKOUT-006: updated selector from `.price` to `[data-testid="cart-total"]`
|
|
32
|
+
- Fixed TC-CHECKOUT-011: added `waitForResponse` before assertion
|
|
33
|
+
|
|
34
|
+
## Remaining
|
|
35
|
+
|
|
36
|
+
- Re-run full suite to confirm fixes
|
|
37
|
+
- Verify TC-ID coverage: all 12 specs should map to test code
|
|
38
|
+
|
|
39
|
+
## Next Steps
|
|
40
|
+
|
|
41
|
+
- Run `npx playwright test tests/checkout.spec.ts --reporter=list` and record output
|
|
42
|
+
- If all green, mark complete
|
|
43
|
+
- If failures remain, diagnose with `fix-flaky-tests` skill
|
|
44
|
+
|
|
45
|
+
<!-- E2E_COMPLETE -->
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
**Terminal markers** (write as the last line of the tracker when appropriate):
|
|
51
|
+
|
|
52
|
+
- `<!-- E2E_COMPLETE -->` — all tests pass, all TC-IDs covered, work is done
|
|
53
|
+
- `<!-- E2E_BLOCKED: reason -->` — unrecoverable blocker prevents further progress (e.g., `<!-- E2E_BLOCKED: login requires 2FA token we cannot automate -->`)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze-test-codebase
|
|
3
|
+
description: >
|
|
4
|
+
Scans and reports on an existing Playwright test codebase. This skill should be used to inspect
|
|
5
|
+
the current Playwright setup before writing, reviewing, or fixing tests, and should be loaded
|
|
6
|
+
early when working in a new project to understand existing patterns. Covers: Playwright config,
|
|
7
|
+
page objects, fixtures, helpers, auth/globalSetup patterns, test conventions, and directory
|
|
8
|
+
structure. Triggers: "understand", "check", "show me", "inspect", or "analyze"
|
|
9
|
+
the current test setup, config, infrastructure, patterns, or conventions. In the full add-tests
|
|
10
|
+
workflow, this skill serves as an early read-only analysis sub-step before planning detailed
|
|
11
|
+
coverage or writing code. This skill examines existing files and outputs a structured report.
|
|
12
|
+
It does NOT write or fix tests, install Playwright, or explore live websites — for live site
|
|
13
|
+
exploration, use agent-web-interface-guide instead.
|
|
14
|
+
allowed-tools: Read Glob Grep Bash
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Analyze Test Codebase
|
|
18
|
+
|
|
19
|
+
Scan and analyze an existing Playwright test codebase to understand its conventions, configuration, and patterns before writing new tests.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
1. **Locate Playwright configuration** — search for `playwright.config.ts`, `playwright.config.js`, or `playwright.config.mjs` in the project root and common subdirectories.
|
|
24
|
+
|
|
25
|
+
2. **Extract configuration details**:
|
|
26
|
+
- `baseURL` — the target application URL
|
|
27
|
+
- `testDir` — where tests live
|
|
28
|
+
- `projects` — browser/device configurations
|
|
29
|
+
- `use` — default options (viewport, headless, trace, screenshot)
|
|
30
|
+
- `webServer` — if Playwright starts the app
|
|
31
|
+
- `globalSetup` / `globalTeardown` — auth or data seeding scripts
|
|
32
|
+
- `reporter` — configured reporters
|
|
33
|
+
|
|
34
|
+
3. **Scan test directory structure**:
|
|
35
|
+
```
|
|
36
|
+
Glob for **/*.spec.ts, **/*.test.ts, **/*.spec.js, **/*.test.js
|
|
37
|
+
```
|
|
38
|
+
- Count total test files
|
|
39
|
+
- Identify naming conventions (`.spec.ts` vs `.test.ts`)
|
|
40
|
+
- Map directory organization (by feature? by page? flat?)
|
|
41
|
+
|
|
42
|
+
4. **Detect patterns in existing tests** — read 2-3 representative test files and identify:
|
|
43
|
+
- **Locator strategy**: `getByRole`, `getByTestId`, CSS selectors, XPath
|
|
44
|
+
- **Wait strategy**: auto-waits, explicit `waitFor*`, any `waitForTimeout` (flag these)
|
|
45
|
+
- **Test structure**: AAA pattern, describe/test nesting, use of `test.step`
|
|
46
|
+
- **Data management**: fixtures, test data files, factory functions
|
|
47
|
+
- **Page Objects**: POM pattern usage, fixture-based injection
|
|
48
|
+
- **Auth handling**: `storageState`, global setup, per-test login
|
|
49
|
+
- **Custom fixtures**: extended `test` with custom fixtures
|
|
50
|
+
- **Helper utilities**: shared functions, custom assertions
|
|
51
|
+
- **Network mocking**: `page.route()` usage, HAR recording (`routeFromHAR`), API interceptors
|
|
52
|
+
- **Visual regression**: `toHaveScreenshot()`, `toMatchSnapshot()`, snapshot directories
|
|
53
|
+
- **Accessibility testing**: `@axe-core/playwright` usage, custom a11y assertions
|
|
54
|
+
- **Cross-browser config**: multiple projects in playwright.config (chromium, firefox, webkit)
|
|
55
|
+
- **Retry configuration**: `retries` count, trace settings (`on-first-retry`)
|
|
56
|
+
- **Parallelism**: `fullyParallel`, `workers` count, test isolation strategy
|
|
57
|
+
|
|
58
|
+
5. **Check for supporting infrastructure**:
|
|
59
|
+
- `fixtures/` or `helpers/` directories
|
|
60
|
+
- `pages/` or `pom/` (Page Object Model)
|
|
61
|
+
- `.env` or `.env.test` files (test-specific environment configuration)
|
|
62
|
+
- CI configuration (`.github/workflows/`, `Jenkinsfile`, etc.)
|
|
63
|
+
- `package.json` scripts for running tests
|
|
64
|
+
- `*.har` files or HAR directories (recorded API responses for mocking)
|
|
65
|
+
- Snapshot directories (`__snapshots__`, `screenshots/`) for visual regression baselines
|
|
66
|
+
- Docker or `docker-compose` for test environment setup
|
|
67
|
+
- Global setup/teardown scripts — what they do (auth, seeding, cleanup)
|
|
68
|
+
|
|
69
|
+
6. **Generate report** — output a structured summary:
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## Test Codebase Analysis
|
|
73
|
+
|
|
74
|
+
### Framework
|
|
75
|
+
- **Playwright** version X.Y.Z
|
|
76
|
+
- Config: `playwright.config.ts`
|
|
77
|
+
- Test directory: `tests/`
|
|
78
|
+
|
|
79
|
+
### Conventions
|
|
80
|
+
- File naming: `*.spec.ts`
|
|
81
|
+
- Locator preference: getByRole > getByTestId
|
|
82
|
+
- Structure: describe blocks by feature
|
|
83
|
+
- Page Objects: Yes, in `tests/pages/`
|
|
84
|
+
- Custom fixtures: Yes, in `tests/fixtures/`
|
|
85
|
+
|
|
86
|
+
### Auth
|
|
87
|
+
- Method: storageState via global setup
|
|
88
|
+
- Auth file: `tests/.auth/user.json`
|
|
89
|
+
|
|
90
|
+
### Existing Coverage
|
|
91
|
+
- Total test files: N
|
|
92
|
+
- Feature areas covered: [list]
|
|
93
|
+
- Test count: ~N tests
|
|
94
|
+
|
|
95
|
+
### Network Mocking
|
|
96
|
+
- Method: page.route() / HAR / none
|
|
97
|
+
- Patterns: [list any existing mocking patterns]
|
|
98
|
+
|
|
99
|
+
### Visual Testing
|
|
100
|
+
- Enabled: Yes/No
|
|
101
|
+
- Tool: toHaveScreenshot() / third-party / none
|
|
102
|
+
- Baseline directory: [path if exists]
|
|
103
|
+
|
|
104
|
+
### Accessibility Testing
|
|
105
|
+
- Enabled: Yes/No
|
|
106
|
+
- Tool: @axe-core/playwright / custom assertions / none
|
|
107
|
+
|
|
108
|
+
### Cross-Browser & CI
|
|
109
|
+
- Browser projects: [list from config]
|
|
110
|
+
- Retries: N (CI) / N (local)
|
|
111
|
+
- Workers: N / fullyParallel: Yes/No
|
|
112
|
+
- CI platform: GitHub Actions / Jenkins / none detected
|
|
113
|
+
- Trace: [setting from config]
|
|
114
|
+
|
|
115
|
+
### Recommendations for New Tests
|
|
116
|
+
- Follow existing `*.spec.ts` naming
|
|
117
|
+
- Use page objects from `tests/pages/`
|
|
118
|
+
- Import test data from `tests/fixtures/testData.ts`
|
|
119
|
+
- Use `baseURL` for navigation (relative paths)
|
|
120
|
+
- Auth: reuse existing storageState setup
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Out of Scope
|
|
124
|
+
|
|
125
|
+
This skill only reads and reports on the codebase. For related tasks, use the appropriate skill:
|
|
126
|
+
|
|
127
|
+
| Task | Skill |
|
|
128
|
+
|------|-------|
|
|
129
|
+
| Browsing a live site, interacting with UI elements | `agent-web-interface-guide` |
|
|
130
|
+
| Deciding what to test, coverage gaps, priorities | `plan-test-coverage` |
|
|
131
|
+
| Writing or modifying executable test code | `write-test-code` |
|
|
132
|
+
| Diagnosing flaky or failing tests | `fix-flaky-tests` |
|
|
133
|
+
|
|
134
|
+
## Example Usage
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Claude Code: /analyze-test-codebase
|
|
138
|
+
Codex: $analyze-test-codebase
|
|
139
|
+
|
|
140
|
+
Claude Code: /analyze-test-codebase ./my-app
|
|
141
|
+
Codex: $analyze-test-codebase ./my-app
|
|
142
|
+
```
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Analyze Existing Test Setup"
|
|
3
|
+
short_description: "Inspect Playwright conventions before planning or writing tests"
|
|
4
|
+
default_prompt: "Analyze this Playwright codebase and summarize the current setup as an early workflow step before planning detailed coverage or writing test code."
|