@sun-asterisk/sungen 3.2.16-beta.7 → 3.2.17
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/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +13 -197
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/ingest.d.ts.map +1 -1
- package/dist/cli/commands/ingest.js +56 -4
- package/dist/cli/commands/ingest.js.map +1 -1
- package/dist/dashboard/templates/index.html +1 -1
- package/dist/exporters/feature-parser.js +1 -1
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/scenario-merger.js +1 -1
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/spec-parser.js +1 -1
- package/dist/exporters/spec-parser.js.map +1 -1
- package/dist/exporters/xlsx-report-builder.d.ts +1 -1
- package/dist/exporters/xlsx-report-builder.d.ts.map +1 -1
- package/dist/exporters/xlsx-report-builder.js +3 -3
- package/dist/exporters/xlsx-report-builder.js.map +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/click-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/click-element-with-text.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/navigation/wait-timeout.hbs +1 -1
- package/dist/generators/test-generator/utils/runtime-data-transformer.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/runtime-data-transformer.js +28 -17
- package/dist/generators/test-generator/utils/runtime-data-transformer.js.map +1 -1
- package/dist/ingest/legacy-parser.d.ts +3 -0
- package/dist/ingest/legacy-parser.d.ts.map +1 -1
- package/dist/ingest/legacy-parser.js +52 -3
- package/dist/ingest/legacy-parser.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +120 -202
- package/dist/orchestrator/templates/ai-src/config/claude.md +1 -1
- package/dist/orchestrator/templates/ai-src/config/copilot.md +1 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +6 -92
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +7 -0
- package/package.json +4 -4
- package/src/cli/commands/delivery.ts +15 -227
- package/src/cli/commands/ingest.ts +57 -5
- package/src/dashboard/templates/index.html +1 -1
- package/src/exporters/feature-parser.ts +1 -1
- package/src/exporters/scenario-merger.ts +1 -1
- package/src/exporters/spec-parser.ts +1 -1
- package/src/exporters/xlsx-report-builder.ts +2 -3
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/click-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/click-element-with-text.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/navigation/wait-timeout.hbs +1 -1
- package/src/generators/test-generator/utils/runtime-data-transformer.ts +29 -18
- package/src/ingest/legacy-parser.ts +48 -3
- package/src/orchestrator/templates/ai-src/commands/delivery.md +120 -202
- package/src/orchestrator/templates/ai-src/config/claude.md +1 -1
- package/src/orchestrator/templates/ai-src/config/copilot.md +1 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +6 -92
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +7 -0
- package/dist/exporters/matrix/build.d.ts +0 -61
- package/dist/exporters/matrix/build.d.ts.map +0 -1
- package/dist/exporters/matrix/build.js +0 -472
- package/dist/exporters/matrix/build.js.map +0 -1
- package/dist/exporters/matrix/export.d.ts +0 -50
- package/dist/exporters/matrix/export.d.ts.map +0 -1
- package/dist/exporters/matrix/export.js +0 -152
- package/dist/exporters/matrix/export.js.map +0 -1
- package/dist/exporters/matrix/fingerprint.d.ts +0 -20
- package/dist/exporters/matrix/fingerprint.d.ts.map +0 -1
- package/dist/exporters/matrix/fingerprint.js +0 -83
- package/dist/exporters/matrix/fingerprint.js.map +0 -1
- package/dist/exporters/matrix/gates.d.ts +0 -21
- package/dist/exporters/matrix/gates.d.ts.map +0 -1
- package/dist/exporters/matrix/gates.js +0 -358
- package/dist/exporters/matrix/gates.js.map +0 -1
- package/dist/exporters/matrix/map-loader.d.ts +0 -22
- package/dist/exporters/matrix/map-loader.d.ts.map +0 -1
- package/dist/exporters/matrix/map-loader.js +0 -193
- package/dist/exporters/matrix/map-loader.js.map +0 -1
- package/dist/exporters/matrix/render-csv.d.ts +0 -9
- package/dist/exporters/matrix/render-csv.d.ts.map +0 -1
- package/dist/exporters/matrix/render-csv.js +0 -92
- package/dist/exporters/matrix/render-csv.js.map +0 -1
- package/dist/exporters/matrix/render-xlsx.d.ts +0 -41
- package/dist/exporters/matrix/render-xlsx.d.ts.map +0 -1
- package/dist/exporters/matrix/render-xlsx.js +0 -430
- package/dist/exporters/matrix/render-xlsx.js.map +0 -1
- package/dist/exporters/matrix/types.d.ts +0 -196
- package/dist/exporters/matrix/types.d.ts.map +0 -1
- package/dist/exporters/matrix/types.js +0 -15
- package/dist/exporters/matrix/types.js.map +0 -1
- package/dist/exporters/matrix/wording.d.ts +0 -51
- package/dist/exporters/matrix/wording.d.ts.map +0 -1
- package/dist/exporters/matrix/wording.js +0 -169
- package/dist/exporters/matrix/wording.js.map +0 -1
- package/src/exporters/matrix/build.ts +0 -503
- package/src/exporters/matrix/export.ts +0 -149
- package/src/exporters/matrix/fingerprint.ts +0 -49
- package/src/exporters/matrix/gates.ts +0 -391
- package/src/exporters/matrix/map-loader.ts +0 -163
- package/src/exporters/matrix/render-csv.ts +0 -94
- package/src/exporters/matrix/render-xlsx.ts +0 -420
- package/src/exporters/matrix/types.ts +0 -223
- package/src/exporters/matrix/wording.ts +0 -174
|
@@ -1,107 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sungen-delivery
|
|
3
|
-
description: 'Export
|
|
3
|
+
description: 'Export Gherkin scenarios + Playwright results → CSV test case deliverable. Auto-loaded by delivery command.'
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Purpose
|
|
8
8
|
|
|
9
|
-
Export test cases from Sungen
|
|
9
|
+
Export test cases from Sungen screens and flows to a standardized CSV file (format BM-2-901-13) for QA delivery.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
target + one test intent + one oracle family); scenarios / `@cases` rows stay as collapsible
|
|
13
|
-
*coverage variant* sub-rows. Built for review, manual execution, customer hand-off, and
|
|
14
|
-
reporting — no numbered step dumps.
|
|
15
|
-
- **Legacy (`--legacy`/`--full`)** — the classic per-scenario BM-2-901-13 workbook (documented
|
|
16
|
-
in the second half of this skill; unchanged).
|
|
11
|
+
**This skill delegates all heavy work to the `sungen delivery` CLI.** The CLI is the single source of truth for parsing logic — do NOT re-parse files in AI. Your role is only to:
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
1. Invoke the CLI
|
|
14
|
+
2. Show its output verbatim
|
|
15
|
+
3. Help the user react to pre-flight failures
|
|
21
16
|
|
|
22
17
|
---
|
|
23
18
|
|
|
24
|
-
## Matrix mode — the Delivery Map
|
|
25
|
-
|
|
26
|
-
`qa/<screens|flows|api>/<unit>/delivery/<unit>.map.yaml` — committed, AI-proposed
|
|
27
|
-
(`review: proposed`), gate-validated, QA-approved (`sungen delivery --approve` stamps scenario
|
|
28
|
-
fingerprints). Schema + grouping rules live in the delivery command instructions; the normative
|
|
29
|
-
spec is `docs/spec/delivery-coverage-matrix-spec.md`.
|
|
30
|
-
|
|
31
|
-
**Gates** (CLI `--check`): A source (VP-ids unique, oracle present, Background setup-only) ·
|
|
32
|
-
B mapping (every scenario in exactly one group XOR one disposition) · C aggregation (test layer
|
|
33
|
-
recomputed and equal within a group — **execution mode and priority are coverage dimensions, not
|
|
34
|
-
splits**: mixed items show `Auto n · Manual m` and take the highest variant priority; heuristic
|
|
35
|
-
oracle-shape/precondition mismatches are review-level, silenced once approved and unchanged) ·
|
|
36
|
-
D executability (precondition · condition+
|
|
37
|
-
data · trigger · oracle all renderable; every `{{var}}` resolves; **no template token may survive
|
|
38
|
-
into a rendered cell** — test-data cross-references are resolved for display) · E drift
|
|
39
|
-
(scenario fingerprint mismatch → back to review; the map's OWN reviewed
|
|
40
|
-
wording/grouping is fingerprinted as `__map__` too, so post-approval edits re-open review) · G review state (proposed groups block the official
|
|
41
|
-
render; `--preview` renders a DRAFT watermark) · K category class (a `VP-SEC-*` variant outside
|
|
42
|
-
`category: security`, or `VP-NFR-*` outside `nfr` → warning: the Coverage grid's column would render
|
|
43
|
-
empty and report a false gap) · R requirement coverage (spec FR/TR/NFR ids with no trace and no
|
|
44
|
-
`requirements:` status → warning; **and a `status: covered` override that no variant traces to** →
|
|
45
|
-
warning: tag the proving scenario `@spec:<id>` instead of asserting it in prose) · W wording lint (map intent/oracle containing
|
|
46
|
-
tokens, `[Selector]` refs, DSL phrasing, or generator labels → warning).
|
|
47
|
-
|
|
48
|
-
**Wording normalization (deterministic, after semantic normalization):** DSL steps render as
|
|
49
|
-
controlled manual-test English without changing meaning — actions in the imperative (`User fill
|
|
50
|
-
[Email] field with X` → `Enter X in the Email field.`), expected results as observable assertions
|
|
51
|
-
(`User see [Jobs] page` → `The Jobs page is displayed.`), preconditions as states (`The user is
|
|
52
|
-
signed out.`). Manual `# Tester verifies:` labels become structured fields: `Setup:` →
|
|
53
|
-
Precondition, `Action:` → Action, `Observable:` → Expected Result, `Oracle:` → a separate
|
|
54
|
-
`Verification method:` line. Sequence-sensitive flows keep event order: actions numbered with
|
|
55
|
-
mid-flow assertions inline as `Verify: …`; only the final Then block is the Expected Result.
|
|
56
|
-
Empty test values render as `(empty)`.
|
|
57
|
-
|
|
58
|
-
**Output format**: **XLSX only by default** (one artifact). `--format csv` writes the flat CSV
|
|
59
|
-
instead; `--format both` writes both.
|
|
60
|
-
|
|
61
|
-
**Scope decides strictness**: a **named** unit that is not ready aborts with exit 1 (pass
|
|
62
|
-
`--continue-on-missing` to tolerate it); a **no-argument sweep** exports every ready unit, lists
|
|
63
|
-
every unit it did not export with the reason, and exits 0 as long as it wrote something — a
|
|
64
|
-
scaffolded unit never blocks the ready ones.
|
|
65
|
-
|
|
66
|
-
**Workbook**: `Testcases` sheet — parent rows + outline-level-1 variant sub-rows for **every**
|
|
67
|
-
item (single-variant included: the sub-row carries the source VP-id, resolved data, and the
|
|
68
|
-
result/evidence entry). Sub-rows are **delta-only**: knowledge common to the whole item
|
|
69
|
-
(precondition, trigger) is written ONCE on the parent; a child repeats only what distinguishes it
|
|
70
|
-
(condition/data, precondition delta, trigger when it differs) plus its own precise oracle and
|
|
71
|
-
execution fields. The parent never carries placeholder text — when triggers differ the cell is
|
|
72
|
-
simply empty and the sub-rows carry them.
|
|
73
|
-
|
|
74
|
-
Parent preconditions are the **intersection** of the variants' and the parent's Action holds the
|
|
75
|
-
**shared leading steps**; each variant renders only its remaining steps, numbered to continue the
|
|
76
|
-
parent's list — so a shared prefix is written once, not repeated on every child. The parent's
|
|
77
|
-
Coverage cell is the map's short `dimensions:` digest (or the variant refs when none is declared),
|
|
78
|
-
never a concatenation of variant titles.
|
|
79
|
-
|
|
80
|
-
Variant Result cells hold exactly one of `Passed`/`Failed`/`Blocked`/`Pending`/`N/A` (dropdown) —
|
|
81
|
-
that vocabulary is the contract: the parent Result and the summary band are **live Excel formulas**
|
|
82
|
-
counting those words, so a parent label is always a composed `n/m Passed …` string (`All N/A` when
|
|
83
|
-
every variant is N/A) and never a bare state word. **`N/A` leaves the denominator.** Evidence and
|
|
84
|
-
Defect ID are separate columns; ID + Target frozen; ISO dates; landscape print with repeated
|
|
85
|
-
header rows.
|
|
86
|
-
|
|
87
|
-
`Coverage` sheet — requirement coverage table (every FR/TR/NFR id with an explicit status),
|
|
88
|
-
target × category grid with explicit `—` gaps, dispositions, manifest. CSV mirrors the same model
|
|
89
|
-
flat with a `Level` column (`item`/`variant`) + a requirement-coverage appendix.
|
|
90
|
-
`delivery_item_count` ≠ progress — variants are the execution metric.
|
|
91
|
-
|
|
92
|
-
**Data fidelity**: invisible test data is made visible, never normalized — `''` → `(empty)`,
|
|
93
|
-
whitespace-only → `(5 spaces)`, padded → `" value "` quoted verbatim. A trim/collapse here would
|
|
94
|
-
silently break the whitespace tests it describes.
|
|
95
|
-
|
|
96
|
-
**Authoring guidance the matrix rewards** (create-test side): payload/provider matrices (SQLi
|
|
97
|
-
payload lists, OAuth provider sets) belong in `@cases` datasets so each case is an atomic,
|
|
98
|
-
independently-reportable variant; keep dataset `case:` labels short and stable (`CHK-EMAIL-I1`),
|
|
99
|
-
with descriptions in other columns — the label is part of the variant's identity.
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Legacy mode (--legacy / --full)
|
|
104
|
-
|
|
105
19
|
## Architecture
|
|
106
20
|
|
|
107
21
|
```
|
|
@@ -39,6 +39,7 @@ User uncheck [T] checkbox | toggle
|
|
|
39
39
|
User select [T] dropdown with {{v}}
|
|
40
40
|
User click [T] button | tab | column | breadcrumb
|
|
41
41
|
User click [T] row with {{v}}
|
|
42
|
+
User try to click [T] button | link # DISABLED element only — see rule below (v3.3)
|
|
42
43
|
User double click [T] element
|
|
43
44
|
User hover [T] icon | row
|
|
44
45
|
User drag [T] to [T2]
|
|
@@ -47,6 +48,12 @@ User expand | collapse [T] row
|
|
|
47
48
|
|
|
48
49
|
**click + with {{Value}} rule**: NO value for static (`button`, `link`, `icon`, `tab`). WITH value only for dynamic lists (`row`, `item`, `card`, `option`).
|
|
49
50
|
|
|
51
|
+
**try to click rule** (v3.3, web only): use ONLY when the element is expected to be DISABLED and the
|
|
52
|
+
scenario asserts nothing happens (cooldown re-send, submit before the form is valid). `click` waits for
|
|
53
|
+
`enabled` → it can only time out there; `try to click` compiles to `.click({ force: true })`. Always
|
|
54
|
+
pair it with the proof: `Then User see [T] TYPE is disabled` + an assertion that the effect did NOT occur.
|
|
55
|
+
NEVER use it for a click that is supposed to work — it deletes the actionability wait.
|
|
56
|
+
|
|
50
57
|
### Alert / Keyboard / Wait / Scroll
|
|
51
58
|
|
|
52
59
|
```
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build the matrix model: derive atomic coverage variants from the merged
|
|
3
|
-
* feature/spec view, assemble delivery items per the Delivery Map, attach
|
|
4
|
-
* per-variant Playwright results, and roll parents up (derived only — Gate F
|
|
5
|
-
* is structural: there is no independent parent result input).
|
|
6
|
-
*/
|
|
7
|
-
import { FeatureMetadata, PlaywrightResult } from '../types';
|
|
8
|
-
import { MergedScenario } from '../scenario-merger';
|
|
9
|
-
import { CoverageVariant, DeliveryItem, DeliveryMap, ItemResult, VariantState, MatrixModel, RequirementCoverage } from './types';
|
|
10
|
-
export interface BuildInputs {
|
|
11
|
-
unit: string;
|
|
12
|
-
feature: FeatureMetadata;
|
|
13
|
-
merged: MergedScenario[];
|
|
14
|
-
testData: Record<string, string> | null;
|
|
15
|
-
results: Map<string, PlaywrightResult> | null;
|
|
16
|
-
map: DeliveryMap;
|
|
17
|
-
transformerVersion: string;
|
|
18
|
-
/** requirements/spec.md content — source of the requirement-id inventory (FR/TR/NFR). */
|
|
19
|
-
specText?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Derive every atomic coverage variant of the unit (one per scenario, or one per
|
|
23
|
-
* `@cases` dataset row). Exported separately so the gates + the map-proposal
|
|
24
|
-
* support tooling see the same universe the builder does.
|
|
25
|
-
*/
|
|
26
|
-
export declare function deriveVariants(inputs: Pick<BuildInputs, 'feature' | 'merged' | 'testData' | 'results'>): CoverageVariant[];
|
|
27
|
-
/**
|
|
28
|
-
* Make invisible test data VISIBLE instead of losing it (review GAP-04):
|
|
29
|
-
* '' → (empty) · whitespace-only → (N spaces) · padded → quoted verbatim.
|
|
30
|
-
* The canonical value is never changed — only its presentation.
|
|
31
|
-
*/
|
|
32
|
-
export declare function displayValue(v: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* Requirement inventory ∪ traces → coverage table. Ids are scanned from the spec
|
|
35
|
-
* text (FR-/TR-/NFR-<n>); map overrides win over the derived covered/gap status.
|
|
36
|
-
*/
|
|
37
|
-
export declare function computeRequirements(specText: string, map: DeliveryMap, items: DeliveryItem[]): RequirementCoverage[];
|
|
38
|
-
/**
|
|
39
|
-
* The exact word rendered in a variant's Result cell. This is the SINGLE
|
|
40
|
-
* vocabulary both the renderers and the parent's COUNTIF roll-up use — the
|
|
41
|
-
* legacy exporter's statusToTestResult disagreed on two statuses (`skipped`
|
|
42
|
-
* showed N/A but counted as not-run; `interrupted` showed Pending but counted
|
|
43
|
-
* as blocked), which silently skewed the derived parent result.
|
|
44
|
-
*/
|
|
45
|
-
export declare function variantState(v: CoverageVariant): VariantState;
|
|
46
|
-
/**
|
|
47
|
-
* Derived parent result — precedence failed → blocked → all-N/A → not_run →
|
|
48
|
-
* partial → passed. `N/A` variants leave the denominator (an intentionally
|
|
49
|
-
* skipped case must not make the parent look incomplete).
|
|
50
|
-
*/
|
|
51
|
-
export declare function rollUp(variants: CoverageVariant[]): {
|
|
52
|
-
result: ItemResult;
|
|
53
|
-
counts: DeliveryItem['resultCounts'];
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Expand one map variant ref to concrete variant refs:
|
|
57
|
-
* a bare VP-id whose scenario has a dataset means ALL its rows.
|
|
58
|
-
*/
|
|
59
|
-
export declare function expandMapRef(ref: string, variantsByVp: Map<string, CoverageVariant[]>): CoverageVariant[];
|
|
60
|
-
export declare function buildMatrix(inputs: BuildInputs): MatrixModel;
|
|
61
|
-
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/exporters/matrix/build.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAUpD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,UAAU,EACV,YAAY,EAGZ,WAAW,EACX,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAwDjB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAC9C,GAAG,EAAE,WAAW,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC,GAAG,eAAe,EAAE,CAwI1H;AAgBD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9C;AASD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,YAAY,EAAE,GACpB,mBAAmB,EAAE,CAuBvB;AAyBD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,YAAY,CAW7D;AAMD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAAE,CAYhH;AAUD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,GAAG,eAAe,EAAE,CAMzG;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CA8G5D"}
|