@sun-asterisk/sungen 2.6.15 → 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
package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# GROUP D: DISPLAY & FEEDBACK
|
|
2
|
+
|
|
3
|
+
> The user reads visualized data, interacts with overlay panels, moves between sections, and receives feedback from the system.
|
|
4
|
+
|
|
5
|
+
Patterns: 11. Chart / Analytics · 12. Modal / Dialog · 13. Navigation · 14. Notification / Toast / Alert
|
|
6
|
+
See `SKILL.md` for the 4 Viewpoints, Shared Checks, and Security Tag Rules.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 11. Chart / Analytics
|
|
11
|
+
|
|
12
|
+
**Apply when**: the screen has charts (bar, line, pie, donut, scatter…) or a dashboard showing aggregate figures (KPI cards, metrics).
|
|
13
|
+
|
|
14
|
+
**Shared checks applied**: Loading State, Empty State
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
### Tier 1 — @high
|
|
19
|
+
|
|
20
|
+
**[VP-LOGIC] Data accuracy**
|
|
21
|
+
|
|
22
|
+
- The values shown on the chart (numbers, %, totals) match exactly the raw data in the DB after computation
|
|
23
|
+
- Change the time range/filter → the chart reloads with the correct data for the new range, no stale data from the previous fetch
|
|
24
|
+
- Hover a data point/bar/slice → the tooltip shows the exact value, matching the corresponding Y/X axis
|
|
25
|
+
- Multiple series on one chart → the legend has the correct names and colors, toggling hide/show hides/shows the corresponding data
|
|
26
|
+
- Click a data point with drill-down → navigate to a list/detail showing exactly the records of that dimension
|
|
27
|
+
|
|
28
|
+
**[VP-VAL] Data integrity**
|
|
29
|
+
|
|
30
|
+
- A chart with a value of 0 → shows 0 clearly (bar height = 0, the data point is not hidden), no crash
|
|
31
|
+
- A chart with a single data point → renders correctly, no scale/ratio glitch
|
|
32
|
+
- A very large outlier value → the Y-axis scale adjusts to fit, smaller data points remain distinguishable
|
|
33
|
+
|
|
34
|
+
**[VP-SEC]**
|
|
35
|
+
|
|
36
|
+
- A chart showing another tenant's data via a changed URL param → 403 Forbidden, no data returned
|
|
37
|
+
- Sensitive data (salary, private revenue) for a user without permission → the API returns no data, the chart shows "No permission" instead of an empty state
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### Tier 2 — @normal + @low
|
|
42
|
+
|
|
43
|
+
**[VP-UI] Interface states**
|
|
44
|
+
|
|
45
|
+
- [@normal] Loading: a skeleton chart or spinner shows while fetching, axes and labels do not flash/flicker when the data arrives
|
|
46
|
+
- [@normal] Responsive: the chart resizes correctly when the viewport changes, no overflow of the container and no clipping
|
|
47
|
+
- [@normal] Legend: the colors in the legend match exactly the colors on the chart, clicking toggles hide/show of a series immediately
|
|
48
|
+
- [@low] Axis labels: do not overlap (rotate if needed), have a clear unit (VND, %, people)
|
|
49
|
+
- [@low] Export chart (if present): the PNG/PDF file contains the chart currently shown, including title, legend, and axis labels
|
|
50
|
+
|
|
51
|
+
**[VP-VAL] Edge cases**
|
|
52
|
+
|
|
53
|
+
- [@normal] API timeout/error → the chart area shows a clear error state + a "Retry" button, not an empty chart or a chart with stale data
|
|
54
|
+
- [@normal] A very wide time range (multiple years) → the chart aggregates data correctly (by month/quarter, not by day), no performance issue or layout break
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### ⚡ Cross-pattern interactions
|
|
59
|
+
|
|
60
|
+
- **+ Filter**: Apply a filter → the chart re-renders with filtered data, the title/subtitle updates to reflect the active filter
|
|
61
|
+
- **+ Data Table**: Chart and table shown on the same screen → the total on the chart matches the total rows in the table
|
|
62
|
+
- **+ Export**: Export data from the chart → the CSV/XLSX contains raw data matching exactly the values shown on the chart
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 12. Modal / Dialog
|
|
67
|
+
|
|
68
|
+
**Apply when**: the screen has an overlay panel that opens on top of the main page (confirm an action, a small form, show details).
|
|
69
|
+
|
|
70
|
+
**Shared checks applied**: (no default shared check)
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Tier 1 — @high
|
|
75
|
+
|
|
76
|
+
**[VP-LOGIC] Open/close behavior**
|
|
77
|
+
|
|
78
|
+
- Trigger the modal (click a button/link) → the modal opens with the correct content, a backdrop overlay covers the whole background
|
|
79
|
+
- Click the X or Cancel button → the modal closes, the user's entered data is cleared, the background is unchanged
|
|
80
|
+
- Press Escape → the modal closes, equivalent to Cancel
|
|
81
|
+
- Click the backdrop (outside the modal area) → the modal closes if it is dismissible
|
|
82
|
+
- A submit action in the modal succeeds → the modal closes itself, the background data/list refreshes immediately without a page reload
|
|
83
|
+
- A submit action in the modal fails (server error) → the modal stays open, the error message appears inside the modal, the entered data is not lost
|
|
84
|
+
|
|
85
|
+
**[VP-VAL]**
|
|
86
|
+
|
|
87
|
+
- A form inside a modal: apply all the validation rules of the Form & Inputs pattern
|
|
88
|
+
- A confirmation dialog: only a message + 2 buttons Confirm/Cancel, no input field
|
|
89
|
+
|
|
90
|
+
**[VP-SEC]**
|
|
91
|
+
|
|
92
|
+
- A modal containing sensitive data (PII, credentials) → when the modal closes, the HTML is removed from the DOM (no longer present in inspect element)
|
|
93
|
+
- Trigger the modal without authentication → redirect to Login, the modal content is not rendered
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### Tier 2 — @normal + @low
|
|
98
|
+
|
|
99
|
+
**[VP-UI] Interface states**
|
|
100
|
+
|
|
101
|
+
- [@normal] Modal centered: in the middle of the viewport, the backdrop dims the whole screen, background scroll is locked
|
|
102
|
+
- [@normal] Focus trap: the Tab key only cycles through elements INSIDE the modal, does not jump out to the backdrop
|
|
103
|
+
- [@normal] Stacked modals: Modal B opens on top of Modal A → B has a higher z-index, closing B keeps A still present and usable
|
|
104
|
+
- [@normal] Responsive: on mobile the modal takes full width or a bottom-sheet form, the action buttons are not hidden by the keyboard
|
|
105
|
+
- [@low] Animation: the modal opens with a fade-in/slide-in, closes with a fade-out, no jitter or flicker
|
|
106
|
+
|
|
107
|
+
**[VP-VAL] Edge cases**
|
|
108
|
+
|
|
109
|
+
- [@normal] Reopen the modal after closing → the content resets to the initial state, no data retained from the previous open
|
|
110
|
+
- [@low] Modal content overflow: content taller than the viewport → the modal has an internal scroll, the background page does not scroll
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### ⚡ Cross-pattern interactions
|
|
115
|
+
|
|
116
|
+
- **+ Form & Inputs**: A modal form submit succeeds → the modal closes, a success toast shows on the background page
|
|
117
|
+
- **+ Create/Add**: A create form in a modal → on success: the modal closes, the list auto-refreshes, the total count increases by 1
|
|
118
|
+
- **+ Delete**: A confirmation modal → Confirm: the modal closes, the record is deleted, the list refreshes; Cancel: the modal closes, the record remains
|
|
119
|
+
- **+ Notification**: An action in the modal triggers a toast → the toast shows on the background page after the modal closes, not hidden by the modal
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 13. Navigation
|
|
124
|
+
|
|
125
|
+
**Apply when**: the screen has a side menu, tab bar, breadcrumb, or top navigation bar to move between sections/pages.
|
|
126
|
+
|
|
127
|
+
**Shared checks applied**: (no default shared check)
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### Tier 1 — @high
|
|
132
|
+
|
|
133
|
+
**[VP-LOGIC] Navigation behavior**
|
|
134
|
+
|
|
135
|
+
- Click a menu item/tab → navigate to the correct corresponding page/section, the URL changes correctly
|
|
136
|
+
- The active item is clearly highlighted (visually distinct from inactive items)
|
|
137
|
+
- Breadcrumb: click a parent-level link → navigate to the correct parent page, no 404
|
|
138
|
+
- Breadcrumb: the last item (current page) is plain text, not a link, not navigable
|
|
139
|
+
- Sub-menu: click a parent menu → the sub-menu expands; click again → it collapses; the state is preserved when navigating to another menu and back
|
|
140
|
+
|
|
141
|
+
**[VP-VAL]**
|
|
142
|
+
|
|
143
|
+
- A menu item with a badge/counter (notification count) → the number matches the actual unread count from the API, updates after reading
|
|
144
|
+
- A tab with dynamic content → switching tabs loads the correct content of that tab, not another tab's content
|
|
145
|
+
|
|
146
|
+
**[VP-SEC]**
|
|
147
|
+
|
|
148
|
+
- A menu item for a restricted page is shown but the user has no permission → click → a 403 page; or the item is hidden from the menu (verify the DOM has no link and the API returns no data)
|
|
149
|
+
- Direct URL access to a restricted page while not logged in → redirect to Login, the URL is preserved so post-login redirects correctly
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Tier 2 — @normal + @low
|
|
154
|
+
|
|
155
|
+
**[VP-UI] Interface states**
|
|
156
|
+
|
|
157
|
+
- [@normal] Side menu collapsed: icon-only mode, a tooltip shows the full menu name on icon hover
|
|
158
|
+
- [@normal] Side menu expanded: menu item names are fully shown, not truncated at normal lengths
|
|
159
|
+
- [@normal] Tab bar: tabs do not wrap to a second line, scroll horizontally if there are too many tabs
|
|
160
|
+
- [@normal] Responsive: the side menu becomes a hamburger menu on mobile, toggling open/close does not cover the main content
|
|
161
|
+
- [@low] Scroll restoration: navigate away and back via the browser Back button → the scroll position of the old page is restored
|
|
162
|
+
|
|
163
|
+
**[VP-VAL] Edge cases**
|
|
164
|
+
|
|
165
|
+
- [@normal] Browser back/forward button: navigates correctly per the history stack, no blank page or wrong URL
|
|
166
|
+
- [@low] Deep link: paste a sub-page URL into a new browser → loads that exact page (no redirect to home)
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### ⚡ Cross-pattern interactions
|
|
171
|
+
|
|
172
|
+
- **+ Filter/Search**: Navigate to another section/tab and back → the filter and search state are preserved, not reset to default
|
|
173
|
+
- **+ Notification**: The badge counter on a menu item updates when a new notification is received (without a page reload)
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 14. Notification / Toast / Alert
|
|
178
|
+
|
|
179
|
+
**Apply when**: the screen has a temporary feedback message (toast, snackbar) or a persistent alert (banner, inline alert) to report the result of an action.
|
|
180
|
+
|
|
181
|
+
**Shared checks applied**: (no default shared check)
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### Tier 1 — @high
|
|
186
|
+
|
|
187
|
+
**[VP-LOGIC] Message behavior**
|
|
188
|
+
|
|
189
|
+
- A successful action (save, delete, submit) → a success toast shows the correct message, auto-dismisses after ~3–5 seconds
|
|
190
|
+
- A failed action (validation error, server error) → an error toast/alert shows the correct message, does NOT auto-dismiss, the user must dismiss it actively
|
|
191
|
+
- Multiple actions in a row → each action has its own toast, the toasts stack in order of appearance, not overwriting each other
|
|
192
|
+
- Click X to dismiss a toast → the toast disappears immediately, the remaining toasts fill the gap
|
|
193
|
+
|
|
194
|
+
**[VP-VAL]**
|
|
195
|
+
|
|
196
|
+
- The message text matches exactly {{success_message}} / {{error_message}} in test-data.yaml, not hardcoded wrong
|
|
197
|
+
- The toast type matches the semantic: success → check icon + green background; error → X icon + red background; warning → ! icon + yellow background; info → i icon + blue background
|
|
198
|
+
|
|
199
|
+
**[VP-SEC]**
|
|
200
|
+
|
|
201
|
+
- A message containing data from user input (e.g. "Created '[record name]' successfully") → the name is rendered as literal text, no script execution (XSS)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### Tier 2 — @normal + @low
|
|
206
|
+
|
|
207
|
+
**[VP-UI] Interface states**
|
|
208
|
+
|
|
209
|
+
- [@normal] Position: the toast appears in the defined corner (top-right, bottom-center…), not covering the active action buttons or form fields
|
|
210
|
+
- [@normal] Progress bar (if present): the countdown bar runs for the correct duration, the toast auto-dismisses when it finishes
|
|
211
|
+
- [@normal] A toast appearing while a modal is open → the toast appears on top of the modal (higher z-index), not hidden by the backdrop
|
|
212
|
+
- [@low] Pause on hover: hover the toast → the auto-dismiss timer pauses; mouse leaves → the timer resumes from where it stopped
|
|
213
|
+
|
|
214
|
+
**[VP-VAL] Edge cases**
|
|
215
|
+
|
|
216
|
+
- [@normal] Very long message text → the toast wraps text within its container, no overflow out of the viewport
|
|
217
|
+
- [@low] Rapid fire: trigger 5+ actions in a row → toasts queue in the correct order, no UI crash, the oldest toast dismisses first
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### ⚡ Cross-pattern interactions
|
|
222
|
+
|
|
223
|
+
- **+ Create/Add**: Submit success → the success toast auto-dismisses; submit failure → the error toast stays until the user dismisses it
|
|
224
|
+
- **+ Delete**: Delete success → a success toast; blocked by a foreign key → an error toast stating the module still using the record
|
|
225
|
+
- **+ Import/Export**: An async operation completes → a toast or the notification bell updates with the result summary
|
|
226
|
+
- **+ Modal/Dialog**: An action in a modal → the modal closes first, then the toast shows on the background page
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# GROUP E: IDENTITY & AUTHENTICATION
|
|
2
|
+
|
|
3
|
+
> The user creates an account, authenticates their identity, and manages credentials.
|
|
4
|
+
|
|
5
|
+
Patterns: 15. Login / Logout · 16. Register · 17. Password Management
|
|
6
|
+
See `SKILL.md` for the 4 Viewpoints, Shared Checks, and Security Tag Rules.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 15. Login / Logout
|
|
11
|
+
|
|
12
|
+
**Apply when**: the screen has a login form and/or a logout button.
|
|
13
|
+
|
|
14
|
+
**Inherits**: Form & Inputs — field-level validation (required, format, maxlength, whitespace, real-time error clear). Generate those once here; this pattern adds the auth-specific rules below.
|
|
15
|
+
|
|
16
|
+
**Shared checks applied**: XSS/Injection
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
### Tier 1 — @high
|
|
21
|
+
|
|
22
|
+
**[VP-LOGIC] Auth behavior**
|
|
23
|
+
|
|
24
|
+
- Enter the correct email + password → login succeeds, redirect to the dashboard/home, a session is created with a valid token
|
|
25
|
+
- Click Logout → the session is destroyed server-side, redirect to the Login page, the old token no longer works
|
|
26
|
+
- After logout, use the browser Back button to a protected page → redirect to Login (no cached content shown)
|
|
27
|
+
- "Remember me" checked → the session persists after closing/reopening the browser (cookie expiry longer than the default session)
|
|
28
|
+
|
|
29
|
+
**[VP-VAL]**
|
|
30
|
+
|
|
31
|
+
- Correct email, wrong password → a generic error message "Email or password is incorrect" (does not state which field is wrong, to avoid enumeration)
|
|
32
|
+
- An email not in the system → the same generic error as a wrong password (does not reveal "email not registered")
|
|
33
|
+
- Wrong password N times in a row (N per config) → the account is temporarily locked, the error states the wait time
|
|
34
|
+
|
|
35
|
+
**[VP-SEC]**
|
|
36
|
+
|
|
37
|
+
- Access a protected page while not logged in → redirect to Login, the intended URL is preserved in a query param so post-login redirects correctly
|
|
38
|
+
- Login succeeds → a new session token is issued (session fixation prevention), the old pre-login token no longer works
|
|
39
|
+
- Password field: the value is not visible in the page source, not logged in the browser console or the network payload
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Tier 2 — @normal + @low
|
|
44
|
+
|
|
45
|
+
**[VP-UI] Interface states**
|
|
46
|
+
|
|
47
|
+
- [@normal] Password field: the show/hide toggle works, the eye/eye-off icon changes to the correct state
|
|
48
|
+
- [@normal] Submit button: disabled or showing a loading spinner while the API is being called (prevents double submit)
|
|
49
|
+
- [@normal] Login failure: the form keeps the entered email, only the password field is cleared
|
|
50
|
+
- [@low] Caps Lock warning: when Caps Lock is on → a warning text shows near the password field
|
|
51
|
+
|
|
52
|
+
**[VP-VAL] Edge cases**
|
|
53
|
+
|
|
54
|
+
- [@normal] Email with uppercase characters → login succeeds even when entering "User@Email.com" instead of "user@email.com" (case-insensitive)
|
|
55
|
+
- [@low] Session timeout while in use → redirect to Login with a toast "Your session has expired"
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### ⚡ Cross-pattern interactions
|
|
60
|
+
|
|
61
|
+
- **+ Navigation**: After a successful login → the active menu item reflects the first page the user is redirected to
|
|
62
|
+
- **+ Notification**: The API returns 401 while in use → a toast "Your session has expired" shows before redirecting to Login
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 16. Register
|
|
67
|
+
|
|
68
|
+
**Apply when**: the screen has a form to create a new account (email/password) or sign up via SSO (Google, Microsoft, Facebook…).
|
|
69
|
+
|
|
70
|
+
**Inherits**: Form & Inputs — field-level validation (required, format, maxlength, whitespace, real-time error clear). Generate those once here; this pattern adds the registration-specific rules below.
|
|
71
|
+
|
|
72
|
+
**Shared checks applied**: XSS/Injection
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Tier 1 — @high
|
|
77
|
+
|
|
78
|
+
**[VP-LOGIC] Registration flow**
|
|
79
|
+
|
|
80
|
+
- Fill in all valid information, submit → the account is created, the user receives a verification email, redirect to a confirmation page
|
|
81
|
+
- Sign up via SSO: click a provider button → redirect to the provider to authorize → redirect back to the app, the account is created/linked automatically, the user enters the app immediately without email verification
|
|
82
|
+
- Verification email link → click → the account is activated, the user can log in immediately
|
|
83
|
+
- An unverified account tries to access a protected page → blocked, a message asks for verification with a "Resend email" button
|
|
84
|
+
|
|
85
|
+
**[VP-VAL]**
|
|
86
|
+
|
|
87
|
+
- An email already in the system → submit is blocked, inline error "This email is already registered"
|
|
88
|
+
- A password that is not strong enough (below min length, missing a character type per the rule) → error at the field, no submit
|
|
89
|
+
- Confirm password differs from password → inline error "Passwords do not match", no submit
|
|
90
|
+
- Wrong email format → inline error at the email field, no submit
|
|
91
|
+
|
|
92
|
+
**[VP-SEC]**
|
|
93
|
+
|
|
94
|
+
- Submit without a CSRF token → the server rejects the request, no account is created
|
|
95
|
+
- The POST body contains an extra field `role=admin` → the server ignores that field, the account is created with the default role (user)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Tier 2 — @normal + @low
|
|
100
|
+
|
|
101
|
+
**[VP-UI] Interface states**
|
|
102
|
+
|
|
103
|
+
- [@normal] Password strength indicator: updates in real time as the user types, the color changes correctly by level (weak/medium/strong)
|
|
104
|
+
- [@normal] Terms & Conditions checkbox: Submit disabled while unchecked, enabled after checking
|
|
105
|
+
- [@normal] SSO buttons: the provider logos are correct, the button switches to loading/disabled while redirecting
|
|
106
|
+
- [@low] Resend verification email: the button only activates after the cooldown ends, disabled + a countdown timer shows during the wait
|
|
107
|
+
|
|
108
|
+
**[VP-VAL] Edge cases**
|
|
109
|
+
|
|
110
|
+
- [@normal] Register with a sub-address email (user+tag@gmail.com) → treated as a unique email, creation succeeds
|
|
111
|
+
- [@low] Browser autofill fills the fields → the form receives the correct values, no conflict with a custom input component
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### ⚡ Cross-pattern interactions
|
|
116
|
+
|
|
117
|
+
- **+ Login**: After register + email verification succeeds → the user can log in immediately with the just-created credentials
|
|
118
|
+
- **+ Notification**: Register success → a toast "Check your email to complete registration"; resend email → a cooldown toast with a countdown
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 17. Password Management
|
|
123
|
+
|
|
124
|
+
**Apply when**: the screen has a Forgot Password function, a Reset Password via email function, or a Change Password while logged in function.
|
|
125
|
+
|
|
126
|
+
**Inherits**: Form & Inputs — field-level validation (required, format, maxlength, whitespace, real-time error clear). Generate those once here; this pattern adds the password-specific rules below.
|
|
127
|
+
|
|
128
|
+
**Shared checks applied**: (no default shared check)
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Tier 1 — @high
|
|
133
|
+
|
|
134
|
+
**[VP-LOGIC] Password flow**
|
|
135
|
+
|
|
136
|
+
- *Forgot Password:* Enter a registered email → a reset-link email is sent to the inbox, an "email sent" message shows in the UI
|
|
137
|
+
- *Reset Password:* Click the link in the email → a set-new-password form opens; submit a valid password → the password is changed, the user can log in immediately with the new password
|
|
138
|
+
- *Single-use reset link:* Reuse an already-used link → 400/410, a message "Link already used", no second reset
|
|
139
|
+
- *Expired reset link:* Use a link past its expiry → 400/410, a message "Link expired" with a link back to the Forgot Password page
|
|
140
|
+
- *Change Password:* Enter the correct current password + a valid new password → the password is changed, all other sessions are invalidated immediately
|
|
141
|
+
|
|
142
|
+
**[VP-VAL]**
|
|
143
|
+
|
|
144
|
+
- *Forgot Password:* Enter an email not in the system → the same "email sent" message (does not reveal "email not registered")
|
|
145
|
+
- *Reset Password:* A new password that is not strong enough → error at the field, no submit
|
|
146
|
+
- *Reset Password:* Confirm password differs → inline error "Passwords do not match"
|
|
147
|
+
- *Change Password:* Enter the wrong current password → error "Current password is incorrect", the new password is not saved
|
|
148
|
+
- *Change Password:* The new password equals the current password → error "New password must differ from the old one"
|
|
149
|
+
|
|
150
|
+
**[VP-SEC]**
|
|
151
|
+
|
|
152
|
+
- A tampered/forged reset token in the URL → the server rejects it, 400 error, the password is unchanged
|
|
153
|
+
- The token is invalidated immediately after use: after a successful reset, reusing the same link → rejected
|
|
154
|
+
- The Change Password endpoint without authentication → 401 Forbidden, the password is unchanged
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### Tier 2 — @normal + @low
|
|
159
|
+
|
|
160
|
+
**[VP-UI] Interface states**
|
|
161
|
+
|
|
162
|
+
- [@normal] Forgot Password form: only 1 email field + a Submit button + a back-to-Login link, no extra fields
|
|
163
|
+
- [@normal] Reset Password form: both password fields are type=password with a show/hide toggle, a strength indicator updates in real time
|
|
164
|
+
- [@normal] Change Password form: 3 separate fields (current, new, confirm), fully separated from the profile form
|
|
165
|
+
- [@low] Rate limiting: send many reset requests in a row in a short time → the Submit button is on cooldown or a Captcha appears
|
|
166
|
+
|
|
167
|
+
**[VP-VAL] Edge cases**
|
|
168
|
+
|
|
169
|
+
- [@normal] Forgot Password sent multiple times for the same email → only the latest link is valid, all older links are invalidated
|
|
170
|
+
- [@low] Click a reset link from browser history after it was used → rejected immediately with a "Link already used" message
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### ⚡ Cross-pattern interactions
|
|
175
|
+
|
|
176
|
+
- **+ Login**: Reset succeeds → redirect to Login with a toast "Password changed successfully, please log in again"
|
|
177
|
+
- **+ Notification**: Change Password succeeds → a success toast in the UI + an email notification "Your account password was just changed" sent to the inbox
|