Files
leo-claude-mktplace/plugins/saas-test-pilot/commands/test-e2e.md
lmiranda 2d51df7a42 feat(marketplace): command consolidation + 8 new plugins (v8.1.0 → v9.0.0) [BREAKING]
Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action>
sub-command pattern. Git-flow consolidated from 8→5 commands (commit
variants absorbed into --push/--merge/--sync flags). Dispatch files,
name: frontmatter, and cross-reference updates for all plugins.

Phase 2: Design documents for 8 new plugins in docs/designs/.

Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate,
saas-react-platform, saas-test-pilot, data-seed, ops-release-manager,
ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents,
skills, README, and claude-md-integration. Marketplace grows from 12→20.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:52:11 -05:00

87 lines
2.5 KiB
Markdown

---
name: test e2e
description: Generate end-to-end test scenarios with page object models and user flows
---
# /test e2e
Generate end-to-end test scenarios for web applications or API workflows.
## Visual Output
```
+----------------------------------------------------------------------+
| TEST-PILOT - E2E Tests |
+----------------------------------------------------------------------+
```
## Usage
```
/test e2e <target> [--framework=playwright|cypress] [--flow=<user-flow>]
```
**Target:** Application area, URL path, or feature name
**Framework:** E2E framework (auto-detected if not specified)
**Flow:** Specific user flow to test (e.g., "login", "checkout", "signup")
## Skills to Load
- skills/test-patterns.md
## Process
1. **Analyze Application**
- Detect E2E framework from config files
- Identify routes/pages from router configuration
- Map user-facing features and critical paths
- Detect authentication requirements
2. **Design Test Scenarios**
- Map user journeys (happy path first)
- Identify critical business flows:
- Authentication (login, logout, password reset)
- Data creation (forms, uploads, submissions)
- Navigation (routing, deep links, breadcrumbs)
- Error states (404, network failures, validation)
- Define preconditions and test data needs
3. **Generate Page Objects**
- Create page object classes for each page/component
- Encapsulate selectors and interactions
- Keep assertions in test files, not page objects
- Use data-testid attributes where possible
4. **Write Test Files**
- One test file per user flow or feature area
- Include setup (authentication, test data) and teardown (cleanup)
- Use descriptive test names that read as user stories
- Add retry logic for flaky network operations
- Include screenshot capture on failure
5. **Verify**
- Check selectors reference valid elements
- Confirm test data setup is complete
- Validate timeout values are reasonable
## Output Format
```
## E2E Tests: Login Flow
### Page Objects Created
- pages/LoginPage.ts — login form interactions
- pages/DashboardPage.ts — post-login verification
### Test Scenarios (5)
1. test_successful_login_redirects_to_dashboard
2. test_invalid_credentials_shows_error
3. test_empty_form_shows_validation
4. test_remember_me_persists_session
5. test_locked_account_shows_message
### Test Data Requirements
- Valid user credentials (use test seed)
- Locked account fixture
```