e2e-test-feature
Skill1 starsChanged 8 months agoMITView on GitHub
E2E test the current feature/fix using Playwright MCP browser automation
In this repository7 other files it gives its agents.
- .claude/CLAUDE.MDCLAUDE.md
- api-syncSkill
- auto-fixSkill
- code-reviewSkill
- doc-syncSkill
- e2e-test-generalSkill
- test-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Test the feature or fix on the current branch using Playwright MCP browser automation.
- Distinctive: line 21
Read the recent commits to understand what changed.
- Distinctive: line 27
If on main or no changes exist, ask the user what specific flow to test before proceeding.
- Very specific: line 48
Read the relevant page objects in frontend/e2e/pages/*.page.ts to understand the expected element selectors for each page.
- Distinctive: line 58
If any auth-required pages are in the test plan:
- Very specific: line 60
Use mcp__playwright__browser_snapshot to verify the login form loaded
- Very specific: line 64
Wait for redirect to /dashboard using mcp__playwright__browser_wait_for
- Distinctive: line 65
If login fails (user not registered), first register via the Register tab with the same credentials, then sign in
- Very specific: line 78
Use mcp__playwright__browser_click for buttons, tabs, links
- Very specific: line 79
Use mcp__playwright__browser_fill_form for form inputs
- Very specific: line 80
Use mcp__playwright__browser_type for text inputs like chat
- Very specific: line 81
Use mcp__playwright__browser_press_key for keyboard actions (Enter to submit)
- Very specific: line 86
After all tests complete, use mcp__playwright__browser_close to clean up.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Feature-Focused E2E Testing
Test the feature or fix on the current branch using Playwright MCP browser automation. Gathers context from git and issues, plans which pages/flows to test, executes interactively, and reports results formatted for the next fix iteration.
Steps
1. Gather Context
git branch --show-current
git log --oneline -10
git diff main...HEAD --name-only- Identify the current branch name and parse it for feature context (e.g.,
feat/fix-login-redirectmeans test login redirect). - Read the recent commits to understand what changed.
- List all files changed vs main to determine scope.
- Extract any issue numbers from branch name or commit messages (e.g.,
#123). If found, read the issue:gh issue view <number> - If on
mainor no changes exist, ask the user what specific flow to test before proceeding.
2. Plan Test Flow
Map changed files to pages that need testing:
| Changed File Pattern | URL to Test |
frontend/src/app/page.tsx | / |
frontend/src/app/login/** | /login |
frontend/src/app/assess/** | /assess |
frontend/src/app/dashboard/** | /dashboard |
frontend/src/app/gap-analysis/** | /gap-analysis |
frontend/src/app/learning-plan/** | /learning-plan |
frontend/src/app/demo/** | /demo/assess, /demo/report |
frontend/src/app/export/** | /export/[id] |
frontend/src/components/** | All pages importing the component |
frontend/src/hooks/** | All pages using the hook |
frontend/src/lib/** | All pages using the module |
backend/app/routes/** | Frontend pages that call those API routes |
Read the relevant page objects in frontend/e2e/pages/*.page.ts to understand the expected element selectors for each page.
Determine which pages require authentication:
- Public (no auth):
/,/login,/demo/assess,/demo/report - Auth required:
/dashboard,/assess,/gap-analysis,/learning-plan,/export/[id]
3. Pre-flight Check
Navigate to http://localhost:3000 using mcp__playwright__browser_navigate. If it fails to load, tell the user to run make dev and stop.
If any auth-required pages are in the test plan:
- Navigate to
http://localhost:3000/login - Use
mcp__playwright__browser_snapshotto verify the login form loaded - Click the "Sign In" tab via
mcp__playwright__browser_click - Fill email
$E2E_TEST_EMAILand password$E2E_TEST_PASSWORD(from env vars) usingmcp__playwright__browser_fill_form - Click the "Sign In" button via
mcp__playwright__browser_click - Wait for redirect to
/dashboardusingmcp__playwright__browser_wait_for - If login fails (user not registered), first register via the Register tab with the same credentials, then sign in
4. Execute Tests
For each page in the test plan, run this sequence:
- Navigate:
mcp__playwright__browser_navigatetohttp://localhost:3000/<path> - Wait:
mcp__playwright__browser_wait_forfor the page's key elements (reference the page object selectors) - Snapshot:
mcp__playwright__browser_snapshot— verify expected elements are present in the accessibility tree - Console check:
mcp__playwright__browser_console_messages— flag anyerrorlevel messages - Network check:
mcp__playwright__browser_network_requests— flag any 4xx/5xx responses that are not expected - Screenshot:
mcp__playwright__browser_take_screenshot— save toe2e-screenshots/feat-NN-<page-name>.png - Feature interactions: Based on the feature context, interact with the specific elements that changed:
- Use
mcp__playwright__browser_clickfor buttons, tabs, links - Use
mcp__playwright__browser_fill_formfor form inputs - Use
mcp__playwright__browser_typefor text inputs like chat - Use
mcp__playwright__browser_press_keyfor keyboard actions (Enter to submit)
- Use
- Post-interaction verify: Take another snapshot and screenshot to confirm the expected state change occurred
5. Close Browser
After all tests complete, use mcp__playwright__browser_close to clean up.
Output Format
## E2E Test Results: <branch-name>
### Context
- **Branch:** <branch-name>
- **Feature:** <description from issue or commits>
- **Related issue:** <#number and title, or "none">
- **Pages tested:** <comma-separated list>
### Results
| # | Page | Test | Status | Details |
|---|------|------|--------|---------|
| 1 | /login | Page loads | PASS | All form elements visible |
| 2 | /login | Sign in flow | PASS | Redirects to /dashboard |
| 3 | /dashboard | Console errors | FAIL | TypeError: Cannot read property 'map' of undefined |
### Console Errors
| Page | Level | Message |
|------|-------|---------|
(deduplicated — omit this section if none found)
### Network Errors
| Page | URL | Status | Method |
|------|-----|--------|--------|
(omit this section if none found)
### Screenshots
1. `e2e-screenshots/feat-01-login.png` — Login page after load
2. `e2e-screenshots/feat-02-dashboard.png` — Dashboard after sign in
### Recommended Next Steps
- <actionable fix 1 based on failures, with file:line reference if possible>
- <actionable fix 2>
(omit this section if all tests pass)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.

