一键导入
flow-test
Execute complete user flow testing with Playwright MCP, testing end-to-end journeys through the application
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute complete user flow testing with Playwright MCP, testing end-to-end journeys through the application
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze, test, and prepare apps for production with Pest and Playwright testing
This skill should be used when encountering errors during development, when the user mentions an error, when debugging issues, or when asked to "fix an error", "debug this", "why is this failing", "solve this error". Provides intelligent error recognition, solution lookup from past errors, and error logging for future reference.
This skill should be used when the user asks to "manage notes", "update vault", "add to obsidian", "document in vault", "search my notes", "find related notes", or when working with Obsidian vault files. Also triggers when discussing knowledge management, note organization, or when Claude Code auto-captures commits, tasks, or component creation.
This skill should be used when conducting PRD interviews, creating product requirements documents, planning new features, documenting bug fixes, or when using commands like "/prd-builder:prd", "/prd-builder:feature", "/prd-builder:bugfix", or "/prd-builder:refine". Provides comprehensive interview frameworks and question templates for building thorough PRDs.
Systematically test all pages for errors, functionality, and proper rendering using Playwright MCP
Execute comprehensive role-based E2E testing with Playwright, testing all user flows for each role
| name | flow-test |
| description | Execute complete user flow testing with Playwright MCP, testing end-to-end journeys through the application |
This skill executes complete user flow testing using Playwright MCP. It tests end-to-end journeys through the application, from start to finish, verifying that multi-step processes work correctly.
Plan file: tests/e2e-test-plan.md
This skill reads flow definitions from the test plan at tests/e2e-test-plan.md. If the plan file doesn't exist, the calling command should invoke the test-plan skill first to generate it.
Ensure that:
CRITICAL: Before testing flows, verify the test plan exists.
Check for Test Plan
tests/e2e-test-plan.mdRead Flow Definitions from Plan
Authentication Flows
Core Business Flows
Administrative Flows
For each flow, document:
## Flow: User Registration
### Overview
Complete user registration from signup to verified account
### Steps
1. Navigate to registration page
2. Fill registration form
3. Submit form
4. Receive confirmation
5. Verify email (if applicable)
6. Complete profile (if applicable)
7. Access dashboard
### Prerequisites
- No existing account
- Valid email address
### Expected Outcomes
- User account created
- Verification email sent
- User can login
- Profile accessible
### Error Cases
- Duplicate email
- Weak password
- Invalid email format
- Required fields missing
For EACH flow:
Setup
Execute Steps
Verify Outcome
Test Error Cases
Step 1: Navigate to Registration
browser_navigate({ url: "/register" })
browser_snapshot()
Verify: Registration form visible
Step 2: Fill Registration Form
browser_fill_form({
fields: [
{ name: "Name", type: "textbox", ref: "[name-ref]", value: "Test User" },
{ name: "Email", type: "textbox", ref: "[email-ref]", value: "test@example.com" },
{ name: "Password", type: "textbox", ref: "[password-ref]", value: "SecurePass123!" },
{ name: "Confirm Password", type: "textbox", ref: "[confirm-ref]", value: "SecurePass123!" }
]
})
browser_snapshot()
Verify: All fields filled
Step 3: Submit Form
browser_click({ element: "Register button", ref: "[submit-ref]" })
browser_wait_for({ text: "Account created" OR redirect to dashboard })
browser_snapshot()
browser_console_messages({ level: "error" })
Verify: No errors, success message or redirect
Step 4: Verify Account
If email verification required:
Check for verification message
Else:
browser_snapshot()
Verify: Dashboard or profile accessible
Step 5: Verify Can Login
browser_navigate({ url: "/logout" })
browser_navigate({ url: "/login" })
browser_fill_form with credentials
browser_click submit
browser_wait_for dashboard
Verify: Successfully logged in
Step 1: Navigate to Login
browser_navigate({ url: "/login" })
browser_snapshot()
Verify: Login form visible
Step 2: Enter Credentials
browser_fill_form({
fields: [
{ name: "Email", type: "textbox", ref: "[email-ref]", value: "user@example.com" },
{ name: "Password", type: "textbox", ref: "[password-ref]", value: "password" }
]
})
Step 3: Submit
browser_click({ element: "Login button", ref: "[submit-ref]" })
browser_wait_for({ text: "Dashboard" OR text: "Welcome" })
browser_snapshot()
Verify: Logged in state, user menu visible
Step 4: Verify Session
browser_navigate({ url: "/profile" })
browser_snapshot()
Verify: User profile accessible
browser_navigate({ url: "/protected-page" })
browser_snapshot()
Verify: Protected content accessible
Step 1: Navigate to Forgot Password
browser_navigate({ url: "/forgot-password" })
browser_snapshot()
Verify: Email input form visible
Step 2: Request Reset
browser_type({
element: "Email field",
ref: "[email-ref]",
text: "user@example.com"
})
browser_click({ element: "Send reset link", ref: "[submit-ref]" })
browser_wait_for({ text: "email sent" OR text: "check your email" })
browser_snapshot()
Verify: Success message
Step 3: (Simulated) Click Reset Link
browser_navigate({ url: "/reset-password?token=TEST_TOKEN" })
browser_snapshot()
Verify: Password reset form visible
Step 4: Set New Password
browser_fill_form({
fields: [
{ name: "New Password", type: "textbox", ref: "[password-ref]", value: "NewPass123!" },
{ name: "Confirm Password", type: "textbox", ref: "[confirm-ref]", value: "NewPass123!" }
]
})
browser_click({ element: "Reset Password", ref: "[submit-ref]" })
browser_wait_for({ text: "Password updated" OR redirect to login })
browser_snapshot()
Verify: Success message or login page
Step 1: Navigate to List
browser_navigate({ url: "/items" })
browser_snapshot()
Note: Initial item count
Step 2: Create Item
browser_click({ element: "Create new", ref: "[create-ref]" })
browser_snapshot()
Verify: Create form visible
browser_fill_form({
fields: [
{ name: "Title", type: "textbox", ref: "[title-ref]", value: "Test Item" },
{ name: "Description", type: "textbox", ref: "[desc-ref]", value: "Test description" }
]
})
browser_click({ element: "Save", ref: "[save-ref]" })
browser_wait_for({ text: "created" OR redirect to list })
browser_snapshot()
Verify: Item created, appears in list
Step 3: Read Item
browser_click({ element: "View item", ref: "[view-ref]" })
browser_snapshot()
Verify: Item details displayed correctly
Step 4: Update Item
browser_click({ element: "Edit", ref: "[edit-ref]" })
browser_snapshot()
Verify: Edit form with current values
browser_type({
element: "Title field",
ref: "[title-ref]",
text: "Updated Title"
})
browser_click({ element: "Save", ref: "[save-ref]" })
browser_wait_for({ text: "updated" })
browser_snapshot()
Verify: Changes saved
Step 5: Delete Item
browser_click({ element: "Delete", ref: "[delete-ref]" })
If confirmation dialog:
browser_handle_dialog({ accept: true })
browser_wait_for({ textGone: "Updated Title" })
browser_snapshot()
Verify: Item removed from list
Step 1: Add to Cart
browser_navigate({ url: "/products/1" })
browser_click({ element: "Add to cart", ref: "[add-ref]" })
browser_wait_for({ text: "Added" OR cart count update })
browser_snapshot()
Verify: Item in cart
Step 2: View Cart
browser_navigate({ url: "/cart" })
browser_snapshot()
Verify: Cart shows item, correct price
Step 3: Proceed to Checkout
browser_click({ element: "Checkout", ref: "[checkout-ref]" })
browser_snapshot()
Verify: Checkout form visible
Step 4: Fill Shipping
browser_fill_form({
fields: [
{ name: "Address", type: "textbox", ref: "[address-ref]", value: "123 Test St" },
{ name: "City", type: "textbox", ref: "[city-ref]", value: "Test City" },
{ name: "Zip", type: "textbox", ref: "[zip-ref]", value: "12345" }
]
})
browser_click({ element: "Continue", ref: "[continue-ref]" })
browser_snapshot()
Step 5: Payment
browser_fill_form({
fields: [
{ name: "Card Number", type: "textbox", ref: "[card-ref]", value: "4242424242424242" },
{ name: "Expiry", type: "textbox", ref: "[expiry-ref]", value: "12/25" },
{ name: "CVV", type: "textbox", ref: "[cvv-ref]", value: "123" }
]
})
browser_click({ element: "Pay Now", ref: "[pay-ref]" })
browser_wait_for({ text: "Order confirmed" })
browser_snapshot()
Verify: Order confirmation page
Step 6: Verify Order
browser_navigate({ url: "/orders" })
browser_snapshot()
Verify: Order appears in order history
Step 1: Navigate to form
Step 2: Fill with invalid data
Step 3: Submit
Step 4: Verify: Error messages displayed
Step 5: Verify: Form not submitted
Step 6: Verify: User can correct and retry
Step 1: Start flow normally
Step 2: Introduce network issue (if possible)
Step 3: Attempt action
Step 4: Verify: Error handled gracefully
Step 5: Verify: User informed of issue
Step 6: Verify: Can retry action
Step 1: Login
Step 2: Navigate to protected page
Step 3: Clear session (if possible)
Step 4: Attempt action
Step 5: Verify: Redirect to login
Step 6: Verify: Action can be completed after re-login
# Flow Test Results
## Summary
- Total Flows: 8
- Passed: 7
- Failed: 1
- Skipped: 0
## Detailed Results
### Flow: User Registration
- Status: PASSED
- Duration: 12.5s
| Step | Action | Status | Notes |
|------|--------|--------|-------|
| 1 | Navigate to /register | OK | Form visible |
| 2 | Fill registration form | OK | All fields filled |
| 3 | Submit form | OK | No errors |
| 4 | Verify account | OK | Dashboard accessible |
| 5 | Verify can login | OK | Login successful |
### Flow: User Login
- Status: PASSED
- Duration: 5.2s
| Step | Action | Status | Notes |
|------|--------|--------|-------|
| 1 | Navigate to /login | OK | Form visible |
| 2 | Enter credentials | OK | Fields filled |
| 3 | Submit | OK | Redirect to dashboard |
| 4 | Verify session | OK | Protected pages accessible |
### Flow: Checkout
- Status: FAILED
- Duration: 18.7s
| Step | Action | Status | Notes |
|------|--------|--------|-------|
| 1 | Add to cart | OK | Item added |
| 2 | View cart | OK | Cart displayed |
| 3 | Proceed to checkout | OK | Form visible |
| 4 | Fill shipping | OK | Address saved |
| 5 | Payment | FAILED | Payment gateway timeout |
| 6 | Verify order | SKIPPED | Previous step failed |
Error Details:
- Location: Payment step
- Error: NetworkError - Payment gateway timeout after 30s
- Console: "Error: Payment processing failed"
## Error Cases Tested
### Registration - Duplicate Email
- Status: PASSED
- Verified: Error message shown
- Verified: Form not submitted
### Login - Invalid Password
- Status: PASSED
- Verified: Error message shown
- Verified: Still on login page
### Checkout - Empty Cart
- Status: PASSED
- Verified: Cannot proceed to checkout
- Verified: Message shown
## Recommendations
1. **Payment Timeout**: Increase gateway timeout or add retry logic
2. **Add Loading States**: Some actions lack visual feedback
3. **Error Recovery**: Consider saving cart state for failed checkouts