@codihaus/claude-skills 1.6.7 → 1.6.8

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.
@@ -38,166 +38,88 @@ Automated testing using Playwright to verify implementation works correctly.
38
38
  | Visual State | `browser_snapshot` | Render errors, missing elements |
39
39
  | Interactions | `browser_click`, `browser_type` | Form failures, broken buttons |
40
40
 
41
- ## Workflow
41
+ ## Expected Outcome
42
+
43
+ Test report showing whether implementation works correctly.
44
+
45
+ **Report includes:**
46
+ - Overall status (Pass/Fail + issue count)
47
+ - Issues found (critical/warning with location + suggested fix)
48
+ - Test steps executed (which passed/failed)
49
+ - Suggested fixes or next actions
50
+
51
+ ## Success Criteria
52
+
53
+ - No console errors during user flows
54
+ - No network failures (API 4xx/5xx)
55
+ - Expected elements render correctly
56
+ - User interactions work as expected
57
+ - Happy path completes successfully
58
+ - All acceptance criteria from spec verified
59
+
60
+ ## What to Test
61
+
62
+ **From UC spec:**
63
+ - Expected user flows (happy path)
64
+ - Required inputs and outputs
65
+ - Acceptance criteria
66
+ - Error scenarios (if specified)
67
+
68
+ **From recent changes:**
69
+ - Modified components/endpoints
70
+ - New functionality added
71
+
72
+ ## Error Detection
73
+
74
+ | Check | What It Catches |
75
+ |-------|----------------|
76
+ | Console Errors | JS errors, React errors, warnings, unhandled promises |
77
+ | Network Failures | API 4xx/5xx, failed fetches, timeouts |
78
+ | Visual State | Render errors, missing elements, wrong state |
79
+ | Interactions | Form failures, broken buttons, navigation issues |
80
+
81
+ **Error categories:**
82
+ - 🔴 **Critical:** Breaks functionality, must fix
83
+ - 🟡 **Warning:** Should fix, not blocking
84
+
85
+ ## Test Approach
86
+
87
+ **1. Prepare:**
88
+ - Identify what to test (from spec + recent changes)
89
+ - Determine test URL (from spec or default: http://localhost:3000)
90
+ - Verify dev server running (prompt if not)
91
+
92
+ **2. Execute User Flows:**
93
+ - Navigate to page
94
+ - Capture initial state (check page loads, no immediate errors)
95
+ - Execute happy path (fill forms, click buttons, navigate)
96
+ - Wait for expected results
97
+ - Capture final state
98
+
99
+ **3. Collect Errors:**
100
+ - Console messages (errors, warnings)
101
+ - Network requests (find failures)
102
+ - Visual issues (missing elements)
103
+
104
+ **4. Report:**
105
+ - Status (pass/fail + count)
106
+ - Issues with severity, location, suggested fix
107
+ - Test steps executed (which passed/failed)
108
+
109
+ **5. Fix Loop (if --fix):**
110
+ - For each issue: read file, identify fix, apply fix, re-test
111
+ - Continue until fixed or max iterations (3) or needs user input
112
+ - Re-run full test to verify
42
113
 
43
- ### Phase 1: Prepare Test Context
44
-
45
- ```
46
- 1. Identify what to test
47
- → From UC spec: expected flows, inputs, outputs
48
- → From recent changes: modified components/endpoints
49
-
50
- 2. Determine test URL
51
- → From spec or project config
52
- → Default: http://localhost:3000
53
-
54
- 3. Check if dev server running
55
- → Look for existing process on port
56
- → If not, prompt user to start it
57
- ```
58
-
59
- ### Phase 2: Navigate and Capture Initial State
60
-
61
- ```typescript
62
- // Navigate to the page
63
- await mcp__playwright__browser_navigate({
64
- url: 'http://localhost:3000/login'
65
- });
66
-
67
- // Wait for page to stabilize
68
- await mcp__playwright__browser_wait_for({ time: 2 });
69
-
70
- // Capture accessibility snapshot (better than screenshot for analysis)
71
- await mcp__playwright__browser_snapshot({});
72
- ```
73
-
74
- **Check for immediate errors:**
75
- - Page loads without errors
76
- - Expected elements present
77
- - No console errors on load
78
-
79
- ### Phase 3: Test User Flows
80
-
81
- From the UC spec, execute the happy path:
82
-
83
- ```typescript
84
- // Example: Login flow
85
- // Step 1: Fill form
86
- await mcp__playwright__browser_type({
87
- element: 'email input',
88
- ref: 'input-email', // From snapshot
89
- text: 'test@example.com'
90
- });
91
-
92
- await mcp__playwright__browser_type({
93
- element: 'password input',
94
- ref: 'input-password',
95
- text: 'password123'
96
- });
97
-
98
- // Step 2: Submit
99
- await mcp__playwright__browser_click({
100
- element: 'login button',
101
- ref: 'btn-login'
102
- });
103
-
104
- // Step 3: Wait for response
105
- await mcp__playwright__browser_wait_for({
106
- text: 'Dashboard' // Expected after login
107
- });
108
-
109
- // Step 4: Verify result
110
- await mcp__playwright__browser_snapshot({});
111
- ```
112
-
113
- ### Phase 4: Collect Errors
114
-
115
- ```typescript
116
- // Get console messages (errors, warnings)
117
- const console = await mcp__playwright__browser_console_messages({
118
- level: 'error'
119
- });
120
-
121
- // Get network requests (find failures)
122
- const network = await mcp__playwright__browser_network_requests({});
123
-
124
- // Filter for issues:
125
- // - Console: Any error level messages
126
- // - Network: Status >= 400, or failed requests
127
- ```
128
-
129
- **Error Categories:**
130
-
131
- | Category | Source | Examples |
132
- |----------|--------|----------|
133
- | JS Errors | Console | TypeError, ReferenceError, unhandled promise |
134
- | React Errors | Console | Component errors, hooks violations |
135
- | API Errors | Network | 400 Bad Request, 401 Unauthorized, 500 Server Error |
136
- | Network Errors | Network | Failed to fetch, CORS, timeout |
137
- | Render Errors | Snapshot | Missing elements, wrong state |
138
-
139
- ### Phase 5: Generate Report
140
-
141
- ```markdown
142
- ## Test Report
143
-
144
- **Target**: UC-AUTH-001 Login
145
- **URL**: http://localhost:3000/login
146
- **Status**: ❌ Failed (3 issues)
147
-
148
- ### Issues Found
149
-
150
- #### 🔴 Critical
151
-
152
- 1. **API Error**: POST /api/auth/login returned 500
153
- - Response: `{"error":"Internal server error"}`
154
- - Likely cause: Database connection or missing env var
155
- - File: Check `src/app/api/auth/login/route.ts`
156
-
157
- 2. **Console Error**: Unhandled promise rejection
158
- - Message: `Cannot read property 'id' of undefined`
159
- - Stack: `LoginForm.tsx:45`
160
- - Cause: API response handling when login fails
161
-
162
- #### 🟡 Warning
163
-
164
- 3. **Console Warning**: Missing key prop in list
165
- - Component: `ErrorMessages.tsx`
166
- - Not critical but should fix
167
-
168
- ### Test Steps Executed
169
-
170
- | Step | Action | Result |
171
- |------|--------|--------|
172
- | 1 | Navigate to /login | ✓ Page loaded |
173
- | 2 | Fill email | ✓ Input accepted |
174
- | 3 | Fill password | ✓ Input accepted |
175
- | 4 | Click login | ✗ Error occurred |
176
- | 5 | Verify dashboard | ⏭ Skipped |
177
-
178
- ### Suggested Fixes
179
-
180
- 1. Check database connection in backend
181
- 2. Add error handling in LoginForm.tsx:45
182
- 3. Add key prop to ErrorMessages.tsx list items
183
- ```
114
+ ## Test Patterns
184
115
 
185
- ### Phase 6: Fix Loop (if --fix)
116
+ Available as reference in original SKILL.md:
117
+ - Form submission
118
+ - Navigation flow
119
+ - API response validation
120
+ - Error state testing
186
121
 
187
- ```
188
- 1. For each issue:
189
- a. Read the problematic file
190
- b. Identify the fix
191
- c. Apply the fix
192
- d. Re-run failed test step
193
-
194
- 2. Continue until:
195
- - All issues fixed, OR
196
- - Max iterations reached (3), OR
197
- - Issue requires user input
198
-
199
- 3. Re-run full test to verify
200
- ```
122
+ Use Playwright MCP tools to interact with browser.
201
123
 
202
124
  ## Test Patterns
203
125