@sun-asterisk/sungen 2.6.14 → 2.7.0-beta.0
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.
- package/dist/cli/index.js +3 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +9 -2
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +12 -4
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +10 -0
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-review.md +13 -12
- package/dist/orchestrator/templates/ai-instructions/claude-config.md +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-skill-delivery.md +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +14 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +371 -324
- package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +268 -90
- package/dist/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +23 -49
- package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +203 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +179 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +233 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +226 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +177 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +69 -240
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +13 -12
- package/dist/orchestrator/templates/ai-instructions/copilot-config.md +1 -1
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +1 -1
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +15 -21
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +371 -324
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +262 -102
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +23 -49
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +203 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +179 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +233 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +226 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +177 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +69 -240
- package/package.json +9 -1
- package/src/cli/index.ts +4 -1
- package/src/exporters/feature-parser.ts +12 -4
- package/src/orchestrator/ai-rules-updater.ts +10 -0
- package/src/orchestrator/templates/ai-instructions/claude-cmd-review.md +13 -12
- package/src/orchestrator/templates/ai-instructions/claude-config.md +1 -1
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +1 -1
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +14 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +371 -324
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +268 -90
- package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +23 -49
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +203 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +179 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +233 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +226 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +177 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +69 -240
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +13 -12
- package/src/orchestrator/templates/ai-instructions/copilot-config.md +1 -1
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +1 -1
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +15 -21
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +371 -324
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +262 -102
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +23 -49
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +203 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +179 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +233 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +226 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +177 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +69 -240
|
@@ -1,268 +1,97 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sungen-viewpoint
|
|
3
|
-
description: '
|
|
3
|
+
description: '17 UI patterns x 4 viewpoints — structured checklist for test case
|
|
4
|
+
generation and review. Auto-loaded by create-test and review commands.'
|
|
4
5
|
user-invocable: false
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
| VP | Focus | Keyword |
|
|
10
|
-
|---|---|---|
|
|
11
|
-
| **UI/UX** | Interface states, layout, feedback | VP-UI |
|
|
12
|
-
| **Data & Validate** | Input constraints, data integrity, error messages | VP-VAL |
|
|
13
|
-
| **Logic** | Business rules, interactions, state changes | VP-LOGIC |
|
|
14
|
-
| **Security** | Auth, injection, permissions | VP-SEC |
|
|
15
|
-
|
|
16
|
-
## Shared Checks (apply across all patterns)
|
|
17
|
-
|
|
18
|
-
These appear in multiple patterns — test once per screen, not per pattern:
|
|
19
|
-
|
|
20
|
-
| Check | ER |
|
|
21
|
-
|---|---|
|
|
22
|
-
| **Loading State** | Spinner/skeleton shown, UI interaction locked during fetch |
|
|
23
|
-
| **Empty State** | Clear message when no data, layout intact |
|
|
24
|
-
| **XSS/Injection** | Malicious input sanitized to plain text, never executed |
|
|
25
|
-
| **URL Manipulation** | Invalid URL params fallback to defaults, no server crash |
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## GROUP 1: DATA ENTRY
|
|
30
|
-
|
|
31
|
-
### 1. Form & Inputs
|
|
32
|
-
|
|
33
|
-
**UI/UX**
|
|
34
|
-
- Field States: disabled/readonly fields dimmed and locked, no interaction allowed
|
|
35
|
-
- Button States: Submit disabled when form invalid, auto-enabled when valid
|
|
36
|
-
- Keyboard Nav: Tab order correct, Enter submits form
|
|
37
|
-
|
|
38
|
-
**Data & Validate**
|
|
39
|
-
- Required/Optional: blank required field shows error; optional allows blank
|
|
40
|
-
- Boundaries & Format: min/max length, format (email, number) with error messages
|
|
41
|
-
- Whitespace: auto-trim or reject spaces-only input
|
|
42
|
-
- Error Recovery: error at correct field, disappears immediately when user corrects data
|
|
43
|
-
|
|
44
|
-
**Logic**
|
|
45
|
-
- Field Dependencies: Field A value determines Field B status/options
|
|
46
|
-
- Double Submit Prevention: button disabled after first click, only 1 request sent
|
|
47
|
-
- Success Flow: redirect / success toast / form reset
|
|
48
|
-
- Failure Flow: server error retains form data + shows system error
|
|
49
|
-
|
|
50
|
-
**Security**
|
|
51
|
-
- → Shared: XSS/Injection
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## GROUP 2: DATA MANAGEMENT
|
|
8
|
+
## How to use this skill
|
|
56
9
|
|
|
57
|
-
|
|
10
|
+
This skill is a **router**. The detailed checklists live in 5 group files — load only the ones relevant to the screen under test.
|
|
58
11
|
|
|
59
|
-
**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- Sticky Elements: fixed header on vertical scroll, fixed action column on horizontal scroll
|
|
12
|
+
1. Read the **4 Viewpoints** and **Shared Checks** below (always).
|
|
13
|
+
2. Identify which UI patterns the screen contains, resolve any overlap via **Pattern selection** below, then read **only** the matching group file(s) from the routing table.
|
|
14
|
+
3. Generate Tier 1 (`@high`) scenarios first, then Tier 2 (`@normal` + `@low`). Apply each Shared Check **once per screen**, not once per pattern.
|
|
63
15
|
|
|
64
|
-
|
|
65
|
-
- Record Count: "Total records" on UI matches server data exactly
|
|
66
|
-
- Row Limit: displayed rows never exceed configured page size
|
|
67
|
-
- Cell Integrity: cell data matches database, correct format (date, currency, status label)
|
|
68
|
-
|
|
69
|
-
**Logic**
|
|
70
|
-
- Sorting: column sort refreshes table with correct order, updates header icon
|
|
71
|
-
- Row Actions: Edit/Delete/View buttons act on correct row ID
|
|
72
|
-
|
|
73
|
-
**Security**
|
|
74
|
-
- RBAC: hide sensitive columns or privileged action buttons without authority
|
|
75
|
-
- → Shared: XSS/Injection (data from DB displayed safely)
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
### 3. Create / Add
|
|
80
|
-
|
|
81
|
-
**UI/UX**
|
|
82
|
-
- Blank Slate: all fields empty or BA-specified defaults, NO cache from previous operation
|
|
83
|
-
- Required Indicator: required fields marked with visual cue (e.g., red *)
|
|
84
|
-
- Unsaved Changes: navigate away with dirty form → browser/system warning popup
|
|
85
|
-
|
|
86
|
-
**Data & Validate**
|
|
87
|
-
- → Inherited: all Form & Inputs validation rules apply
|
|
88
|
-
- Unique Constraint: duplicate unique field (e.g., Employee ID) → reject save, inline error
|
|
89
|
-
- Data Dependency: selecting parent field loads correct child options
|
|
90
|
-
|
|
91
|
-
**Logic**
|
|
92
|
-
- Save & Close: toast notification, redirect to list, new record visible per sort rule
|
|
93
|
-
- Save & Add Another: save to DB, form resets to blank for next entry
|
|
94
|
-
- Double Submit Prevention: → same as Form & Inputs
|
|
95
|
-
- Cancel: form closes, NO garbage record in DB, next open shows blank form
|
|
96
|
-
|
|
97
|
-
**Security**
|
|
98
|
-
- API Bypass / 403: unauthorized POST → system blocks (403 Forbidden), no record created
|
|
99
|
-
- → Shared: XSS/Injection (persisted safely, not executed on display)
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
### 4. Update / Edit
|
|
104
|
-
|
|
105
|
-
**UI/UX**
|
|
106
|
-
- Pre-fill / Data Binding: all fields display exact current DB data (text, dropdown, radio, date...)
|
|
107
|
-
- Readonly Fields: identity fields (ID, username, employee code) disabled, no interaction
|
|
108
|
-
- Cancel: no data changed in DB; if dirty → unsaved changes warning
|
|
109
|
-
|
|
110
|
-
**Data & Validate**
|
|
111
|
-
- → Inherited: all Form & Inputs validation rules apply
|
|
112
|
-
- Unique Self: saving without changing unique field → success, no self-duplicate error
|
|
113
|
-
- Unique Conflict: changing unique field to existing value → duplicate error, block save
|
|
114
|
-
- Unchanged Submit: Save disabled until dirty, or success without DB UPDATE
|
|
115
|
-
|
|
116
|
-
**Logic**
|
|
117
|
-
- Update Success: toast "Updated successfully", new data reflects on UI immediately without reload
|
|
118
|
-
- Concurrent Edit: another user already edited → conflict warning, require reload
|
|
119
|
-
|
|
120
|
-
**Security**
|
|
121
|
-
- Authorization / 403: access edit without permission → 403 page
|
|
122
|
-
- Not Found / 404: edit deleted object → 404
|
|
123
|
-
|
|
124
|
-
---
|
|
16
|
+
> All checklist items are written in English. Render scenario names, step text, and test IDs in English.
|
|
125
17
|
|
|
126
|
-
|
|
18
|
+
## Routing table
|
|
127
19
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
**
|
|
153
|
-
- →
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
**
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
- Debounce: ~300ms delay before API call
|
|
165
|
-
|
|
166
|
-
**Security**
|
|
167
|
-
- → Shared: XSS/Injection
|
|
168
|
-
- Wildcards: `%`, `_`, `*` treated as literal text (escaped), not DB commands
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### 7. Filter
|
|
173
|
-
|
|
174
|
-
**UI/UX**
|
|
175
|
-
- Feedback: selected filters displayed as tags/badges
|
|
176
|
-
- Persistence: collapse/expand retains selected values
|
|
177
|
-
- Conflicts: conflicting conditions show "No data" message, layout intact
|
|
178
|
-
|
|
179
|
-
**Data & Validate**
|
|
180
|
-
- Range Validation: start > end or min > max → field error, Apply disabled
|
|
181
|
-
- Dropdown Integrity: options match 100% of actual data, hide unauthorized values
|
|
182
|
-
|
|
183
|
-
**Logic**
|
|
184
|
-
- AND/OR Logic: results satisfy correct filter logic, total count updated
|
|
185
|
-
- Dependent Filters: selecting Filter A updates Filter B options
|
|
186
|
-
- Reset & Navigation: reset returns original data or preserves state per spec
|
|
187
|
-
|
|
188
|
-
**Security**
|
|
189
|
-
- → Shared: URL Manipulation
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
### 8. Pagination
|
|
194
|
-
|
|
195
|
-
**UI/UX**
|
|
196
|
-
- Boundary States: Previous/First disabled on page 1, Next/Last disabled on last page
|
|
197
|
-
- Active Page: highlighted, loading effect during page transition
|
|
198
|
-
- Hidden: pagination bar hidden when data fits one page
|
|
199
|
-
|
|
200
|
-
**Data & Validate**
|
|
201
|
-
- Label Consistency: "Viewing X of Y" matches actual data exactly
|
|
202
|
-
- Zero Records: pagination hidden, empty state displayed
|
|
203
|
-
|
|
204
|
-
**Logic**
|
|
205
|
-
- Navigation: loads correct dataset for page (page 2, limit 10 = records 11-20)
|
|
206
|
-
- Change Page Size: shows correct quantity, resets to page 1
|
|
207
|
-
- Interaction Resets: new search/filter resets to page 1
|
|
208
|
-
|
|
209
|
-
**Security**
|
|
210
|
-
- → Shared: URL Manipulation
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## GROUP 3: NAVIGATION & CONTAINERS
|
|
215
|
-
|
|
216
|
-
### 9. Modal / Dialog
|
|
217
|
-
|
|
218
|
-
**UI/UX**
|
|
219
|
-
- Overlay: centered modal, backdrop blur, background scroll locked
|
|
220
|
-
- Focus Trapping: Tab key cycles only within modal elements
|
|
221
|
-
- Responsive: modal resizes, action buttons always visible or scrollable
|
|
20
|
+
| UI element on the screen | Pattern | Read file |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Plain input form (settings, profile, contact) | 1. Form & Inputs **(base)** | `group-a-data-entry.md` |
|
|
23
|
+
| File picker / drop zone | 2. File Upload | `group-a-data-entry.md` |
|
|
24
|
+
| Bulk import / export | 3. Import / Export | `group-a-data-entry.md` |
|
|
25
|
+
| "Add" / "Create" / "New" | 4. Create / Add | `group-b-data-ops.md` |
|
|
26
|
+
| "Edit" / pencil icon / inline edit | 5. Update / Edit | `group-b-data-ops.md` |
|
|
27
|
+
| "Delete" / trash icon | 6. Delete | `group-b-data-ops.md` |
|
|
28
|
+
| Rows + columns grid | 7. Data Table | `group-c-data-explore.md` |
|
|
29
|
+
| Search box / search bar | 8. Search | `group-c-data-explore.md` |
|
|
30
|
+
| Filter controls (dropdown, date range, checkboxes) | 9. Filter | `group-c-data-explore.md` |
|
|
31
|
+
| Card / list grid, infinite scroll, "Load More" | 10. List / Card View | `group-c-data-explore.md` |
|
|
32
|
+
| Charts / KPI cards / dashboard | 11. Chart / Analytics | `group-d-display.md` |
|
|
33
|
+
| Overlay panel on top of the page | 12. Modal / Dialog | `group-d-display.md` |
|
|
34
|
+
| Side menu / tabs / breadcrumb / top nav | 13. Navigation | `group-d-display.md` |
|
|
35
|
+
| Toast / snackbar / alert / banner | 14. Notification / Toast / Alert | `group-d-display.md` |
|
|
36
|
+
| Login form / logout button | 15. Login / Logout | `group-e-identity.md` |
|
|
37
|
+
| Sign-up form / SSO | 16. Register | `group-e-identity.md` |
|
|
38
|
+
| Forgot / reset / change password | 17. Password Management | `group-e-identity.md` |
|
|
39
|
+
|
|
40
|
+
## Pattern selection (precedence & inheritance)
|
|
41
|
+
|
|
42
|
+
A screen often matches several patterns at once — a login screen is *both* a form and an authentication flow. Use these rules so the choice is deterministic and scenarios are never duplicated:
|
|
43
|
+
|
|
44
|
+
1. **Most specific wins.** Pick the most specialized pattern as the screen's primary section. Auth and CRUD forms route to their specific pattern, NOT to Form & Inputs:
|
|
45
|
+
- Login/logout → **15**, sign-up → **16**, forgot/reset/change password → **17**
|
|
46
|
+
- Create form → **4**, edit form → **5**
|
|
47
|
+
2. **Form & Inputs (1) is a BASE pattern, not a sibling.** Generate it as its own section only for a plain form with no more-specific role (settings, profile, contact). When a specialization applies, do NOT also create a separate "Form & Inputs" section.
|
|
48
|
+
3. **Inheritance.** A specialized form pattern (4, 5, 15, 16, 17) **inherits** Form & Inputs field-level validation (required, format, maxlength, whitespace, real-time error clear) and adds its own rules. Apply the inherited checks inside the specialized section — generate each check once, never twice.
|
|
49
|
+
4. **Genuinely parallel pairs** — these cover different concerns; choose per the table:
|
|
50
|
+
|
|
51
|
+
| If the screen has… | Decision |
|
|
52
|
+
|---|---|
|
|
53
|
+
| A grid of records | Pick **7. Data Table** *or* **10. List/Card** by layout (rows+columns → Table; cards/tiles/infinite-scroll → List/Card) — not both for the same surface |
|
|
54
|
+
| Both a keyword box and filter controls | Apply **8. Search** *and* **9. Filter** (Search = free-text match; Filter = structured narrowing) + one combined AND-logic scenario |
|
|
55
|
+
| A form rendered inside an overlay | Apply the form's pattern (1/4/5/15…) for fields/submit **and** **12. Modal/Dialog** for open/close/focus-trap/backdrop |
|
|
222
56
|
|
|
223
|
-
|
|
224
|
-
- Dismiss Actions: close via X, Cancel, Escape, backdrop click → resets data to default on reopen
|
|
57
|
+
## 4 Viewpoints
|
|
225
58
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
59
|
+
| VP | Focus | Tag |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| **UI/UX** | Interface state, layout, visual feedback | VP-UI |
|
|
62
|
+
| **Data & Validate** | Input constraints, data integrity, error messages | VP-VAL |
|
|
63
|
+
| **Logic** | Business rules, interactions, state changes | VP-LOGIC |
|
|
64
|
+
| **Security** | Authentication, authorization, injection | VP-SEC |
|
|
230
65
|
|
|
231
|
-
**
|
|
232
|
-
-
|
|
233
|
-
-
|
|
66
|
+
**Classification rules:**
|
|
67
|
+
- VP-UI = state that is always true regardless of what the user does (element present, layout, label)
|
|
68
|
+
- VP-VAL = outcome depends on the input *value* (valid / invalid / boundary)
|
|
69
|
+
- VP-LOGIC = outcome depends on the user's *action* (click, submit, navigate)
|
|
70
|
+
- VP-SEC = checks access control and malicious input
|
|
234
71
|
|
|
235
72
|
---
|
|
236
73
|
|
|
237
|
-
##
|
|
238
|
-
|
|
239
|
-
### 10. List / Card
|
|
240
|
-
|
|
241
|
-
**UI/UX**
|
|
242
|
-
- → Shared: Empty State, Loading State
|
|
243
|
-
- Hover Effect: shadow/scale on card hover
|
|
244
|
-
- Content: text truncation without breaking card height, placeholder image on broken image
|
|
74
|
+
## Shared Checks
|
|
245
75
|
|
|
246
|
-
**
|
|
247
|
-
|
|
248
|
-
- Total Count: matches actual database count after filtering
|
|
76
|
+
Generate **once per screen**, do not repeat for each pattern.
|
|
77
|
+
Each pattern only points back with "Shared checks applied: [name]".
|
|
249
78
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
79
|
+
| Check | Condition → Expected | VP | Priority |
|
|
80
|
+
|---|---|---|---|
|
|
81
|
+
| **Loading State** | Data fetch in progress → spinner/skeleton shown, user cannot interact | UI | @normal |
|
|
82
|
+
| **Empty State** | Query returns 0 records → clear message shown, layout does not break | UI | @normal |
|
|
83
|
+
| **XSS** | Script tag entered into a field → rendered as literal text, not executed | SEC | @high |
|
|
84
|
+
| **SQL injection** | SQL payload entered into a field → DB unaffected, no data exposed | SEC | @high |
|
|
85
|
+
| **URL Manipulation** | URL params wrong/missing/out-of-range → fallback to default, no 500 crash | SEC | @high |
|
|
255
86
|
|
|
256
|
-
**
|
|
257
|
-
- RBAC: hide sensitive data or privileged buttons from DOM
|
|
258
|
-
- Network Resilience: error message + "Retry" button on connection loss
|
|
87
|
+
> **SQL injection — 2 layers for search/LIKE fields**: (1) field-level: UI blocks special chars → `@high` automated; (2) API-level: if the field reaches a LIKE query (search, partial-match), send `1 OR 1=1` straight to the API endpoint (bypassing the UI) → verify a parameterized query is used → `@high @manual`. Missing layer 2 = a real attack vector is overlooked even when field validation is correct.
|
|
259
88
|
|
|
260
89
|
---
|
|
261
90
|
|
|
262
91
|
## Security Tag Rules
|
|
263
92
|
|
|
264
93
|
For VP-SEC scenarios testing **unauthorized access** (no login, wrong role, direct URL):
|
|
265
|
-
- Use **`@no-auth`** tag — runs without authentication to verify redirect/block.
|
|
94
|
+
- Use the **`@no-auth`** tag — runs without authentication to verify the redirect/block.
|
|
266
95
|
- Do NOT use `@manual` for these — they are automatable.
|
|
267
96
|
|
|
268
97
|
```gherkin
|
|
@@ -23,23 +23,24 @@ You are a **Senior QA Reviewer**. You evaluate Gherkin test cases using the `sun
|
|
|
23
23
|
1. **Enumerate feature files** — glob `<base>/<name>/features/*.feature`. A screen may have one main file (`<name>.feature`) plus sub-features (`<name>-<sub>.feature` like `awards-modal.feature`); a flow has a single `<name>.feature`. If zero `.feature` files found → `/sungen-create-test` first.
|
|
24
24
|
2. **Review every feature file** — for each `<basename>.feature` discovered in step 1:
|
|
25
25
|
- Read `<basename>.feature` and the matching `test-data/<basename>.yaml`.
|
|
26
|
-
- Apply the `sungen-tc-review` skill — score
|
|
27
|
-
- Apply the **Unverified Selectors check** — if `<base>/<name>/selectors/<basename>.yaml` exists, count lines matching `@needs-live-verify`. Include in the per-file report as a non-scoring metric. Does NOT affect the
|
|
26
|
+
- Apply the `sungen-tc-review` skill — score the **7-dimension rubric (100 pts)**: Structure & Format (15), Coverage (30), Assertion Quality (20), Test Data (10), Security & Permission (10), Automation Readiness (10), Maintainability (5). **For flows**, also apply the flow-specific checks (Layer A7 "Tags & Flow"). Use `sungen-viewpoint` for pattern checklists.
|
|
27
|
+
- Apply the **Unverified Selectors check** — if `<base>/<name>/selectors/<basename>.yaml` exists, count lines matching `@needs-live-verify`. Include in the per-file report as a non-scoring metric. Does NOT affect the score or the PASS threshold.
|
|
28
28
|
3. **Aggregated output** — present scores in a per-feature table, then a screen-level rollup:
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
Feature
|
|
32
|
-
|
|
33
|
-
home.feature
|
|
34
|
-
home-modal.feature
|
|
35
|
-
|
|
36
|
-
Screen rollup (mean)
|
|
31
|
+
Feature Total Verdict Unverified
|
|
32
|
+
─────────────────────────────────────────────────────
|
|
33
|
+
home.feature 88 PASS 0
|
|
34
|
+
home-modal.feature 64 CONDITIONAL 2
|
|
35
|
+
─────────────────────────────────────────────────────
|
|
36
|
+
Screen rollup (mean) 76 PASS
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
- **>=
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
39
|
+
- **>= 70**: PASS that file.
|
|
40
|
+
- **50–69**: CONDITIONAL — fix before execution.
|
|
41
|
+
- **< 50**: FAIL — revise & re-review.
|
|
42
|
+
- "Unverified" = count of `@needs-live-verify` selectors (non-scoring). Show the full per-file report (dimension breakdown, recommendations, top issues) **only for files that are CONDITIONAL or FAIL**, or when the user asks for the deep report.
|
|
43
|
+
4. If any file is CONDITIONAL or FAIL and user confirms → update that file's test cases following `sungen-gherkin-syntax` and `sungen-tc-generation` skills, then re-review **only those files** (skip already-passing ones to save time).
|
|
43
44
|
5. After all files PASS (or user decides to proceed), offer next steps:
|
|
44
45
|
|
|
45
46
|
- **`/sungen-run-test ${input:name}`** — Generate selectors, compile, and run tests for **every feature** in this screen (Recommended)
|
|
@@ -12,7 +12,7 @@ You generate 3 files for sungen — a Gherkin compiler that produces Playwright
|
|
|
12
12
|
| `sungen-tc-generation` | Test case generation strategy, output format |
|
|
13
13
|
| `sungen-test-design-techniques` | EP, BVA, Decision Table, State Transition — systematic scenario generation |
|
|
14
14
|
| `sungen-tc-review` | Review scoring, quality rules, checklist |
|
|
15
|
-
| `sungen-viewpoint` |
|
|
15
|
+
| `sungen-viewpoint` | 17 UI patterns x 4 viewpoints — coverage checklists |
|
|
16
16
|
| `sungen-selector-keys` | YAML key generation from `[Reference]` names, suffixes, lookup priority |
|
|
17
17
|
| `sungen-selector-fix` | Selector generation from live page, auto-fix strategy |
|
|
18
18
|
| `sungen-delivery` | Export Gherkin + Playwright results → CSV test case deliverable |
|
|
@@ -59,7 +59,7 @@ The CLI reads the **per-target result file first** (co-located with `.spec.ts`),
|
|
|
59
59
|
|
|
60
60
|
| CSV Column | Source |
|
|
61
61
|
|------------|--------|
|
|
62
|
-
| TC ID | Generated: `<SCREEN_UPPER>-<
|
|
62
|
+
| TC ID | Generated, namespaced per screen/flow: `<SCREEN_UPPER>-<CAT>-<NNN>` (e.g. `VP-SEC-001` on screen `login` → `LOGIN-SEC-001`). The namespace makes it globally unique — the stable key the dashboard tracks each test case by. |
|
|
63
63
|
| Category 1 | Scenario name with VP prefix stripped |
|
|
64
64
|
| Category 2 | VP group: `VP-SEC`→Accessing, `VP-UI`→GUI, `VP-VAL`/`VP-LOGIC`→Function |
|
|
65
65
|
| Category 3 | Feature name (first line of `.feature`) |
|
|
@@ -198,6 +198,20 @@ Any tag not listed above passes through to Playwright `{ tag: [...] }`. Feature-
|
|
|
198
198
|
| `@auto` | Standard scenario, ready for automation |
|
|
199
199
|
| Any custom | e.g., `@sprint-42`, `@team-payment` — any tag works |
|
|
200
200
|
|
|
201
|
+
**Assign priority by user impact** (canonical mapping — override only when context differs):
|
|
202
|
+
|
|
203
|
+
| Scenario type | Tag |
|
|
204
|
+
|---|---|
|
|
205
|
+
| Auth redirect / unauthenticated access | `@high` |
|
|
206
|
+
| CRUD happy path (create / update / delete — success) | `@high` |
|
|
207
|
+
| Core business rule, state transition | `@high` |
|
|
208
|
+
| XSS, SQL injection, permission blocked | `@high` |
|
|
209
|
+
| Required field error, unique/duplicate constraint | `@high` |
|
|
210
|
+
| Format validation (email, phone, date…) | `@normal` |
|
|
211
|
+
| Boundary value — inclusive (`<=`, `>=`) → `@high`; standard range → `@normal` | `@normal` |
|
|
212
|
+
| Secondary features (search, filter, sort, pagination) | `@normal` |
|
|
213
|
+
| Element presence, label, placeholder, tooltip | `@low` |
|
|
214
|
+
|
|
201
215
|
**Run filtered:**
|
|
202
216
|
```bash
|
|
203
217
|
npx playwright test --grep "@smoke" # only smoke tests
|
|
@@ -352,12 +366,10 @@ Feature: User Management
|
|
|
352
366
|
Scenario: Create user shows form
|
|
353
367
|
When User click [Add User] button
|
|
354
368
|
Then User see [Create User] dialog
|
|
355
|
-
# After test: overlay auto-dismissed, forms auto-cleared by base.ts
|
|
356
369
|
|
|
357
370
|
Scenario: Search user by name
|
|
358
371
|
When User fill [Search] field with {{search_name}}
|
|
359
372
|
Then User see [User Row] row
|
|
360
|
-
# After test: search field auto-cleared by base.ts
|
|
361
373
|
```
|
|
362
374
|
|
|
363
375
|
| Tag | What base.ts does after each test |
|
|
@@ -371,27 +383,9 @@ Feature: User Management
|
|
|
371
383
|
|
|
372
384
|
Only when `@cleanup:*` tags aren't enough — feature-specific logic.
|
|
373
385
|
|
|
374
|
-
```gherkin
|
|
375
|
-
@auth:admin
|
|
376
|
-
@cleanup:overlay
|
|
377
|
-
Feature: Dashboard
|
|
378
|
-
Path: /dashboard
|
|
379
|
-
|
|
380
|
-
Background:
|
|
381
|
-
Given User is on [Dashboard] page
|
|
382
|
-
|
|
383
|
-
@afterEach
|
|
384
|
-
Scenario: Reset dashboard filters
|
|
385
|
-
When User select [Date Filter] dropdown with {{default_period}}
|
|
386
|
-
|
|
387
|
-
Scenario: Filter by last week
|
|
388
|
-
When User select [Date Filter] dropdown with {{last_week}}
|
|
389
|
-
Then User see [Revenue Chart] section
|
|
390
|
-
```
|
|
391
|
-
|
|
392
386
|
### Layer 3: `@beforeAll` / `@afterAll` (optional)
|
|
393
387
|
|
|
394
|
-
For one-time setup/teardown.
|
|
388
|
+
For one-time setup/teardown.
|
|
395
389
|
|
|
396
390
|
**Rendering order in `.spec.ts`:**
|
|
397
391
|
`test.describe` → `test.use(storageState)` → `test.use(autoCleanup)` → `test.beforeAll` → `test.beforeEach` → `test.afterEach` → `test.afterAll` → `test()` blocks
|