@sun-asterisk/sungen 3.2.21 → 3.2.22-beta.2
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/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +8 -0
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts +3 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +15 -0
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/inspect.d.ts +41 -0
- package/dist/cli/commands/inspect.d.ts.map +1 -0
- package/dist/cli/commands/inspect.js +134 -0
- package/dist/cli/commands/inspect.js.map +1 -0
- package/dist/cli/commands/trace.d.ts.map +1 -1
- package/dist/cli/commands/trace.js +9 -0
- package/dist/cli/commands/trace.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/exporters/matrix/build.d.ts +10 -0
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +38 -0
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +11 -0
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
- package/dist/exporters/matrix/render-xlsx.js +44 -1
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +10 -0
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/playwright-report-parser.d.ts.map +1 -1
- package/dist/exporters/playwright-report-parser.js +1 -0
- package/dist/exporters/playwright-report-parser.js.map +1 -1
- package/dist/exporters/types.d.ts +2 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/imports.hbs +9 -0
- package/dist/generators/test-generator/adapters/appium/templates/scenario.hbs +23 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/capture-row-column.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +10 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-with-alert-action.hbs +7 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/drag-action.hbs +14 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/table-action-in-row-nth.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-assertion.hbs +17 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-element.hbs +13 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-filter-assertion.hbs +26 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +24 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-variable-assertion.hbs +9 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-dialog-heading-assertion.hbs +10 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-filter-assertion.hbs +14 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +21 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-variable-assertion.hbs +10 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/row-scoped-column-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +23 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/storage-key-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/tab-order-assertion.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-dialog-heading-assertion.hbs +10 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-filtered-assertion.hbs +17 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +13 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/navigation/wait-table-refresh.hbs +13 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/drag-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/frame-enter-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -5
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/row-scoped-column-assertion.hbs +1 -0
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +29 -8
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +25 -1
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +24 -0
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/index.d.ts +45 -0
- package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/index.js +159 -20
- package/dist/generators/test-generator/patterns/index.js.map +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts +36 -0
- package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.d.ts +33 -0
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +100 -24
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/harness/audit.d.ts +2 -0
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +101 -10
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/flow-contract.d.ts +87 -0
- package/dist/harness/flow-contract.d.ts.map +1 -0
- package/dist/harness/flow-contract.js +259 -0
- package/dist/harness/flow-contract.js.map +1 -0
- package/dist/harness/flow-plan.d.ts +3 -0
- package/dist/harness/flow-plan.d.ts.map +1 -1
- package/dist/harness/flow-plan.js +6 -2
- package/dist/harness/flow-plan.js.map +1 -1
- package/dist/harness/parse.d.ts +5 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +29 -1
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/perf.d.ts +40 -0
- package/dist/harness/perf.d.ts.map +1 -0
- package/dist/harness/perf.js +136 -0
- package/dist/harness/perf.js.map +1 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +13 -1
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/spec-coverage.d.ts +8 -0
- package/dist/harness/spec-coverage.d.ts.map +1 -1
- package/dist/harness/spec-coverage.js +60 -6
- package/dist/harness/spec-coverage.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/add-flow.md +51 -3
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +10 -0
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +23 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md +2 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +61 -12
- package/dist/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +22 -8
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +65 -17
- package/dist/orchestrator/templates/qa-context.md +14 -1
- package/dist/orchestrator/templates/specs-api.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-api.js +104 -29
- package/dist/orchestrator/templates/specs-api.js.map +1 -1
- package/dist/orchestrator/templates/specs-api.ts +104 -26
- package/dist/orchestrator/templates/specs-db.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-db.js +18 -5
- package/dist/orchestrator/templates/specs-db.js.map +1 -1
- package/dist/orchestrator/templates/specs-db.ts +19 -5
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +8 -0
- package/src/cli/commands/delivery.ts +14 -2
- package/src/cli/commands/inspect.ts +128 -0
- package/src/cli/commands/trace.ts +9 -0
- package/src/cli/index.ts +2 -0
- package/src/exporters/matrix/build.ts +40 -0
- package/src/exporters/matrix/export.ts +11 -0
- package/src/exporters/matrix/render-xlsx.ts +45 -1
- package/src/exporters/matrix/types.ts +10 -0
- package/src/exporters/playwright-report-parser.ts +2 -0
- package/src/exporters/types.ts +2 -0
- package/src/generators/test-generator/adapters/appium/templates/imports.hbs +9 -0
- package/src/generators/test-generator/adapters/appium/templates/scenario.hbs +23 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/capture-row-column.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +10 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-with-alert-action.hbs +7 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/drag-action.hbs +14 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/table-action-in-row-nth.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-assertion.hbs +17 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-element.hbs +13 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-filter-assertion.hbs +26 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +24 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-variable-assertion.hbs +9 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-dialog-heading-assertion.hbs +10 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-filter-assertion.hbs +14 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +21 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-variable-assertion.hbs +10 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/row-scoped-column-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +23 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/storage-key-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/tab-order-assertion.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-dialog-heading-assertion.hbs +10 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-filtered-assertion.hbs +17 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +13 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/navigation/wait-table-refresh.hbs +13 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/drag-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/frame-enter-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -5
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/row-scoped-column-assertion.hbs +1 -0
- package/src/generators/test-generator/code-generator.ts +34 -9
- package/src/generators/test-generator/diagnostics.ts +25 -1
- package/src/generators/test-generator/patterns/index.ts +172 -25
- package/src/generators/test-generator/patterns/types.ts +35 -0
- package/src/generators/test-generator/step-mapper.ts +106 -23
- package/src/harness/audit.ts +104 -11
- package/src/harness/flow-contract.ts +261 -0
- package/src/harness/flow-plan.ts +10 -3
- package/src/harness/parse.ts +31 -1
- package/src/harness/perf.ts +112 -0
- package/src/harness/sensors.ts +13 -1
- package/src/harness/spec-coverage.ts +55 -5
- package/src/orchestrator/templates/ai-src/commands/add-flow.md +51 -3
- package/src/orchestrator/templates/ai-src/commands/create-test.md +10 -0
- package/src/orchestrator/templates/ai-src/commands/run-test.md +23 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-api-design/SKILL.md +2 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +61 -12
- package/src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +22 -8
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +65 -17
- package/src/orchestrator/templates/qa-context.md +14 -1
- package/src/orchestrator/templates/specs-api.ts +104 -26
- package/src/orchestrator/templates/specs-db.ts +19 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-coverage.js","sourceRoot":"","sources":["../../src/harness/spec-coverage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,
|
|
1
|
+
{"version":3,"file":"spec-coverage.js","sourceRoot":"","sources":["../../src/harness/spec-coverage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,4CAyDC;AAcD,4BAkBC;AAED,oCAgDC;AA3MD;;;;;;;;;GASG;AACH,uCAAyB;AAEzB,2CAA2C;AAuB3C,sEAAsE;AACtE,MAAM,YAAY,GAAsC;IACtD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,mCAAmC,EAAE;IAC5D,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,yBAAyB,EAAE;CACrD,CAAC;AACF,qFAAqF;AACrF,yDAAyD;AACzD,MAAM,cAAc,GAAsC;IACxD,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,mEAAmE,EAAE;IAC5F,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,oDAAoD,EAAE;CAChF,CAAC;AAEF,SAAS,UAAU,CAAC,IAAY;IAC9B,yEAAyE;IACzE,8EAA8E;IAC9E,qEAAqE;IACrE,+DAA+D;IAC/D,IAAI,WAAW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,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAC9G,CAAC"}
|
|
@@ -86,15 +86,62 @@ qa/flows/${input:flow}/
|
|
|
86
86
|
└── ui/ # Screenshots, mockups
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
### 1a.
|
|
89
|
+
### 1a. Define the flow's BOUNDARY, then its screens
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
> QA teams often call this level **System Test** — same thing: one fully-integrated business
|
|
92
|
+
> journey verified against the spec. Use whichever name the team knows; the boundary rules
|
|
93
|
+
> below are the ISTQB system-test design rules.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
A flow is the **smallest complete business action chain**: one clear trigger ending in ONE
|
|
97
|
+
observable, valuable outcome. Before asking for screens, walk this checklist with the user —
|
|
98
|
+
if 1, 3 or 8 fails, propose SPLITTING into separate flows:
|
|
99
|
+
|
|
100
|
+
1. Exactly **one business goal**? (cart correctness + category filtering = two flows)
|
|
101
|
+
2. A clear **trigger** and precondition?
|
|
102
|
+
3. **One observable final outcome**? (a final assertion you can write in one sentence)
|
|
103
|
+
4. Is that outcome **valuable to the actor**? (an order placed, a password reset — not "a page rendered")
|
|
104
|
+
5. Is **every step necessary** for that outcome?
|
|
105
|
+
6. Are all steps at the **same business abstraction**?
|
|
106
|
+
7. Are optional/error branches **phases of this goal** (ER/EH), not new goals?
|
|
107
|
+
8. Does **no segment** form an independently valuable flow on its own?
|
|
108
|
+
9. Can you write **a single clear final assertion**?
|
|
109
|
+
10. Can you name it "**Verb + outcome**"? (`place-order`, `reset-password` — not `cart-and-filter`)
|
|
110
|
+
|
|
111
|
+
Then ask: "Which screens does this flow visit, in order? (e.g., login → dashboard → award-form → confirmation)"
|
|
92
112
|
|
|
93
113
|
Record the screen list — you will need it for:
|
|
94
114
|
- Filling `spec.md` (Step 3)
|
|
95
115
|
- Suggesting `[Screen:Element]` namespace prefixes
|
|
96
116
|
- Capturing visuals per screen (Step 2)
|
|
97
117
|
|
|
118
|
+
### 1b. Author the Flow Contract (`requirements/flow-contract.yaml`)
|
|
119
|
+
|
|
120
|
+
Write the answers down as the flow's contract — `sungen audit` scores the flow **against it**
|
|
121
|
+
(the `flowCoverage` axis: HP/ER/EH journey phases; `FLOW-OUTCOME-UNPROVEN` when no automated
|
|
122
|
+
scenario asserts data on the outcome screen; `FLOW-SCOPE-CREEP` when scenarios never touch it):
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
goal: "Place an order for a product added from home" # Verb + outcome
|
|
126
|
+
actor: user
|
|
127
|
+
trigger: "Add a product to the cart from the home featured list"
|
|
128
|
+
precondition: "A registered account; an empty cart"
|
|
129
|
+
outcome:
|
|
130
|
+
screen: checkout # the [Screen:...] namespace carrying the final proof
|
|
131
|
+
assertion: "The confirmation shows the order number and the paid total"
|
|
132
|
+
value: "The customer has paid; the shop has a new order"
|
|
133
|
+
phases: [HP, ER, EH] # journey phases (default); add UI only if the flow owns UI states
|
|
134
|
+
stateful: cart # the mutated collection, if any — enables regression-depth dims
|
|
135
|
+
golden: true # optional — release-critical: Final Inspection expects @golden scenarios here
|
|
136
|
+
external: # optional — legs owned by another team/vendor (System INTEGRATION Testing)
|
|
137
|
+
- name: payment-gateway
|
|
138
|
+
owner: vendor-x
|
|
139
|
+
screens: [payment] # the flow namespaces that leg passes through
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**A filled contract is an INPUT to generation — never an output.** Like `test-viewpoint.md`,
|
|
143
|
+
generation must not rewrite it to match what was generated; disagree → propose the diff and ask.
|
|
144
|
+
|
|
98
145
|
### 2. Capture visual source
|
|
99
146
|
|
|
100
147
|
**Mobile path** (`platform: mobile`):
|
|
@@ -187,7 +234,8 @@ If user picks `/sungen:create-test`, **you MUST use the Skill tool** to invoke i
|
|
|
187
234
|
- Test data namespaced by phase: `login.email`, `submission.nominee`
|
|
188
235
|
- `@flow` tag required at feature level
|
|
189
236
|
- `Background:` should only contain the starting navigation — the URL path (web) or the `--reach` nav recipe (mobile)
|
|
190
|
-
- Each scenario = one phase of the journey
|
|
237
|
+
- Each scenario = one phase of the journey; ids are `FL-<PHASE>-NNN` (`HP`/`ER`/`EH`, optional `UI`)
|
|
238
|
+
- One flow = ONE business goal with ONE observable outcome (`requirements/flow-contract.yaml`) — a segment with its own value is its own flow
|
|
191
239
|
{{#cap parallel-subagents}}
|
|
192
240
|
- Mobile flows are tagged `@platform:mobile` and run via `/sungen:run-test <flow>` (WebdriverIO, not Playwright)
|
|
193
241
|
{{/cap}}
|
|
@@ -6,6 +6,16 @@ order: 20
|
|
|
6
6
|
claude-tools: "Read, Grep, Bash, Glob, Write, AskUserQuestion, Skill, mcp__playwright__browser_navigate, mcp__playwright__browser_snapshot, mcp__playwright__browser_take_screenshot"
|
|
7
7
|
copilot-tools: "[vscode, execute, read, agent, edit, search, web, browser, todo, 'playwright/*']"
|
|
8
8
|
codex-trigger: "Run when the user asks to CREATE, generate, write, or author test cases / a .feature file for a screen or flow. Step 2 (after add-screen/add-flow, before run-test). Do NOT use for executing, running, or compiling existing tests."
|
|
9
|
+
---
|
|
10
|
+
## ⛔ HARD RULE — the run's LAST action is the next-step hand-back
|
|
11
|
+
|
|
12
|
+
A create-test run is NOT finished when the files are written or the audit prints. The final
|
|
13
|
+
action of EVERY run — success, partial, or aborted — is the next-step hand-back
|
|
14
|
+
({{#cap parallel-subagents}}an `AskUserQuestion` offering the next actions{{/cap}}{{^cap parallel-subagents}}a numbered list of next-action choices{{/cap}};
|
|
15
|
+
see "Finish — always hand the next step back" at the end of this file). Ending with a prose
|
|
16
|
+
summary and no choices is a broken run: the operator is left guessing. This holds no matter
|
|
17
|
+
how long the generation/repair loop ran.
|
|
18
|
+
|
|
9
19
|
---
|
|
10
20
|
{{#cap parallel-subagents}}
|
|
11
21
|
## ⛔ HARD RULE — No Figma MCP when PAT data exists
|
|
@@ -7,6 +7,29 @@ claude-tools: "Read, Grep, Bash, Glob, Edit, Write, AskUserQuestion, mcp__playwr
|
|
|
7
7
|
copilot-tools: "[read, execute, edit, vscode/askQuestions, playwright/*, appium/*]"
|
|
8
8
|
codex-trigger: "Run when the user asks to RUN, execute, or compile tests, generate selectors.yaml, or run tests. Step 4. Do NOT use for authoring/creating new test cases."
|
|
9
9
|
---
|
|
10
|
+
## ⛔ HARD RULE — the transition INTO this run is a tool call, never prose
|
|
11
|
+
|
|
12
|
+
A QA field report: the user picked "Run test" from create-test's hand-back, and the session
|
|
13
|
+
answered with a BRIEFING — missing selector, expected reds, "run under Node 22" — written as
|
|
14
|
+
"Before you do…", then stopped. Correct facts, wrong role: those are conditions YOU handle
|
|
15
|
+
inside the run, not reasons to stop and hand the work back.
|
|
16
|
+
|
|
17
|
+
- The first thing this command produces is a **tool call** (platform detection, preflight,
|
|
18
|
+
compile — whatever comes first). Never open with a plan and end the turn.
|
|
19
|
+
- A **missing selector** goes to the selector-generation/fix step — that is what this command
|
|
20
|
+
is FOR.
|
|
21
|
+
- **Expected-red scenarios** (@known-defect asserting a live defect) stay red; note them in
|
|
22
|
+
the results summary, never "fix" them and never stop for them.
|
|
23
|
+
- **Runtime selection is yours**: check `node -v` first. If the major version is ≥ 23 and
|
|
24
|
+
Playwright browser runs are known-broken on it, select Node 22 yourself when available —
|
|
25
|
+
`export PATH="$HOME/.nvm/versions/node/$(ls $HOME/.nvm/versions/node | grep '^v22' | tail -1)/bin:$PATH"`
|
|
26
|
+
— and say so in one line. Only if NO compatible Node exists do you stop, with the exact
|
|
27
|
+
install command as the hand-back.
|
|
28
|
+
- Ending this run follows the same law as create-test: the LAST action is the next-step
|
|
29
|
+
hand-back (the AskUserQuestion in "After showing results"), no matter how the run went.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
10
33
|
## Role
|
|
11
34
|
|
|
12
35
|
You are a **Senior Developer**.
|
|
@@ -79,10 +79,10 @@ A flow (`create → login → delete`) is a **Functional integration** test, **n
|
|
|
79
79
|
- ":gift_image_1" # test-data: gift_image_1 → fixtures/a.png
|
|
80
80
|
- ":gift_image_2" # test-data: gift_image_2 → fixtures/b.png
|
|
81
81
|
```
|
|
82
|
-
Each element binds its own `:param` from test-data. Use this for endpoints that accept a list of files under the same field — a single object value can only hold one file. **Automate multi-file uploads with `@api`; don't defer to `@manual`.** (File uploads
|
|
82
|
+
Each element binds its own `:param` from test-data. Use this for endpoints that accept a list of files under the same field — a single object value can only hold one file. **Automate multi-file uploads with `@api`; don't defer to `@manual`.** (File uploads are sent as `multipart/form-data` built on Node's global `FormData`/`Blob` — **Node 18+, no Playwright dependency**, so the same upload runs in mobile specs too.)
|
|
83
83
|
- **`bodyFile:`** → raw binary body (the whole body IS the file's bytes, e.g. `application/octet-stream`): `bodyFile: { path: ":image", mimeType: application/octet-stream }`.
|
|
84
84
|
|
|
85
|
-
Fixture path resolves cwd-relative/absolute first, else `qa/fixtures/<path>` (drop sample files there, reference by name from `test-data`). An empty resolved file param omits the part → use for missing-file `@cases` error rows. `files:`/`bodyFile:` are mutually exclusive. **Automate the upload success case with `@api`** — don't defer it to `@manual`.
|
|
85
|
+
Fixture path resolves cwd-relative/absolute first, else `qa/fixtures/<path>` (drop sample files there, reference by name from `test-data`). An empty resolved file param omits the part → use for missing-file `@cases` error rows. `files:`/`bodyFile:` are mutually exclusive. A **`GET`/`HEAD` entry may carry no body at all** (no `body:`/`files:`/`bodyFile:`) — HTTP forbids it and the catalog lint refuses it; put the inputs in the path or `query`, or use `POST`. **Automate the upload success case with `@api`** — don't defer it to `@manual`.
|
|
86
86
|
|
|
87
87
|
## Per-endpoint knobs & auth patterns
|
|
88
88
|
- **Timeout** — a slow endpoint can override the datasource default (15s) with `timeout_ms: 30000` on its catalog entry (else the datasource `timeout_ms` applies).
|
|
@@ -99,6 +99,10 @@ needs any of these, it is a **finding for QA** — surface it in the run summary
|
|
|
99
99
|
| `SG-W012` | A mock-install step written AFTER a navigation step in the same block — `page.route()` registered after `goto()` misses every request fired during page load | Move the mock-install step before the navigation, or into `Background` |
|
|
100
100
|
| `SG-W013` | A page assertion (`see [X] page` / `is on [X] page`) whose `[Ref]` has no `type: page` selector entry (or collides with a non-page entry) — the step falls back to the feature's own path (or `/<ref>/`) instead of `X`'s real URL, so the anchored assertion can never pass | Declare a `type: page` entry for `[Ref]` with its real URL; if the key collides with another type, disambiguate with a `--type` suffix (`sungen-selector-keys` § Collision rule) |
|
|
101
101
|
| `SG-W014` | `[X] page with {{v}}` where `{{v}}`'s base test-data value carries no query and no fragment — the step checks the PATH only, asserting less than it reads as | Informational — pass a value like `?q=…` if you meant to assert a query, or drop `with {{v}}` for a bare page |
|
|
102
|
+
| `SG-E020` | A step matched a pattern, but the **active adapter ships no template** for it (e.g. a web-only step compiled under `platform: mobile`). The feature file still generates — that one step compiles to `throw new Error("[sungen] …")` naming the step, feature, pattern, template and adapter, so the failure is loud and traceable rather than a crashed build | Rephrase to a step the target adapter actually ships (see `sungen-gherkin-syntax` Platform Support section / `sungen-mobile-gestures`), or tag the scenario `@manual` with the platform reason |
|
|
103
|
+
| `SG-W020` | The matched pattern **declares `platforms`** (today: `@mock`) and the active platform isn't among them. Caught before template lookup, so the diagnostic can name the native alternative directly | Drop `@mock` from a mobile unit (there is no Mock Driver on Appium) — use `@api`/`@query` or a `@manual` note instead |
|
|
104
|
+
| `SG-W021` | `use dialog` / `User is on [X] dialog` scope under the **mobile** adapter — the scope is recorded but no Appium template reads `inDialog`, so every following step resolves against the whole screen, not just the dialog | Don't rely on `scope: dialog`/`use dialog` for disambiguation on mobile — give the element inside the dialog its own unique accessibility-id/testid instead |
|
|
105
|
+
| `SG-W022` | `Then User see [X] page` under the **mobile** adapter — a native app has no URL, so the step compiles to a bare COMMENT: it reads as an assertion, checks nothing, and the scenario passes whatever is on screen. Worse than a hard failure, because nothing ever goes red. (Its `is on [X] page` twin throws via `route-assertion`; `Given User is on [X] page` is the app-LAUNCH directive and correctly emits nothing) | Assert something actually on the screen — `Then User see [Some Header] text` / a screen-marker accessibility-id — instead of a page/URL check, or tag the scenario `@manual` |
|
|
102
106
|
|
|
103
107
|
### Runtime error → `Test data "<key>" references ${QA_*} but the environment variable is not set`
|
|
104
108
|
|
|
@@ -27,21 +27,26 @@ AND → inherits from preceding keyword
|
|
|
27
27
|
|
|
28
28
|
## Step Patterns (70 patterns)
|
|
29
29
|
|
|
30
|
+
> **Platform legend:** unmarked = `[both]` (compiles on Playwright AND Appium). `[web]` = compiles
|
|
31
|
+
> only on Playwright — the Appium template throws, naming the reason. `[mobile]` = mobile-only
|
|
32
|
+
> vocabulary with no web counterpart. Every marking is checked against a shipped `.hbs` — see
|
|
33
|
+
> **Platform Support** at the end of this section for the full web-only/mobile-only/divergence list.
|
|
34
|
+
|
|
30
35
|
### Setup / Form / Interaction
|
|
31
36
|
|
|
32
37
|
```
|
|
33
38
|
User is on [T] page | page with {{v}} | dialog
|
|
34
39
|
User fill [T] field | textarea | search | slider | date-picker with {{v}}
|
|
35
|
-
User fill [T] uploader with {{f}}
|
|
40
|
+
User fill [T] uploader with {{f}} [web]
|
|
36
41
|
User clear [T] field
|
|
37
42
|
User check [T] checkbox | toggle | radio
|
|
38
43
|
User uncheck [T] checkbox | toggle
|
|
39
44
|
User select [T] dropdown with {{v}}
|
|
40
45
|
User click [T] button | tab | column | breadcrumb
|
|
41
46
|
User click [T] row with {{v}}
|
|
42
|
-
User try to click [T] button | link # DISABLED element only — see rule below (v3.3)
|
|
47
|
+
User try to click [T] button | link # DISABLED element only — see rule below (v3.3) [web]
|
|
43
48
|
User double click [T] element
|
|
44
|
-
User hover [T] icon | row
|
|
49
|
+
User hover [T] icon | row # no-op on mobile (see Platform Support)
|
|
45
50
|
User drag [T] to [T2]
|
|
46
51
|
User expand | collapse [T] row
|
|
47
52
|
```
|
|
@@ -60,15 +65,15 @@ NEVER use it for a click that is supposed to work — it deletes the actionabili
|
|
|
60
65
|
User click [T] button and accept [OK] alert # PREFERRED (v3.3): natural order,
|
|
61
66
|
User click [T] button and dismiss [Cancel] alert # compiler registers the listener first
|
|
62
67
|
User click [OK | Cancel] alert # two-step form: must come BEFORE the trigger
|
|
63
|
-
User fill [T] alert with {{v}}
|
|
68
|
+
User fill [T] alert with {{v}} # no-op on mobile — native prompt fill is app-specific
|
|
64
69
|
User see [message text] alert
|
|
65
70
|
User press Escape key | [Enter] key | Tab key 5 times | Enter on [T] field
|
|
66
|
-
User wait for N seconds | [T] page
|
|
71
|
+
User wait for N seconds | [T] page # [T] page: web waits for the URL; mobile pauses (settle) — see Platform Support
|
|
67
72
|
User wait for [T] TYPE is visible | hidden | enabled | disabled # ANY reference (v3.3)
|
|
68
73
|
User wait for [T] TYPE with {{v}} # until it shows the value
|
|
69
74
|
User wait for [T] table to refresh # filter/search/pagination round-trip (v3.3)
|
|
70
75
|
User scroll to [T] section
|
|
71
|
-
User switch to [T] frame | [main] frame
|
|
76
|
+
User switch to [T] frame | [main] frame # web: iframe; mobile: hybrid-app WebView context (no-op if the screen has no WebView)
|
|
72
77
|
```
|
|
73
78
|
|
|
74
79
|
> **Browser alerts (native `window.confirm/alert/prompt` only):** prefer the compound form —
|
|
@@ -81,7 +86,7 @@ User switch to [T] frame | [main] frame
|
|
|
81
86
|
> `wait for N seconds` stays a last resort. `table to refresh` watches the app's loading
|
|
82
87
|
> indicator (`qa/app.yaml` `feedback.loading.indicator`, default `[aria-busy="true"]`).
|
|
83
88
|
|
|
84
|
-
### Positional table rows (v3.3)
|
|
89
|
+
### Positional table rows (v3.3) `[web]`
|
|
85
90
|
|
|
86
91
|
```
|
|
87
92
|
User remember [Col] column in [T] table row {{n}} as {{var}} # read a cell by POSITION
|
|
@@ -135,6 +140,11 @@ Two asymmetries worth knowing rather than discovering:
|
|
|
135
140
|
2. **A repeated param matches as a subset per key**, which is the same rule as "extra params are
|
|
136
141
|
tolerated": every value you declare must be present, and the URL may carry more.
|
|
137
142
|
|
|
143
|
+
> **Mobile:** `Then User is on [T] page` **throws** (no URL/address bar on native). `Then User see
|
|
144
|
+
> [T] page` \| `page with {{v}}` **silently no-ops** — the compiled step asserts nothing and the
|
|
145
|
+
> scenario passes regardless. Never use Pattern 8 to prove "landed on screen X" on mobile — assert
|
|
146
|
+
> a screen-marker element instead (`Then User see [X] header`).
|
|
147
|
+
|
|
138
148
|
The predicate itself lives in `specs/url-assert.ts` (auto-generated, `DO NOT EDIT`). If `[T]` has no
|
|
139
149
|
`type: page` selector entry — or its key collides with a non-page entry, so `value` is something like
|
|
140
150
|
`button` rather than a URL — the step falls back to another path and cannot match the real URL. The
|
|
@@ -152,7 +162,7 @@ User see all [Product Card] contain [Add To Cart] button
|
|
|
152
162
|
|
|
153
163
|
Use the all-card form whenever a title claims *every / each* card/row exposes something — a single `User see [Add To Cart] button` does NOT prove "each card" and the harness Claim-Proof gate will flag it.
|
|
154
164
|
|
|
155
|
-
### Table
|
|
165
|
+
### Table `[web]`
|
|
156
166
|
|
|
157
167
|
```
|
|
158
168
|
User see [Col] column in [Table] table
|
|
@@ -176,7 +186,7 @@ first contact row:
|
|
|
176
186
|
```
|
|
177
187
|
→ compiles to `expect(table.locator('tbody tr:first-child')).toContainText(v)` — the exact row must hold the value — and still enters row scope for `[Col] column` checks.
|
|
178
188
|
|
|
179
|
-
### Browser storage
|
|
189
|
+
### Browser storage `[web]`
|
|
180
190
|
|
|
181
191
|
```
|
|
182
192
|
Then User see [KEY] in local storage exists
|
|
@@ -189,7 +199,7 @@ Then User see key matching "PATTERN" in local storage # regex over key name
|
|
|
189
199
|
|
|
190
200
|
`[KEY]` is a **storage key, not a selector** — never add it to selectors.yaml. It may embed `{{vars}}`: `[{{exclusive_code}}_ACCESS_TOKEN]`. The check runs inside the browser and returns only a boolean, so a failure message never contains the stored value (safe for tokens). There is deliberately no `equals {{expected}}` form. ⚠️ `expect [KEY] in local storage …` is NOT valid (`expect` reads `{{response}}` refs only) — the compiler warns SG-W011.
|
|
191
201
|
|
|
192
|
-
### Tab order
|
|
202
|
+
### Tab order `[web]`
|
|
193
203
|
|
|
194
204
|
```
|
|
195
205
|
Then User see tab order:
|
|
@@ -201,7 +211,7 @@ Then User see tab order:
|
|
|
201
211
|
|
|
202
212
|
Focuses row 1 (the pinned origin — there is no separate `focus [X]` step) and asserts it actually HOLDS focus (a non-focusable ref fails loudly), then presses Tab per following row and asserts it receives focus. Cell refs ARE selector references (resolved via selectors.yaml; optional element type after the ref). Requires the `| Ref |` header and ≥2 element rows — a missing header or single row is a compile error, never an empty pass. A mismatch reports the expected ref + the actual focused element (shadow-DOM-aware tag/role/name). Limitations: web only (no Appium); declare tab order OUTSIDE `use dialog`/frame scope (cell locators render page-rooted — put `scope: dialog` on the selector ENTRIES if the elements live in a dialog); focus traps / dynamic comboboxes / `tabindex=-1` reordering / WebKit differences may need `@manual` keyboard-only audits — those stay legitimate manuals.
|
|
203
213
|
|
|
204
|
-
### Network mocking (optional Mock Driver — `sungen capability add mock`)
|
|
214
|
+
### Network mocking `[web]` (optional Mock Driver — `sungen capability add mock`)
|
|
205
215
|
|
|
206
216
|
```gherkin
|
|
207
217
|
@mock
|
|
@@ -294,6 +304,42 @@ Full-shape contract check: `expect {{name.body}} matches schema [Ref]` validates
|
|
|
294
304
|
- **Error (4xx/5xx)** → assert the status (via `@cases` `expect_status` or an explicit `is 4xx`); assert the error message field when the contract defines one.
|
|
295
305
|
- **Anti-pattern** — re-asserting the value you just sent (`{{x.body.email}} is {{email}}` on the thing you created) proves little; assert a **server-derived** field (id, timestamp, computed status) or read it back.
|
|
296
306
|
|
|
307
|
+
### Platform Support — web-only / mobile-only / divergences
|
|
308
|
+
|
|
309
|
+
Every claim below is checked against a shipped `.hbs` under
|
|
310
|
+
`adapters/{playwright,appium}/templates/steps/` or a shipped diagnostic — see
|
|
311
|
+
`tests/codegen/adapter-template-parity.run.ts` `DIVERGENCES` for the authoritative one-sided list.
|
|
312
|
+
|
|
313
|
+
**Web-only `[web]`** — the Appium template throws, naming the reason: `fill [T] uploader with
|
|
314
|
+
{{f}}`, Positional table rows, the whole Table section, Browser storage, Tab order, `@mock`,
|
|
315
|
+
`Then User is on [T] page` (route-assertion). Each targets something native has no equivalent for
|
|
316
|
+
(HTML `<table>`, `<input type=file>`, DOM storage, keyboard-focus traversal, `page.route`, a URL bar).
|
|
317
|
+
|
|
318
|
+
**Mobile-only `[mobile]`** — the gesture catalog (swipe, long-press, pinch-zoom, pull-to-refresh,
|
|
319
|
+
rotate, background/foreground, notifications, grant-permission, clipboard set, set-geolocation,
|
|
320
|
+
hide-keyboard, tap-top-of) has no web counterpart. Full syntax → `sungen-mobile-gestures`.
|
|
321
|
+
|
|
322
|
+
**Divergences — compiles on both, means something different:**
|
|
323
|
+
|
|
324
|
+
| Step | Web | Mobile |
|
|
325
|
+
|---|---|---|
|
|
326
|
+
| `see [T] page` \| `page with {{v}}` | asserts path+query | **silent no-op** — asserts nothing; the scenario passes regardless. Assert a screen-marker element instead |
|
|
327
|
+
| `is on [T] page` \| `open [T] page` (Given/When) | navigates via URL | no-op — the app is already launched; use tap/gesture steps for mobile screen changes |
|
|
328
|
+
| `wait for [T] page` | waits for the URL | fixed `driver.pause(500)` settle — not a real wait condition |
|
|
329
|
+
| `hover [T] icon \| row` | real hover | no-op — hover-revealed content is normally already visible on mobile; use `tap` |
|
|
330
|
+
| `fill [T] alert with {{v}}` | fills native `prompt()` | no-op (comment only) — app-specific, handle manually |
|
|
331
|
+
| `switch to [T] frame` | enters an `<iframe>` | switches a hybrid app's WebView context; no-op on a pure-native screen (no WebView found) |
|
|
332
|
+
| `see [X] with {{v}}` (filtered visibility forms) | CSS `hasText` filter | hand-rolled substring match over `getText()`/`content-desc` (Android) or `label`/`value` (iOS) — same substring semantics, different attribute set |
|
|
333
|
+
| `… is sorted …` / `… is loading` inside a filtered row/state check | reads `aria-sort`/`aria-busy` | **throws** — no native analog for these two states specifically (the plain, unfiltered `is loading` on a spinner still works on both) |
|
|
334
|
+
| `scope: dialog` selector option | resolves inside the dialog | no effect (`SG-W021`) — steps resolve against the whole screen |
|
|
335
|
+
| `open notification panel` (mobile gesture) | n/a | Android-only — throws on iOS |
|
|
336
|
+
|
|
337
|
+
**Partial support, not full unsupported** — read the `.hbs` before marking anything `[web]`:
|
|
338
|
+
`all-contain-*`, `check`/`uncheck`/`toggle-action`, `contain-text`/`have-text-assertion`,
|
|
339
|
+
`visible-filtered-assertion`, `disabled`/`hidden-with-filter-assertion` are fully supported on
|
|
340
|
+
mobile even though a grep shows a `throw` somewhere in their file — the throw is a normal
|
|
341
|
+
zero-match assertion failure, not a platform gap.
|
|
342
|
+
|
|
297
343
|
### States
|
|
298
344
|
|
|
299
345
|
`hidden` `visible` `disabled` `enabled` `checked` `unchecked` `focused` `empty` `loading` `selected` `sorted ascending` `sorted descending`
|
|
@@ -366,6 +412,9 @@ award:
|
|
|
366
412
|
|
|
367
413
|
Options: `nth` `exact` `scope` `match` `variant` `frame` `contenteditable` `columns`
|
|
368
414
|
|
|
415
|
+
`scope` (e.g. `scope: dialog`) is `[web]`-effective only — no Appium template reads `inDialog`, so
|
|
416
|
+
on mobile a dialog-scoped ref still resolves against the whole screen (`SG-W021`).
|
|
417
|
+
|
|
369
418
|
## Tags
|
|
370
419
|
|
|
371
420
|
### Functional tags (affect code generation)
|
|
@@ -383,7 +432,7 @@ Options: `nth` `exact` `scope` `match` `variant` `frame` `contenteditable` `colu
|
|
|
383
432
|
| `@cleanup:scroll` | Auto-cleanup: scroll to top after each test (cleanupPage) |
|
|
384
433
|
| `@cleanup:storage` | Auto-cleanup: clear sessionStorage after each test (cleanupPage) |
|
|
385
434
|
| `@screenshot:on-failure` | Auto-capture screenshot when test fails (base.ts fixture) |
|
|
386
|
-
| `@parallel` | Opt-out: fresh page per test instead of serial default (for independent scenarios) |
|
|
435
|
+
| `@parallel` | Opt-out: fresh page per test instead of serial default (for independent scenarios). Compiles on mobile too, but a single device/emulator gets no session-isolation benefit from it |
|
|
387
436
|
| `@beforeAll` | Hook: runs once before all tests → `test.beforeAll()` |
|
|
388
437
|
| `@afterEach` | Hook: runs after each test → `test.afterEach()` (custom cleanup) |
|
|
389
438
|
| `@afterAll` | Hook: runs once after all tests → `test.afterAll()` |
|
|
@@ -10,7 +10,8 @@ Document the **mobile-only interactions** that have no web equivalent, so the AI
|
|
|
10
10
|
during exploration via Appium MCP and (b) write Gherkin steps for them. These are gestures the web
|
|
11
11
|
patterns (`click`, `hover`, `fill`) don't cover.
|
|
12
12
|
|
|
13
|
-
> Codegen status
|
|
13
|
+
> Codegen status: the Appium adapter **compiles** all of the following (verified against the shipped
|
|
14
|
+
> `.hbs` under `adapters/appium/templates/steps/{gestures,actions}/`):
|
|
14
15
|
> - **`tap` / `taps`** — synonym for `click` (→ `.click()`); **`double-tap`** → double-click.
|
|
15
16
|
> - **`scroll to [X]`** → `.scrollIntoView()` (shared `scroll-action` template).
|
|
16
17
|
> - **`swipe <dir> on [X]`** → `mobile: swipeGesture`.
|
|
@@ -24,9 +25,19 @@ patterns (`click`, `hover`, `fill`) don't cover.
|
|
|
24
25
|
> - **`tap top of [X]`** / **`tap [X] at top`** → tap the element's **visible top edge** (`mobile: clickGesture`
|
|
25
26
|
> at top-centre from the element bounds) instead of its centre — use when the centre is occluded by a
|
|
26
27
|
> floating bottom bar so a normal centre tap would hit the bar.
|
|
27
|
-
>
|
|
28
|
-
>
|
|
29
|
-
>
|
|
28
|
+
> - **`dismiss [X]`** (any non-alert element) → best-effort tap-if-shown-within-2.5s, never fails the
|
|
29
|
+
> step (`dismiss-action`) — for launch interstitials / promo overlays, not the native alert dialog
|
|
30
|
+
> (that's the existing `accept/dismiss [OK] alert` form).
|
|
31
|
+
> - **`hide the keyboard`** → `driver.hideKeyboard()`. **Android-only** — XCUITest cannot dismiss the
|
|
32
|
+
> keyboard generically (WDA throws + retries, ~12s wasted); on iOS the step is a silent best-effort
|
|
33
|
+
> no-op (never fails, just does nothing).
|
|
34
|
+
> - **`grant [X] permission`** → Android `mobile: changePermissions`; iOS (Simulator only) `mobile:
|
|
35
|
+
> setPermission` — needs the `applesimutils` binary on iOS or the driver fails loud with the install hint.
|
|
36
|
+
> - **`set the clipboard to {{v}}`** → `driver.setClipboard(...)`. **Write-only**: the appium adapter
|
|
37
|
+
> ships a `clipboard-text-assertion` template that reads the clipboard back, but no Gherkin pattern
|
|
38
|
+
> requests it yet — there is currently no phrasing that compiles to an actual clipboard-read
|
|
39
|
+
> assertion. Don't author "see clipboard contains X" expecting it to compile; tag it `@manual` instead.
|
|
40
|
+
> - **`set location to {{lat}}, {{lng}}`** → `driver.setGeoLocation(...)`.
|
|
30
41
|
>
|
|
31
42
|
> 📜 **`scroll to [X]` — two failure modes seen, with the real cause (measured):**
|
|
32
43
|
> 1. *"Default scrollable element '//android.widget.ScrollView' not found"* — wdio's mobile scroll runs
|
|
@@ -69,12 +80,14 @@ from `appium_find_element`; screen gestures pass `direction` or coordinates.
|
|
|
69
80
|
| System back | `User go back` | `action=back` |
|
|
70
81
|
| Drag & drop | `User drag [A] onto [B]` | `appium_drag_and_drop` (separate tool) |
|
|
71
82
|
|
|
72
|
-
Other device-level actions (separate MCP tools
|
|
83
|
+
Other device-level actions (separate MCP tools for exploration; Gherkin now compiles — see codegen
|
|
84
|
+
status above):
|
|
73
85
|
- Rotate: `appium_orientation` — `User rotate to landscape`
|
|
74
86
|
- Permission dialog: `appium_mobile_permissions` / `appium_alert` — `User grant [Location] permission`
|
|
75
87
|
- Background/foreground: `appium_app_lifecycle` — `User send app to background for 5 seconds`
|
|
76
|
-
- Clipboard: `appium_mobile_clipboard` — `User
|
|
77
|
-
|
|
88
|
+
- Clipboard write: `appium_mobile_clipboard` — `User set the clipboard to {{value}}` (read-back has
|
|
89
|
+
no Gherkin pattern yet — see codegen status above)
|
|
90
|
+
- Notifications: open panel via `appium_mobile_device_control` — `User open notification panel`
|
|
78
91
|
|
|
79
92
|
---
|
|
80
93
|
|
|
@@ -104,6 +117,7 @@ them stable (accessibility-id) so the scroll terminates reliably.
|
|
|
104
117
|
|
|
105
118
|
## What this skill does NOT do
|
|
106
119
|
|
|
107
|
-
- Does not implement gesture codegen (templates land in a later phase).
|
|
108
120
|
- Does not replace `sungen-gherkin-syntax` — it supplements it with the mobile-only step vocabulary.
|
|
109
121
|
- Does not cover tap/set-value/assertions (those are the shared Tier-1 patterns already supported).
|
|
122
|
+
- Does not yet support a clipboard-READ assertion via Gherkin (see "Write-only" note above) — the
|
|
123
|
+
template exists but no pattern requests it.
|
|
@@ -479,7 +479,11 @@ Add cleanup tags per the `sungen-gherkin-syntax` Cleanup table. Key rules:
|
|
|
479
479
|
|
|
480
480
|
**Files:** `qa/screens/<screen>/features/<screen>.feature` + `qa/screens/<screen>/test-data/<screen>.yaml`
|
|
481
481
|
|
|
482
|
-
Use step patterns and element types from `sungen-gherkin-syntax`.
|
|
482
|
+
Use step patterns and element types from `sungen-gherkin-syntax`. For a `@platform:mobile/android/ios`
|
|
483
|
+
screen or flow, first check that skill's **Platform Support** section — never author a step marked
|
|
484
|
+
`[web]` there (tables, browser storage, tab order, `@mock`, uploader, `Then User is on [T] page`) for
|
|
485
|
+
a mobile unit, and read the divergence table before relying on `see [T] page` or `hover` to prove
|
|
486
|
+
anything on mobile. Reach for `sungen-mobile-gestures` for the gesture vocabulary instead.
|
|
483
487
|
**Naming**: reuse the **project's `test-viewpoint.md` IDs** when it declares them (e.g. `VP0`, `MS-HP-001`); otherwise `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
|
|
484
488
|
|
|
485
489
|
**Test data** — grouped by section, loaded at runtime:
|
|
@@ -603,24 +607,67 @@ error:
|
|
|
603
607
|
|
|
604
608
|
## Flow Test Generation
|
|
605
609
|
|
|
610
|
+
> **Terminology**: many QA teams call this level **System Test** (ISTQB: verify the fully
|
|
611
|
+
> integrated system against its specified requirements, designed around business
|
|
612
|
+
> processes/use cases). In sungen a *flow* is that system-test suite run through the real UI;
|
|
613
|
+
> its automation then serves as the regression suite on later runs. The names are
|
|
614
|
+
> interchangeable in conversation; the artifacts stay `qa/flows/<name>/`.
|
|
615
|
+
|
|
616
|
+
**Representative, not exhaustive (ISTQB system-test design rule).** A flow case takes ONE
|
|
617
|
+
representative input per branch — one valid value for the main flow, one error value that
|
|
618
|
+
triggers the exception branch and proves the journey recovers. The full equivalence/boundary
|
|
619
|
+
matrix belongs to the OWNING SCREEN (as `@cases` there), never re-run inside the flow: if the
|
|
620
|
+
screen already proved "the field rejects negatives", the flow only proves "the journey survives
|
|
621
|
+
one rejected input". `sungen audit` reports `FLOW-EXHAUSTIVE-INPUTS` when ≥3 same-shape flow
|
|
622
|
+
scenarios differ only in data. **Mocked dependencies**: a flow scenario using `@mock` is
|
|
623
|
+
delivered as *Pass (Mocked)* — verified handling logic, not the real dependency; the delivery's
|
|
624
|
+
External Dependency Tracking table lists it until re-verified real.
|
|
625
|
+
|
|
626
|
+
**Release selection & external legs**: when the contract declares `golden: true`, tag the
|
|
627
|
+
happy-path scenario(s) that prove the outcome with **`@golden`** — that is the set
|
|
628
|
+
`sungen inspect` (Final Inspection, Go/No-Go) runs before a release; `GOLDEN-MISSING` fires
|
|
629
|
+
until it exists, and a @golden scenario that passes only against mocks BLOCKS the release.
|
|
630
|
+
When the contract declares `external:` legs (another team/vendor's system), scenarios touching
|
|
631
|
+
those namespaces are the **System INTEGRATION** group — keep their oracles about the boundary
|
|
632
|
+
(contract/format/handoff), and expect `SIT-MOCK-ONLY` until they are re-verified real.
|
|
633
|
+
|
|
634
|
+
|
|
606
635
|
> **Auto-detect**: if path is `qa/flows/<name>/` → use this section. Skip Steps 1–4 above.
|
|
607
636
|
|
|
637
|
+
**Read `requirements/flow-contract.yaml` FIRST — it is the flow's boundary and the yardstick
|
|
638
|
+
`sungen audit` scores the flow against** (`flowCoverage` axis = journey phases HP/ER/EH automated;
|
|
639
|
+
`FLOW-OUTCOME-UNPROVEN`; `FLOW-SCOPE-CREEP`). No contract yet → author it with the user via the
|
|
640
|
+
boundary checklist in `add-flow` (one business goal · clear trigger · ONE observable outcome
|
|
641
|
+
valuable to the actor · name = "Verb + outcome"), THEN generate. **A filled contract is an INPUT —
|
|
642
|
+
never rewrite it to match your output** (same rule as `test-viewpoint.md`).
|
|
643
|
+
|
|
608
644
|
| Aspect | Screen | Flow |
|
|
609
645
|
|---|---|---|
|
|
610
|
-
| Section focus | UI patterns per section | Journey phases
|
|
646
|
+
| Section focus | UI patterns per section | Journey phases toward ONE declared outcome |
|
|
611
647
|
| Selector format | `[Element]` | `[Screen:Element]` (namespaced) |
|
|
612
648
|
| Test data keys | `{{variable}}` | `{{phase.variable}}` |
|
|
613
649
|
| Feature tag | `@auto` / `@smoke` etc. | `@flow` (required) |
|
|
614
|
-
|
|
|
650
|
+
| Scenario ids | `VP-<CATEGORY>-NNN` | `FL-<PHASE>-NNN` — phases: `HP` (happy path), `ER` (error recovery), `EH` (guards), `UI` (journey UI states, optional) |
|
|
615
651
|
|
|
616
|
-
**Scenarios to generate:**
|
|
652
|
+
**Scenarios to generate — every phase demanded by the contract, automated:**
|
|
617
653
|
|
|
618
|
-
|
|
|
619
|
-
|
|
620
|
-
|
|
|
621
|
-
|
|
|
622
|
-
|
|
|
623
|
-
| Cross-screen
|
|
654
|
+
| Phase | What to test | Scoring |
|
|
655
|
+
|---|---|---|
|
|
656
|
+
| `FL-HP` happy path | The complete journey ending in the contract's `outcome.assertion` — an AUTOMATED **data** assertion on `outcome.screen` (an order number, a summed total — not just "page visible"). This scenario is WHY the flow exists: it is the regression proof after a lib/framework upgrade. | uncovered → `flowCoverage` drops + `FLOW-OUTCOME-UNPROVEN` |
|
|
657
|
+
| `FL-ER` error recovery | Invalid input mid-flow → error shown → fix → the journey still completes. Validation must not trap the journey. | uncovered → `flowCoverage` drops |
|
|
658
|
+
| `FL-EH` guards | Direct URL access without the precondition · browser back · refresh · expired context — each ends in a safe observable state. | uncovered → `flowCoverage` drops |
|
|
659
|
+
| Cross-screen handoff | After every screen transition, assert the CARRIED state on the new screen (the added product's name in the cart, the email echoed on the sent screen). | blind tails cap `businessDepth` (`FLOW-HANDOFF-SHALLOW`) |
|
|
660
|
+
| Stateful regression (when `stateful:` declared) | Count/quantity proof · teardown (remove → empty) · multi-source add. | missing dims cap `businessDepth` (`FLOW-DEPTH`) |
|
|
661
|
+
|
|
662
|
+
**Boundary discipline while generating:** every scenario must serve the contract's goal. A scenario
|
|
663
|
+
that never touches `outcome.screen` and is not a guard (`EH`) or error-recovery (`ER`) belongs in a
|
|
664
|
+
DIFFERENT flow — propose the split instead of writing it here (`FLOW-SCOPE-CREEP` will flag it).
|
|
665
|
+
Auth persistence across transitions is part of `EH` unless the project declares it its own phase.
|
|
666
|
+
|
|
667
|
+
**Manual in flows**: always `@manual:Mx` with the reason code — bare `@manual` is flagged
|
|
668
|
+
(`MANUAL-CODE-MISSING`) because the capability planner cannot route it. Typical flow deferrals:
|
|
669
|
+
inbox/mail oracle → `M5`, network-request count → `M3`, context expiry control → `M7`. A
|
|
670
|
+
cross-screen scenario inside the flow's own goal is NOT manual — automate it here.
|
|
624
671
|
|
|
625
672
|
```gherkin
|
|
626
673
|
@flow @auth:user
|
|
@@ -630,19 +677,20 @@ Feature: Award Submission Flow
|
|
|
630
677
|
Given User is on [Login] page
|
|
631
678
|
|
|
632
679
|
@high
|
|
633
|
-
Scenario:
|
|
680
|
+
Scenario: FL-HP-001 A signed-in user's nomination is submitted and confirmed
|
|
634
681
|
When User fill [Login:Email] field with {{login.email}}
|
|
635
682
|
And User fill [Login:Password] field with {{login.password}}
|
|
636
683
|
And User click [Login:Submit] button
|
|
637
684
|
Then User see [Dashboard] page
|
|
638
|
-
|
|
639
|
-
@high
|
|
640
|
-
Scenario: User submits nomination
|
|
641
685
|
When User click [Dashboard:Awards] link
|
|
642
|
-
|
|
643
|
-
When User fill [Awards:Nominee] field with {{submission.nominee}}
|
|
686
|
+
And User fill [Awards:Nominee] field with {{submission.nominee}}
|
|
644
687
|
And User click [Awards:Submit] button
|
|
645
|
-
Then User see {{success_message}}
|
|
688
|
+
Then User see [Awards:Success Message] text with {{success_message}}
|
|
689
|
+
|
|
690
|
+
@high
|
|
691
|
+
Scenario: FL-EH-001 Direct access to the award form without login redirects to login
|
|
692
|
+
When User go to [Awards] page
|
|
693
|
+
Then User see [Login] page
|
|
646
694
|
```
|
|
647
695
|
|
|
648
696
|
```yaml
|
|
@@ -45,8 +45,21 @@ Example:
|
|
|
45
45
|
|
|
46
46
|
## Testing Strategy
|
|
47
47
|
|
|
48
|
+
Machine-readable intent — `sungen audit` reads these keys (Intent Profile). Values here are
|
|
49
|
+
live even when the surrounding text changes; an invalid value silently falls back to the default.
|
|
50
|
+
|
|
51
|
+
focus: functional
|
|
52
|
+
<!-- focus: functional | e-commerce | security | smoke — drives the audit's depth threshold -->
|
|
53
|
+
|
|
54
|
+
risk_tier: normal
|
|
55
|
+
<!-- risk_tier: high | normal | low -->
|
|
56
|
+
|
|
57
|
+
To silence driver suggestions in audit findings, add a line: capability_suggestions with value off.
|
|
58
|
+
|
|
48
59
|
**Focus areas** — what to cover thoroughly:
|
|
49
|
-
<!--
|
|
60
|
+
<!-- Prose for humans; the parseable value is the `focus:` key above.
|
|
61
|
+
Response-time budgets are NOT a focus value — declare them in qa/perf.yaml
|
|
62
|
+
(percentile + scenario_ms budgets; reported by `sungen delivery`). -->
|
|
50
63
|
<!-- Example: functional, security -->
|
|
51
64
|
|
|
52
65
|
**Mandatory coverage:**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs-api.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/templates/specs-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"specs-api.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/templates/specs-api.ts"],"names":[],"mappings":"AA8GA,yFAAyF;AACzF,KAAK,QAAQ,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;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