| name | e2e-verify |
| description | Feature-based E2E test writing and execution after development. Verifies actual user flows after /verify. Triggers on: e2e verification, e2e-verify, E2E testing, browser test execution. NOT for: unit tests, type checking, build verification. |
| user-invocable | true |
| disable-model-invocation | false |
| allowed-tools | Read, Write, Edit, Bash, Grep, Glob, Task |
E2E Feature Verification
After development + /verify completion, verifies that the implemented feature works in an actual browser via E2E tests.
Prerequisites
/verify passed (typecheck, lint, test, build)
- App is runnable locally
Workflow
Step 1: Feature Analysis
Identify user flows for the implemented feature.
- What page does it start on?
- What interactions are needed? (clicks, inputs, navigation)
- What are the success conditions? (URL change, text display, state change)
- Edge cases? (empty input, error responses)
Step 2: Run the App
cat package.json | grep -A 5 '"scripts"'
npm run dev &
sleep 5
Step 3: Write E2E Tests
Create test files in the e2e/ directory.
ls e2e/ 2>/dev/null || ls tests/e2e/ 2>/dev/null || ls __tests__/e2e/ 2>/dev/null
cat package.json | grep -E "playwright|cypress|agent-browser"
Writing Tests Per Framework
Using agent-browser:
#!/bin/bash
set -e
cleanup() { agent-browser close 2>/dev/null || true; }
trap cleanup EXIT
agent-browser open http://localhost:3000
agent-browser snapshot -i
agent-browser fill @email-input "test@example.com"
agent-browser click @submit-btn
agent-browser wait text "Success"
echo "PASS: Feature E2E test"
Using Playwright:
import { test, expect } from '@playwright/test';
test('Feature: user flow', async ({ page }) => {
await page.goto('/');
await page.fill('[data-testid="email"]', 'test@example.com');
await page.click('[data-testid="submit"]');
await expect(page.locator('.success')).toBeVisible();
});
Using Cypress:
describe('Feature', () => {
it('completes the user flow', () => {
cy.visit('/');
cy.get('[data-testid="email"]').type('test@example.com');
cy.get('[data-testid="submit"]').click();
cy.contains('Success').should('be.visible');
});
});
Step 4: Run Tests
bash e2e/test_feature.sh
npx playwright test e2e/feature.spec.ts
npx cypress run --spec "cypress/e2e/feature.cy.ts"
Step 5: Debug on Failure
agent-browser screenshot ./e2e/debug.png
agent-browser open http://localhost:3000 --headed
agent-browser console --error
Test Checklist
Verification Loop
On test failure:
- Identify root cause via screenshots/logs
- Fix code
- Re-run
/verify (prevent regressions)
- Re-run E2E tests
- Repeat until all pass