@sun-asterisk/sungen 2.6.15 → 2.7.0-beta.1
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/project-initializer.d.ts +5 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +16 -0
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +9 -1
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-review.md +13 -12
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-run-test.md +4 -2
- 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-selector-fix.md +57 -11
- package/dist/orchestrator/templates/ai-instructions/claude-skill-selector-keys.md +41 -31
- package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +386 -326
- 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-create-test.md +9 -1
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +13 -12
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +4 -2
- 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-selector-fix.md +61 -15
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +41 -31
- 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/dist/orchestrator/templates/qa-context.md +90 -0
- package/dist/orchestrator/templates/readme.md +16 -13
- 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/project-initializer.ts +20 -0
- package/src/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +9 -1
- package/src/orchestrator/templates/ai-instructions/claude-cmd-review.md +13 -12
- package/src/orchestrator/templates/ai-instructions/claude-cmd-run-test.md +4 -2
- 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-selector-fix.md +57 -11
- package/src/orchestrator/templates/ai-instructions/claude-skill-selector-keys.md +41 -31
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +386 -326
- 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-create-test.md +9 -1
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +13 -12
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-run-test.md +4 -2
- 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-selector-fix.md +61 -15
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-keys.md +41 -31
- 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/src/orchestrator/templates/qa-context.md +90 -0
- package/src/orchestrator/templates/readme.md +16 -13
|
@@ -166,37 +166,47 @@ Resolver searches in this order:
|
|
|
166
166
|
|
|
167
167
|
If no YAML key exists, the resolver infers from the Gherkin element type:
|
|
168
168
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
|
178
|
-
|
|
179
|
-
| `[X]
|
|
180
|
-
| `[X]
|
|
181
|
-
| `[X]
|
|
182
|
-
| `[X]
|
|
183
|
-
| `[X]
|
|
184
|
-
| `[X]
|
|
185
|
-
| `[X]
|
|
186
|
-
| `[X]
|
|
187
|
-
| `[X]
|
|
188
|
-
| `[X]
|
|
189
|
-
| `[X]
|
|
190
|
-
| `[X]
|
|
191
|
-
| `[X]
|
|
192
|
-
| `[X]
|
|
193
|
-
| `[X]
|
|
194
|
-
| `[X]
|
|
195
|
-
| `[X]
|
|
196
|
-
| `[X]
|
|
197
|
-
| `[X]
|
|
198
|
-
|
|
199
|
-
|
|
169
|
+
> ⚠️ **Auto-infer pitfall — the #1 cause of selector failures in production.**
|
|
170
|
+
>
|
|
171
|
+
> `[X] button` auto-infers as `getByRole('button', { name: 'X' })`. This **only works** when the button's accessible name in the DOM is **exactly `X`** — same language, same text, same casing.
|
|
172
|
+
>
|
|
173
|
+
> The Gherkin `[Reference]` is your human label for the element, **not** the DOM name. If the app is in Vietnamese (or any language where the Gherkin label differs from DOM text), auto-infer will produce `No element found` at runtime. **Write an explicit YAML entry** with the real DOM name instead.
|
|
174
|
+
>
|
|
175
|
+
> **Decision rule**: auto-infer is safe ONLY when you have confirmed in the snapshot that the DOM element's accessible name / placeholder text is literally `X`. When in doubt → write YAML.
|
|
176
|
+
|
|
177
|
+
| Gherkin | Inferred locator | Safe when… |
|
|
178
|
+
|---|---|---|
|
|
179
|
+
| `[X] button` | `getByRole('button', { name: 'X' })` | Button's accessible name = X |
|
|
180
|
+
| `[X] link` | `getByRole('link', { name: 'X' })` | Link text = X |
|
|
181
|
+
| `[X] heading` / `header` | `getByRole('heading', { name: 'X' })` | Heading text = X |
|
|
182
|
+
| `[X] checkbox` | `getByRole('checkbox', { name: 'X' })` | Checkbox label = X |
|
|
183
|
+
| `[X] radio` | `getByRole('radio', { name: 'X' })` | Radio label = X |
|
|
184
|
+
| `[X] field` | `getByPlaceholder('X')` | Placeholder text = X AND field has a placeholder |
|
|
185
|
+
| `[X] text` / `message` / `label` | `getByText('X')` | Visible text = X (partial match) |
|
|
186
|
+
| `[X] logo/image/icon` | `getByRole('img', { name: 'X' })` | Image alt = X |
|
|
187
|
+
| `[X] search` | `getByRole('searchbox', { name: 'X' })` | Searchbox label = X |
|
|
188
|
+
| `[X] option` | `getByRole('option', { name: 'X' })` | Option text = X |
|
|
189
|
+
| `[X] slider` | `getByRole('slider', { name: 'X' })` | Slider label = X |
|
|
190
|
+
| `[X] toggle` | `getByRole('switch', { name: 'X' })` | Toggle label = X |
|
|
191
|
+
| `[X] tab` | `getByRole('tab', { name: 'X' })` | Tab text = X |
|
|
192
|
+
| `[X] table` | `getByRole('table', { name: 'X' })` | Table aria-label = X |
|
|
193
|
+
| `[X] list` | `getByRole('list', { name: 'X' })` | List aria-label = X |
|
|
194
|
+
| `[X] column` | `getByRole('columnheader', { name: 'X' })` | Column header text = X |
|
|
195
|
+
| `[X] dialog` / `modal` / `drawer` | `getByRole('dialog', { name: 'X' })` | Dialog aria-label/heading = X |
|
|
196
|
+
| `[X] dropdown` / `select` | `getByRole('combobox', { name: 'X' })` | Combobox label = X |
|
|
197
|
+
| `[X] menuitem` | `getByRole('menuitem', { name: 'X' })` | Menu item text = X |
|
|
198
|
+
| `[X] progressbar` | `getByRole('progressbar', { name: 'X' })` | Progressbar label = X |
|
|
199
|
+
| `[X] section` | `getByRole('region', { name: 'X' })` | Section aria-label = X |
|
|
200
|
+
| `[X] card` | `getByRole('article', { name: 'X' })` | Card aria-label = X |
|
|
201
|
+
| `[X] item` | `getByRole('listitem', { name: 'X' })` | List item text = X |
|
|
202
|
+
| `[X] cell` | `getByRole('cell', { name: 'X' })` | Cell text = X |
|
|
203
|
+
| `[X] spinner` | `getByRole('status', { name: 'X' })` | Spinner aria-label = X |
|
|
204
|
+
| `[X] breadcrumb` | `getByRole('navigation', { name: 'X' })` | Navigation aria-label = X |
|
|
205
|
+
| `[X] badge` / `tooltip` / `tag` | `getByText('X')` | Visible text = X |
|
|
206
|
+
|
|
207
|
+
**Special note on `[X] field`**: `getByPlaceholder('X')` only works when (1) the field has a placeholder attribute AND (2) the placeholder text equals X. For fields without placeholders (floating labels, aria-label), write explicit YAML: `type: label, value: "Actual label text"`.
|
|
208
|
+
|
|
209
|
+
**Only add a YAML entry when** auto-infer cannot work: DOM name differs from Gherkin label, need `testid`, need `nth`, need `exact: true`, or the field type requires explicit config.
|
|
200
210
|
|
|
201
211
|
### Types requiring YAML entry (no auto-infer)
|
|
202
212
|
|