openspec-playwright 0.1.49 → 0.1.51

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.
@@ -78,11 +78,19 @@ This validates: app server reachable, auth fixtures initialized, Playwright work
78
78
 
79
79
  **Before writing test plan, explore the app to collect real DOM data.** This is the most critical step — it eliminates blind selector guessing.
80
80
 
81
- **Prerequisites**: seed test pass. If auth is required, ensure `auth.setup.ts` has been run (Step 7).
81
+ **Prerequisites**: seed test pass. If auth is required, ensure `auth.setup.ts` has been run (Step 7). BASE_URL must be verified reachable (see 4.1).
82
82
 
83
- #### 4.1. Read app-knowledge.md + Extract routes from specs
83
+ #### 4.1. Verify BASE_URL + Read app-knowledge.md + Extract routes from specs
84
84
 
85
- **First**, read `tests/playwright/app-knowledge.md` to understand:
85
+ **First, verify BASE_URL is reachable**:
86
+ ```javascript
87
+ await browser_navigate(`${BASE_URL}/`)
88
+ // Confirm page loaded → proceed
89
+ // If error → check BASE_URL in seed.spec.ts or vite.config.ts
90
+ ```
91
+ A correct BASE_URL prevents wasted exploration time on unreachable routes.
92
+
93
+ **Then**, read `tests/playwright/app-knowledge.md` to understand:
86
94
  - **Known risks**: SPA behavior, dynamic content patterns, auth method
87
95
  - **Project conventions**: preferred selector strategy, credential format, BASE_URL
88
96
 
@@ -119,6 +127,18 @@ await browser_navigate(`${BASE_URL}/<route>`)
119
127
  // Option C: use browser_run_code to set auth cookies directly
120
128
  ```
121
129
 
130
+ **If credentials are not yet available**:
131
+ 1. **Skip protected routes** — mark them as "⚠️ auth needed — explore after auth.setup.ts"
132
+ 2. **Explore the login page itself** (it's a guest route) — extract form selectors for later auth.setup.ts
133
+ 3. Document login page structure: input names, button text, form action, error patterns
134
+
135
+ **Auth setup flow**:
136
+ 1. Run exploration → discover login page selectors (Step 4)
137
+ 2. Customize auth.setup.ts with discovered selectors
138
+ 3. Set E2E_USERNAME/E2E_PASSWORD
139
+ 4. Run `npx playwright test --project=setup`
140
+ 5. Re-run exploration for protected routes
141
+
122
142
  Wait for page stability after navigation:
123
143
  - Prefer waiting for a specific element: `browser_wait_for` with text or selector
124
144
  - Avoid `networkidle` / `load` — they are too slow or unreliable
@@ -195,7 +215,7 @@ BASE_URL: <from env or seed.spec.ts>
195
215
  |-----------|-----------|
196
216
  | Route 404 | Mark as "⚠️ route not found — verify URL in specs" |
197
217
  | Network error | Mark as "⚠️ unreachable — check if server is running" |
198
- | Auth required, no storageState | Skip protected routes → note which routes need auth |
218
+ | Auth required, no credentials | Skip routes + explore login page document selectors set up auth first | See 4.2 "If credentials are not yet available" |
199
219
  | SPA routing (URL changes but page doesn't reload) | Explore via navigation clicks from known routes, not direct URLs |
200
220
  | Page loads but no interactive elements | Try waiting longer for SPA hydration |
201
221
  | Dynamic content (user-specific) | Record structure, not content — use `toContainText`, not `toHaveText` |
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspec-playwright",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "description": "OpenSpec + Playwright E2E verification setup tool for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
package/release-notes.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## What's Changed
2
2
 
3
- - docs: update README and Chinese README with app-knowledge and new pipeline
3
+ - fix(SKILL): add BASE_URL smoke check before exploration (Step 4.1)
4
4
 
5
- **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.49
5
+ **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.51
Binary file