@sun-asterisk/sungen 3.2.15 → 3.2.16-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/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +139 -1
- package/dist/cli/commands/delivery.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/matrix/build.d.ts +43 -0
- package/dist/exporters/matrix/build.d.ts.map +1 -0
- package/dist/exporters/matrix/build.js +403 -0
- package/dist/exporters/matrix/build.js.map +1 -0
- package/dist/exporters/matrix/export.d.ts +49 -0
- package/dist/exporters/matrix/export.d.ts.map +1 -0
- package/dist/exporters/matrix/export.js +143 -0
- package/dist/exporters/matrix/export.js.map +1 -0
- package/dist/exporters/matrix/fingerprint.d.ts +20 -0
- package/dist/exporters/matrix/fingerprint.d.ts.map +1 -0
- package/dist/exporters/matrix/fingerprint.js +83 -0
- package/dist/exporters/matrix/fingerprint.js.map +1 -0
- package/dist/exporters/matrix/gates.d.ts +21 -0
- package/dist/exporters/matrix/gates.d.ts.map +1 -0
- package/dist/exporters/matrix/gates.js +295 -0
- package/dist/exporters/matrix/gates.js.map +1 -0
- package/dist/exporters/matrix/map-loader.d.ts +22 -0
- package/dist/exporters/matrix/map-loader.d.ts.map +1 -0
- package/dist/exporters/matrix/map-loader.js +191 -0
- package/dist/exporters/matrix/map-loader.js.map +1 -0
- package/dist/exporters/matrix/render-csv.d.ts +9 -0
- package/dist/exporters/matrix/render-csv.d.ts.map +1 -0
- package/dist/exporters/matrix/render-csv.js +89 -0
- package/dist/exporters/matrix/render-csv.js.map +1 -0
- package/dist/exporters/matrix/render-xlsx.d.ts +25 -0
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -0
- package/dist/exporters/matrix/render-xlsx.js +362 -0
- package/dist/exporters/matrix/render-xlsx.js.map +1 -0
- package/dist/exporters/matrix/types.d.ts +175 -0
- package/dist/exporters/matrix/types.d.ts.map +1 -0
- package/dist/exporters/matrix/types.js +15 -0
- package/dist/exporters/matrix/types.js.map +1 -0
- package/dist/exporters/matrix/wording.d.ts +45 -0
- package/dist/exporters/matrix/wording.d.ts.map +1 -0
- package/dist/exporters/matrix/wording.js +150 -0
- package/dist/exporters/matrix/wording.js.map +1 -0
- 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/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +6 -1
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability.d.ts +25 -0
- package/dist/harness/capability.d.ts.map +1 -1
- package/dist/harness/capability.js +44 -2
- package/dist/harness/capability.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +1 -1
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +144 -120
- 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 +59 -6
- package/dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +1 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +1 -0
- package/package.json +4 -4
- package/src/cli/commands/delivery.ts +169 -2
- package/src/dashboard/templates/index.html +1 -1
- package/src/exporters/feature-parser.ts +1 -1
- package/src/exporters/matrix/build.ts +432 -0
- package/src/exporters/matrix/export.ts +134 -0
- package/src/exporters/matrix/fingerprint.ts +49 -0
- package/src/exporters/matrix/gates.ts +325 -0
- package/src/exporters/matrix/map-loader.ts +161 -0
- package/src/exporters/matrix/render-csv.ts +91 -0
- package/src/exporters/matrix/render-xlsx.ts +356 -0
- package/src/exporters/matrix/types.ts +202 -0
- package/src/exporters/matrix/wording.ts +157 -0
- package/src/exporters/scenario-merger.ts +1 -1
- package/src/exporters/spec-parser.ts +1 -1
- package/src/exporters/xlsx-report-builder.ts +3 -2
- package/src/harness/audit.ts +7 -2
- package/src/harness/capability.ts +53 -3
- package/src/orchestrator/templates/ai-src/commands/create-test.md +1 -1
- package/src/orchestrator/templates/ai-src/commands/delivery.md +144 -120
- 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 +59 -6
- package/src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +1 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +1 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Render the Test Case & Coverage Matrix workbook.
|
|
4
|
+
*
|
|
5
|
+
* Sheets:
|
|
6
|
+
* 1. Testcases — one parent row per delivery item; EVERY item (including
|
|
7
|
+
* single-variant ones) carries variant sub-rows on Excel outline level 1 —
|
|
8
|
+
* the sub-row is where source traceability (VP-id), test data, and the
|
|
9
|
+
* manual result/evidence entry live (review B-05/B-06). Collapse outline
|
|
10
|
+
* level 1 for the customer/review view; expand to execute.
|
|
11
|
+
* 2. Coverage — requirement coverage (id ↔ items ↔ status), the target ×
|
|
12
|
+
* category grid (explicit `—` gaps), dispositions, and the manifest.
|
|
13
|
+
*
|
|
14
|
+
* Manual-execution support: variant Result cells carry a dropdown
|
|
15
|
+
* (Passed/Failed/Blocked/Pending/N/A) and the parent Result is a live Excel
|
|
16
|
+
* formula derived from its children — a parent can never contradict its
|
|
17
|
+
* variants, even after QA edits results by hand (review B-06).
|
|
18
|
+
*
|
|
19
|
+
* Every sheet keeps the company ISO masthead. A draft matrix (unapproved
|
|
20
|
+
* groups / review findings) carries a red DRAFT banner.
|
|
21
|
+
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
+
}) : function(o, v) {
|
|
36
|
+
o["default"] = v;
|
|
37
|
+
});
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.itemResultLabel = itemResultLabel;
|
|
57
|
+
exports.renderMatrixXlsx = renderMatrixXlsx;
|
|
58
|
+
const ExcelJS = __importStar(require("exceljs"));
|
|
59
|
+
const xlsx_report_builder_1 = require("../xlsx-report-builder");
|
|
60
|
+
const playwright_report_parser_1 = require("../playwright-report-parser");
|
|
61
|
+
const CATEGORY_ORDER = ['normal', 'abnormal', 'security', 'nfr'];
|
|
62
|
+
const SOFT_BLUE = { argb: 'FFDCE6F1' };
|
|
63
|
+
const DRAFT_RED = { argb: 'FFC00000' };
|
|
64
|
+
const GAP_FILL = { argb: 'FFFCE4EC' };
|
|
65
|
+
const RESULT_STATES = 'Passed,Failed,Blocked,Pending,N/A';
|
|
66
|
+
function headerCell(c, label) {
|
|
67
|
+
c.value = label;
|
|
68
|
+
c.font = { bold: true, size: 10, color: xlsx_report_builder_1.BLACK, name: xlsx_report_builder_1.ARIAL_FONT };
|
|
69
|
+
c.fill = { type: 'pattern', pattern: 'solid', fgColor: xlsx_report_builder_1.LAVENDER };
|
|
70
|
+
c.alignment = { horizontal: 'center', vertical: 'middle', wrapText: true };
|
|
71
|
+
c.border = xlsx_report_builder_1.allBordersBlack;
|
|
72
|
+
}
|
|
73
|
+
function dataCell(c, value, opts) {
|
|
74
|
+
// An empty value stays a genuinely blank cell — never an empty shared string,
|
|
75
|
+
// which some renderers display as its string-table index (review M-03).
|
|
76
|
+
if (value !== '' && value !== undefined && value !== null)
|
|
77
|
+
c.value = value;
|
|
78
|
+
c.font = { bold: opts?.bold ?? false, size: 10, name: xlsx_report_builder_1.ARIAL_FONT, ...(opts?.color ? { color: opts.color } : {}) };
|
|
79
|
+
c.alignment = { horizontal: opts?.center ? 'center' : 'left', vertical: 'top', wrapText: true };
|
|
80
|
+
c.border = xlsx_report_builder_1.allBordersBlack;
|
|
81
|
+
if (opts?.fill)
|
|
82
|
+
c.fill = { type: 'pattern', pattern: 'solid', fgColor: opts.fill };
|
|
83
|
+
}
|
|
84
|
+
function itemResultLabel(item) {
|
|
85
|
+
const { passed, failed, blocked, notRun } = item.resultCounts;
|
|
86
|
+
const total = item.variants.length;
|
|
87
|
+
const map = {
|
|
88
|
+
passed: `${passed}/${total} Passed`,
|
|
89
|
+
failed: `${passed}/${total} Passed · ${failed} Failed`,
|
|
90
|
+
blocked: `${blocked} Blocked`,
|
|
91
|
+
partial: `${passed}/${total} Passed · ${notRun} not run`,
|
|
92
|
+
not_run: 'Pending',
|
|
93
|
+
};
|
|
94
|
+
return map[item.result];
|
|
95
|
+
}
|
|
96
|
+
function variantResultLabel(v) {
|
|
97
|
+
if (!v.result)
|
|
98
|
+
return 'Pending';
|
|
99
|
+
return (0, playwright_report_parser_1.statusToTestResult)(v.result.status);
|
|
100
|
+
}
|
|
101
|
+
/** ISO date (2026-08-04) — unambiguous across locales (review §9). */
|
|
102
|
+
function isoDate(startTime) {
|
|
103
|
+
if (!startTime)
|
|
104
|
+
return '';
|
|
105
|
+
const d = new Date(startTime);
|
|
106
|
+
if (isNaN(d.getTime()))
|
|
107
|
+
return '';
|
|
108
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
|
109
|
+
}
|
|
110
|
+
function numbered(lines) {
|
|
111
|
+
if (lines.length === 0)
|
|
112
|
+
return '';
|
|
113
|
+
if (lines.length === 1)
|
|
114
|
+
return lines[0];
|
|
115
|
+
return lines.map((l, i) => `${i + 1}. ${l}`).join('\n');
|
|
116
|
+
}
|
|
117
|
+
/** Expected cell = observable outcomes; the HOW moves under a separate heading. */
|
|
118
|
+
function expectedWithVerification(oracle, verification) {
|
|
119
|
+
const expected = numbered(oracle);
|
|
120
|
+
if (verification.length === 0)
|
|
121
|
+
return expected;
|
|
122
|
+
return `${expected}\nVerification method: ${verification.join(' ')}`;
|
|
123
|
+
}
|
|
124
|
+
/** Red DRAFT banner on row 5 when the matrix is not approved for official delivery. */
|
|
125
|
+
function draftBanner(ws, model) {
|
|
126
|
+
if (model.manifest.approvalState !== 'draft')
|
|
127
|
+
return;
|
|
128
|
+
ws.mergeCells('B5:H5');
|
|
129
|
+
const c = ws.getCell('B5');
|
|
130
|
+
c.value = 'DRAFT — NOT APPROVED FOR OFFICIAL DELIVERY (review-required findings or proposed groups remain)';
|
|
131
|
+
c.font = { bold: true, size: 11, name: xlsx_report_builder_1.ARIAL_FONT, color: { argb: 'FFFFFFFF' } };
|
|
132
|
+
c.fill = { type: 'pattern', pattern: 'solid', fgColor: DRAFT_RED };
|
|
133
|
+
c.alignment = { horizontal: 'center', vertical: 'middle' };
|
|
134
|
+
}
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
// Sheet 1 — Testcases (the matrix)
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
const MATRIX_HEADERS = [
|
|
139
|
+
'ID', 'Target', 'Test Intent / Condition', 'Category', 'Priority', 'Precondition',
|
|
140
|
+
'Coverage / Test Data', 'Action / Trigger', 'Expected Result', 'Mode', 'Trace',
|
|
141
|
+
'Result', 'Executed Date', 'Executor', 'Note\n(Evidence, DefectID)',
|
|
142
|
+
];
|
|
143
|
+
const RESULT_COL = 13; // column M
|
|
144
|
+
function addMatrixSheet(wb, model, sungenVersion) {
|
|
145
|
+
const ws = wb.addWorksheet('Testcases');
|
|
146
|
+
ws.properties.outlineLevelRow = 1;
|
|
147
|
+
ws.columns = [
|
|
148
|
+
{ width: 3 }, // A margin
|
|
149
|
+
{ width: 22 }, // B ID
|
|
150
|
+
{ width: 18 }, // C Target
|
|
151
|
+
{ width: 42 }, // D Intent / Condition
|
|
152
|
+
{ width: 11 }, // E Category
|
|
153
|
+
{ width: 9 }, // F Priority
|
|
154
|
+
{ width: 26 }, // G Precondition
|
|
155
|
+
{ width: 34 }, // H Coverage / Data
|
|
156
|
+
{ width: 34 }, // I Trigger
|
|
157
|
+
{ width: 42 }, // J Expected
|
|
158
|
+
{ width: 11 }, // K Mode
|
|
159
|
+
{ width: 13 }, // L Trace
|
|
160
|
+
{ width: 22 }, // M Result
|
|
161
|
+
{ width: 12 }, // N Executed
|
|
162
|
+
{ width: 13 }, // O Executor
|
|
163
|
+
{ width: 24 }, // P Note
|
|
164
|
+
];
|
|
165
|
+
(0, xlsx_report_builder_1.renderReportHeaderBand)(wb, ws, `${model.unit.toUpperCase()} TEST CASE & COVERAGE MATRIX`, sungenVersion, model.formNo);
|
|
166
|
+
draftBanner(ws, model);
|
|
167
|
+
// Summary band (row 6) — items vs variants stay separate metrics by design (I8):
|
|
168
|
+
// the ITEM count is reviewer workload, the VARIANT count is execution workload.
|
|
169
|
+
const passed = model.items.reduce((a, i) => a + i.resultCounts.passed, 0);
|
|
170
|
+
const failed = model.items.reduce((a, i) => a + i.resultCounts.failed, 0);
|
|
171
|
+
const notRun = model.items.reduce((a, i) => a + i.resultCounts.notRun + i.resultCounts.blocked, 0);
|
|
172
|
+
const band = ws.getRow(6);
|
|
173
|
+
[
|
|
174
|
+
`Delivery items: ${model.manifest.itemCount}`,
|
|
175
|
+
`Coverage variants: ${model.manifest.variantCount}`,
|
|
176
|
+
`Passed: ${passed}`, `Failed: ${failed}`, `Pending: ${notRun}`,
|
|
177
|
+
].forEach((label, i) => {
|
|
178
|
+
const c = band.getCell(2 + i);
|
|
179
|
+
dataCell(c, label, { bold: true, fill: SOFT_BLUE, center: true });
|
|
180
|
+
});
|
|
181
|
+
const HEADER_ROW = 8;
|
|
182
|
+
const hr = ws.getRow(HEADER_ROW);
|
|
183
|
+
hr.height = 28;
|
|
184
|
+
MATRIX_HEADERS.forEach((label, i) => headerCell(hr.getCell(2 + i), label));
|
|
185
|
+
let rowIdx = HEADER_ROW + 1;
|
|
186
|
+
for (const item of model.items) {
|
|
187
|
+
const parentRowIdx = rowIdx++;
|
|
188
|
+
// --- Variant sub-rows FIRST (to know their cell range for the parent formula).
|
|
189
|
+
// Every item gets sub-rows — the sub-row is where the source scenario id, the
|
|
190
|
+
// resolved data, and the manual result/evidence entry live (review B-05).
|
|
191
|
+
const firstChild = rowIdx;
|
|
192
|
+
for (const v of item.variants) {
|
|
193
|
+
const vr = ws.getRow(rowIdx++);
|
|
194
|
+
vr.outlineLevel = 1;
|
|
195
|
+
const vValues = [
|
|
196
|
+
v.ref,
|
|
197
|
+
'',
|
|
198
|
+
v.condition,
|
|
199
|
+
'', '', '',
|
|
200
|
+
numbered(v.data),
|
|
201
|
+
numbered(v.trigger),
|
|
202
|
+
expectedWithVerification(v.oracle, v.verification),
|
|
203
|
+
v.mode === 'manual' ? `Manual${v.manualReason ? ` (${v.manualReason})` : ''}` : 'Auto',
|
|
204
|
+
v.traces.join(', '),
|
|
205
|
+
variantResultLabel(v),
|
|
206
|
+
isoDate(v.result?.startTime),
|
|
207
|
+
'',
|
|
208
|
+
v.result?.error ? String(v.result.error).slice(0, 200) : '',
|
|
209
|
+
];
|
|
210
|
+
vValues.forEach((val, i) => dataCell(vr.getCell(2 + i), val, { center: i === 9 }));
|
|
211
|
+
// Manual-execution entry: constrain the Result cell to the known states.
|
|
212
|
+
vr.getCell(2 + 11).dataValidation = {
|
|
213
|
+
type: 'list', allowBlank: true, formulae: [`"${RESULT_STATES}"`],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const lastChild = rowIdx - 1;
|
|
217
|
+
// --- Parent row: only values that are genuinely COMMON to the whole item
|
|
218
|
+
// (review M-04); everything variant-specific stays on the sub-rows.
|
|
219
|
+
const pr = ws.getRow(parentRowIdx);
|
|
220
|
+
const triggerTexts = new Set(item.variants.map((v) => v.trigger.join('\n')));
|
|
221
|
+
const commonTrigger = triggerTexts.size === 1 ? item.variants[0].trigger : null;
|
|
222
|
+
const coverage = `${item.variants.length} variant(s): ${item.variants.map((v) => v.condition).join(' · ')}`;
|
|
223
|
+
// Live roll-up: derived from the child Result cells so hand-entered results
|
|
224
|
+
// recompute the parent — precedence failed → blocked → pending → partial → passed.
|
|
225
|
+
const rng = `M${firstChild}:M${lastChild}`;
|
|
226
|
+
const n = item.variants.length;
|
|
227
|
+
const rollUpFormula = `IF(COUNTIF(${rng},"Failed")>0,COUNTIF(${rng},"Passed")&"/${n} Passed · "&COUNTIF(${rng},"Failed")&" Failed",` +
|
|
228
|
+
`IF(COUNTIF(${rng},"Blocked")>0,"Blocked",` +
|
|
229
|
+
`IF(COUNTIF(${rng},"Passed")=${n},"${n}/${n} Passed",` +
|
|
230
|
+
`IF(COUNTIF(${rng},"Passed")=0,"Pending",COUNTIF(${rng},"Passed")&"/${n} Passed · pending"))))`;
|
|
231
|
+
const values = [
|
|
232
|
+
item.id,
|
|
233
|
+
item.target,
|
|
234
|
+
item.intent,
|
|
235
|
+
item.category,
|
|
236
|
+
item.priority,
|
|
237
|
+
numbered(item.precondition),
|
|
238
|
+
coverage,
|
|
239
|
+
commonTrigger ? numbered(commonTrigger) : '(differs per variant — see sub-rows)',
|
|
240
|
+
item.oracle,
|
|
241
|
+
item.mode === 'manual' ? 'Manual' : 'Auto',
|
|
242
|
+
item.traces.join(', '),
|
|
243
|
+
{ formula: rollUpFormula, result: itemResultLabel(item) },
|
|
244
|
+
'',
|
|
245
|
+
'',
|
|
246
|
+
item.review === 'proposed' ? 'REVIEW REQUIRED' : '',
|
|
247
|
+
];
|
|
248
|
+
values.forEach((v, i) => dataCell(pr.getCell(2 + i), v, {
|
|
249
|
+
bold: true,
|
|
250
|
+
fill: SOFT_BLUE,
|
|
251
|
+
center: i === 3 || i === 4 || i === 9,
|
|
252
|
+
...(i === 14 && item.review === 'proposed' ? { color: DRAFT_RED } : {}),
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
ws.autoFilter = { from: { row: HEADER_ROW, column: 2 }, to: { row: rowIdx - 1, column: 16 } };
|
|
256
|
+
// Freeze the header band AND the ID + Target columns (review §9).
|
|
257
|
+
ws.views = [{ state: 'frozen', xSplit: 3, ySplit: HEADER_ROW }];
|
|
258
|
+
}
|
|
259
|
+
// ---------------------------------------------------------------------------
|
|
260
|
+
// Sheet 2 — Coverage (requirements + overview grid + dispositions + manifest)
|
|
261
|
+
// ---------------------------------------------------------------------------
|
|
262
|
+
function addCoverageSheet(wb, model, sungenVersion) {
|
|
263
|
+
const ws = wb.addWorksheet('Coverage');
|
|
264
|
+
ws.columns = [
|
|
265
|
+
{ width: 3 }, { width: 22 }, { width: 18 }, { width: 16 }, { width: 16 }, { width: 16 },
|
|
266
|
+
{ width: 16 }, { width: 44 },
|
|
267
|
+
];
|
|
268
|
+
(0, xlsx_report_builder_1.renderReportHeaderBand)(wb, ws, `${model.unit.toUpperCase()} COVERAGE OVERVIEW`, sungenVersion, model.formNo);
|
|
269
|
+
draftBanner(ws, model);
|
|
270
|
+
let rowIdx = 7;
|
|
271
|
+
// --- Requirement coverage (review §6): every requirement id gets ONE explicit status.
|
|
272
|
+
if (model.requirements.length > 0) {
|
|
273
|
+
dataCell(ws.getRow(rowIdx).getCell(2), 'Requirement coverage — every id has an explicit status', { bold: true });
|
|
274
|
+
rowIdx += 1;
|
|
275
|
+
const rh = ws.getRow(rowIdx++);
|
|
276
|
+
['Requirement', 'Status', 'Delivery items', 'Variants', 'Note'].forEach((l, i) => headerCell(rh.getCell(2 + i), l));
|
|
277
|
+
for (const r of model.requirements) {
|
|
278
|
+
const row = ws.getRow(rowIdx++);
|
|
279
|
+
dataCell(row.getCell(2), r.id, { bold: true });
|
|
280
|
+
dataCell(row.getCell(3), r.status, {
|
|
281
|
+
center: true,
|
|
282
|
+
...(r.status === 'gap' ? { fill: GAP_FILL, bold: true } : {}),
|
|
283
|
+
});
|
|
284
|
+
ws.mergeCells(rowIdx - 1, 4, rowIdx - 1, 6);
|
|
285
|
+
dataCell(row.getCell(4), r.items.join(', '));
|
|
286
|
+
dataCell(row.getCell(7), r.variantCount > 0 ? String(r.variantCount) : '', { center: true });
|
|
287
|
+
dataCell(row.getCell(8), r.note);
|
|
288
|
+
}
|
|
289
|
+
rowIdx += 1;
|
|
290
|
+
}
|
|
291
|
+
// --- Target × category grid ---
|
|
292
|
+
dataCell(ws.getRow(rowIdx).getCell(2), 'Coverage matrix — delivery items (coverage variants) per target × category', { bold: true });
|
|
293
|
+
rowIdx += 1;
|
|
294
|
+
const gridHeader = ws.getRow(rowIdx++);
|
|
295
|
+
headerCell(gridHeader.getCell(2), 'Target');
|
|
296
|
+
CATEGORY_ORDER.forEach((cat, i) => headerCell(gridHeader.getCell(3 + i), cat));
|
|
297
|
+
headerCell(gridHeader.getCell(3 + CATEGORY_ORDER.length), 'Total');
|
|
298
|
+
const targets = Array.from(new Set(model.items.map((i) => i.target)));
|
|
299
|
+
for (const target of targets) {
|
|
300
|
+
const row = ws.getRow(rowIdx++);
|
|
301
|
+
dataCell(row.getCell(2), target, { bold: true });
|
|
302
|
+
let totalItems = 0;
|
|
303
|
+
let totalVariants = 0;
|
|
304
|
+
CATEGORY_ORDER.forEach((cat, i) => {
|
|
305
|
+
const cell = row.getCell(3 + i);
|
|
306
|
+
const items = model.items.filter((it) => it.target === target && it.category === cat);
|
|
307
|
+
const variants = items.reduce((a, it) => a + it.variants.length, 0);
|
|
308
|
+
totalItems += items.length;
|
|
309
|
+
totalVariants += variants;
|
|
310
|
+
// `—` is an explicit statement: this target × category cell has NO coverage.
|
|
311
|
+
dataCell(cell, items.length === 0 ? '—' : `${items.length} (${variants})`, {
|
|
312
|
+
center: true,
|
|
313
|
+
...(items.length === 0 ? { fill: GAP_FILL } : {}),
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
dataCell(row.getCell(3 + CATEGORY_ORDER.length), `${totalItems} (${totalVariants})`, { center: true, bold: true });
|
|
317
|
+
}
|
|
318
|
+
// --- Dispositions ---
|
|
319
|
+
if (model.dispositions.length > 0) {
|
|
320
|
+
rowIdx += 1;
|
|
321
|
+
dataCell(ws.getRow(rowIdx).getCell(2), 'Not in the matrix (explicit dispositions)', { bold: true });
|
|
322
|
+
rowIdx += 1;
|
|
323
|
+
const dh = ws.getRow(rowIdx++);
|
|
324
|
+
['Source', 'Disposition', 'Reason', 'Title'].forEach((l, i) => headerCell(dh.getCell(2 + i), l));
|
|
325
|
+
for (const d of model.dispositions) {
|
|
326
|
+
const row = ws.getRow(rowIdx++);
|
|
327
|
+
dataCell(row.getCell(2), d.vpId);
|
|
328
|
+
dataCell(row.getCell(3), d.as, { center: true });
|
|
329
|
+
dataCell(row.getCell(4), d.reason);
|
|
330
|
+
dataCell(row.getCell(5), d.title);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
// --- Manifest ---
|
|
334
|
+
rowIdx += 1;
|
|
335
|
+
dataCell(ws.getRow(rowIdx).getCell(2), 'Generation manifest', { bold: true });
|
|
336
|
+
rowIdx += 1;
|
|
337
|
+
const m = model.manifest;
|
|
338
|
+
const manifestRows = [
|
|
339
|
+
['Unit', m.unit],
|
|
340
|
+
['Approval state', m.approvalState],
|
|
341
|
+
['Delivery items', String(m.itemCount)],
|
|
342
|
+
['Coverage variants', String(m.variantCount)],
|
|
343
|
+
['Source fingerprint', m.sourceFingerprint],
|
|
344
|
+
['Map fingerprint', m.mapFingerprint],
|
|
345
|
+
['Transformer version', m.transformerVersion],
|
|
346
|
+
['Max variants / item (warn)', String(m.thresholds.maxVariantsPerItem)],
|
|
347
|
+
];
|
|
348
|
+
for (const [k, v] of manifestRows) {
|
|
349
|
+
const row = ws.getRow(rowIdx++);
|
|
350
|
+
dataCell(row.getCell(2), k, { bold: true, fill: SOFT_BLUE });
|
|
351
|
+
ws.mergeCells(rowIdx - 1, 3, rowIdx - 1, 7);
|
|
352
|
+
dataCell(row.getCell(3), v);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
// ---------------------------------------------------------------------------
|
|
356
|
+
function renderMatrixXlsx(model, sungenVersion) {
|
|
357
|
+
const wb = new ExcelJS.Workbook();
|
|
358
|
+
addMatrixSheet(wb, model, sungenVersion);
|
|
359
|
+
addCoverageSheet(wb, model, sungenVersion);
|
|
360
|
+
return wb;
|
|
361
|
+
}
|
|
362
|
+
//# sourceMappingURL=render-xlsx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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CAAC,EAAE,CAAC,CAAC,CAAC;QAC5C,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,8EAA8E;AAE9E,SAAgB,gBAAgB,CAAC,KAAkB,EAAE,aAAsB;IACzE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IAC3C,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery v2 — Test Case & Coverage Matrix model (docs/spec/delivery-coverage-matrix-spec.md).
|
|
3
|
+
*
|
|
4
|
+
* Gherkin stays the source of test meaning; the matrix is a derived presentation:
|
|
5
|
+
* one delivery item = one target + one intent + one oracle family, containing one or
|
|
6
|
+
* more atomic coverage variants (scenario / @cases row). Grouping semantics live in the
|
|
7
|
+
* committed Delivery Map (`qa/<kind>/<unit>/delivery/<unit>.map.yaml`) — AI-proposed,
|
|
8
|
+
* gate-validated, QA-approved.
|
|
9
|
+
*/
|
|
10
|
+
import { PlaywrightResult } from '../types';
|
|
11
|
+
export type MapCategory = 'normal' | 'abnormal' | 'security' | 'nfr';
|
|
12
|
+
export type ReviewState = 'proposed' | 'approved';
|
|
13
|
+
export type DispositionKind = 'excluded' | 'blocked' | 'covered_elsewhere' | 'accepted_risk';
|
|
14
|
+
export interface MapGroup {
|
|
15
|
+
/** Stable delivery id, unique per unit, order-independent (e.g. DI-EMAIL-FORMAT). */
|
|
16
|
+
id: string;
|
|
17
|
+
/** ONE primary target: field/component dot-path, function/flow phrase, or `METHOD /path`. */
|
|
18
|
+
target: string;
|
|
19
|
+
/** One coherent test intent (the primary behavior/rule verified). */
|
|
20
|
+
intent: string;
|
|
21
|
+
/** Oracle family in words — the shared Pass/Fail observation. */
|
|
22
|
+
oracle: string;
|
|
23
|
+
category: MapCategory;
|
|
24
|
+
review: ReviewState;
|
|
25
|
+
/** Variant refs: `VP-ID` (all @cases rows when the scenario has a dataset) or `VP-ID#label`. */
|
|
26
|
+
variants: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface MapDisposition {
|
|
29
|
+
as: DispositionKind;
|
|
30
|
+
reason?: string;
|
|
31
|
+
}
|
|
32
|
+
export type RequirementStatus = 'covered' | 'partially_covered' | 'covered_elsewhere' | 'planned' | 'gap' | 'not_applicable';
|
|
33
|
+
export interface RequirementOverride {
|
|
34
|
+
status: RequirementStatus;
|
|
35
|
+
note?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DeliveryMap {
|
|
38
|
+
version: number;
|
|
39
|
+
unit: string;
|
|
40
|
+
/** ISO form number rendered in the workbook masthead (default BM-2-901-13). */
|
|
41
|
+
formNo?: string;
|
|
42
|
+
groups: MapGroup[];
|
|
43
|
+
/** VP-id → intentionally-not-grouped disposition. */
|
|
44
|
+
dispositions: Record<string, MapDisposition>;
|
|
45
|
+
/** Requirement-id → reviewed status override (partially_covered / not_applicable / …).
|
|
46
|
+
* Without an override a requirement is `covered` when a variant traces to it, else `gap`. */
|
|
47
|
+
requirements: Record<string, RequirementOverride>;
|
|
48
|
+
/** VP-id → scenario fingerprint stamped at approval time (drift detector input). */
|
|
49
|
+
fingerprints: Record<string, string>;
|
|
50
|
+
}
|
|
51
|
+
/** Execution layers a variant verifies on — cross-checked with the verification scope. */
|
|
52
|
+
export type MatrixLayer = 'ui' | 'api' | 'db';
|
|
53
|
+
/**
|
|
54
|
+
* One atomic coverage variant — the unit of execution, result, and traceability.
|
|
55
|
+
* Backed by one scenario, or one `@cases` dataset row of a scenario.
|
|
56
|
+
*/
|
|
57
|
+
export interface CoverageVariant {
|
|
58
|
+
/** `VP-ID` or `VP-ID#label` for a dataset row. */
|
|
59
|
+
ref: string;
|
|
60
|
+
vpId: string;
|
|
61
|
+
/** Dataset-row label when this variant is one `@cases` row. */
|
|
62
|
+
caseLabel?: string;
|
|
63
|
+
/** Human title (scenario name without the VP prefix; row label appended for @cases). */
|
|
64
|
+
title: string;
|
|
65
|
+
/** Viewpoint category from the VP prefix (LOGIC/VAL/UI/SEC/…). */
|
|
66
|
+
vpCategory: string;
|
|
67
|
+
priority: string;
|
|
68
|
+
/** 'auto' | 'manual'; manual keeps its @manual:Mx reason. */
|
|
69
|
+
mode: 'auto' | 'manual';
|
|
70
|
+
manualReason?: string;
|
|
71
|
+
layers: MatrixLayer[];
|
|
72
|
+
/** @spec:* requirement traces. */
|
|
73
|
+
traces: string[];
|
|
74
|
+
/** Condition summary: differentiating dimension shown on the sub-row. */
|
|
75
|
+
condition: string;
|
|
76
|
+
/** Resolved data pairs (test-data values / dataset-row columns), `key: value` lines. */
|
|
77
|
+
data: string[];
|
|
78
|
+
/** Normalized trigger shape (When steps, `{{var}}` collapsed) — signature input. */
|
|
79
|
+
triggerShape: string[];
|
|
80
|
+
/** Trigger for display (When steps, vars resolved). */
|
|
81
|
+
trigger: string[];
|
|
82
|
+
/** Normalized oracle shape (Then steps / manual Observable+Oracle) — signature input. */
|
|
83
|
+
oracleShape: string[];
|
|
84
|
+
/** Oracle for display. */
|
|
85
|
+
oracle: string[];
|
|
86
|
+
/** HOW to check (manual `Oracle:` lines — tools, panes, queries). Rendered as
|
|
87
|
+
* "Verification method" under the expected result, never inside it. */
|
|
88
|
+
verification: string[];
|
|
89
|
+
/** Precondition profile: auth role + scenario-level Given shapes — signature input. */
|
|
90
|
+
preconditionProfile: string;
|
|
91
|
+
/** Human preconditions (auth + own Given steps). */
|
|
92
|
+
precondition: string[];
|
|
93
|
+
/** 'simple' (G*W*T*) | 'sequence' (mid-flow Given / multi round-trip) | 'manual'. */
|
|
94
|
+
procedureProfile: 'simple' | 'sequence' | 'manual';
|
|
95
|
+
/** Canonical scenario fingerprint (drift detection). */
|
|
96
|
+
fingerprint: string;
|
|
97
|
+
/** Execution result, when the run report has one for this variant. */
|
|
98
|
+
result?: PlaywrightResult;
|
|
99
|
+
}
|
|
100
|
+
export type ItemResult = 'passed' | 'failed' | 'blocked' | 'partial' | 'not_run';
|
|
101
|
+
/** One summarized row in the matrix — a group of variants sharing the signature. */
|
|
102
|
+
export interface DeliveryItem {
|
|
103
|
+
id: string;
|
|
104
|
+
target: string;
|
|
105
|
+
intent: string;
|
|
106
|
+
oracle: string;
|
|
107
|
+
category: MapCategory;
|
|
108
|
+
review: ReviewState;
|
|
109
|
+
priority: string;
|
|
110
|
+
mode: 'auto' | 'manual';
|
|
111
|
+
layers: MatrixLayer[];
|
|
112
|
+
/** Union of variant traces (exact per-variant traces stay on the variants). */
|
|
113
|
+
traces: string[];
|
|
114
|
+
precondition: string[];
|
|
115
|
+
/** Common trigger when all variants share one shape, else '(per variant)'. */
|
|
116
|
+
trigger: string[];
|
|
117
|
+
variants: CoverageVariant[];
|
|
118
|
+
/** Derived roll-up — never entered independently (Gate F). */
|
|
119
|
+
result: ItemResult;
|
|
120
|
+
resultCounts: {
|
|
121
|
+
passed: number;
|
|
122
|
+
failed: number;
|
|
123
|
+
blocked: number;
|
|
124
|
+
notRun: number;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export interface MatrixDisposition {
|
|
128
|
+
vpId: string;
|
|
129
|
+
title: string;
|
|
130
|
+
as: DispositionKind;
|
|
131
|
+
reason: string;
|
|
132
|
+
}
|
|
133
|
+
/** One row of the requirement-coverage table (Coverage sheet). */
|
|
134
|
+
export interface RequirementCoverage {
|
|
135
|
+
id: string;
|
|
136
|
+
status: RequirementStatus;
|
|
137
|
+
/** Delivery items whose variants trace to this requirement. */
|
|
138
|
+
items: string[];
|
|
139
|
+
variantCount: number;
|
|
140
|
+
note: string;
|
|
141
|
+
}
|
|
142
|
+
export type GateId = 'A' | 'B' | 'C' | 'D' | 'E' | 'G' | 'R' | 'W';
|
|
143
|
+
export type FindingSeverity = 'error' | 'review' | 'warning';
|
|
144
|
+
export interface MatrixFinding {
|
|
145
|
+
gate: GateId;
|
|
146
|
+
severity: FindingSeverity;
|
|
147
|
+
/** Delivery item / VP-id the finding anchors to, when applicable. */
|
|
148
|
+
ref?: string;
|
|
149
|
+
message: string;
|
|
150
|
+
}
|
|
151
|
+
export interface MatrixManifest {
|
|
152
|
+
unit: string;
|
|
153
|
+
transformerVersion: string;
|
|
154
|
+
sourceFingerprint: string;
|
|
155
|
+
mapFingerprint: string;
|
|
156
|
+
approvalState: 'approved' | 'draft';
|
|
157
|
+
itemCount: number;
|
|
158
|
+
variantCount: number;
|
|
159
|
+
thresholds: {
|
|
160
|
+
maxVariantsPerItem: number;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface MatrixModel {
|
|
164
|
+
unit: string;
|
|
165
|
+
formNo: string;
|
|
166
|
+
items: DeliveryItem[];
|
|
167
|
+
dispositions: MatrixDisposition[];
|
|
168
|
+
/** Requirement coverage — empty when the unit has no requirements/spec.md ids. */
|
|
169
|
+
requirements: RequirementCoverage[];
|
|
170
|
+
findings: MatrixFinding[];
|
|
171
|
+
manifest: MatrixManifest;
|
|
172
|
+
}
|
|
173
|
+
/** Complexity warning threshold (rules draft Gate I) — echoed in the manifest. */
|
|
174
|
+
export declare const MAX_VARIANTS_PER_ITEM = 12;
|
|
175
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/exporters/matrix/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM5C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;AACrE,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAClD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,SAAS,GAAG,m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IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,UAAU,GAAG,OAAO,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE;QAAE,kBAAkB,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,kFAAkF;IAClF,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,KAAK,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Delivery v2 — Test Case & Coverage Matrix model (docs/spec/delivery-coverage-matrix-spec.md).
|
|
4
|
+
*
|
|
5
|
+
* Gherkin stays the source of test meaning; the matrix is a derived presentation:
|
|
6
|
+
* one delivery item = one target + one intent + one oracle family, containing one or
|
|
7
|
+
* more atomic coverage variants (scenario / @cases row). Grouping semantics live in the
|
|
8
|
+
* committed Delivery Map (`qa/<kind>/<unit>/delivery/<unit>.map.yaml`) — AI-proposed,
|
|
9
|
+
* gate-validated, QA-approved.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MAX_VARIANTS_PER_ITEM = void 0;
|
|
13
|
+
/** Complexity warning threshold (rules draft Gate I) — echoed in the manifest. */
|
|
14
|
+
exports.MAX_VARIANTS_PER_ITEM = 12;
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/exporters/matrix/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAgMH,kFAAkF;AACrE,QAAA,qBAAqB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wording normalization — deterministic rendering step AFTER semantic
|
|
3
|
+
* normalization (review feedback §10): turn sungen DSL steps into controlled
|
|
4
|
+
* manual-test English without changing the target, condition, trigger,
|
|
5
|
+
* precondition, oracle, or trace.
|
|
6
|
+
*
|
|
7
|
+
* - Actions render in the imperative: "User fill [Email] field with X"
|
|
8
|
+
* → "Enter X in the Email field."
|
|
9
|
+
* - Expected results render as observable assertions (never tester actions):
|
|
10
|
+
* "User see [Jobs] page" → "The Jobs page is displayed."
|
|
11
|
+
* - Manual `# Tester verifies:` labels (Setup:/Action:/Observable:/Oracle:)
|
|
12
|
+
* become structured fields instead of prose: Setup → precondition,
|
|
13
|
+
* Action → action, Observable → expected, Oracle → verification method.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Render one action step in the imperative. Pattern table covers the common
|
|
17
|
+
* sungen step verbs; anything unmatched falls back to actor-stripped text —
|
|
18
|
+
* still readable, never a raw `User fill`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function renderAction(raw: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Render one expected step as an observable assertion (no tester action, no
|
|
23
|
+
* `should`, no DSL `User see`).
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderExpected(raw: string): string;
|
|
26
|
+
/** Precondition wording: a state, not an action ("The user is signed out."). */
|
|
27
|
+
export declare function renderPrecondition(raw: string): string;
|
|
28
|
+
export interface ManualProcedure {
|
|
29
|
+
/** Setup/Precondition/Arrange lines — the state to establish first. */
|
|
30
|
+
preconditions: string[];
|
|
31
|
+
/** Action/unlabelled lines — the imperative procedure. */
|
|
32
|
+
actions: string[];
|
|
33
|
+
/** Observable/Expect/Result/Assert lines — the observable outcome. */
|
|
34
|
+
expected: string[];
|
|
35
|
+
/** Oracle/Verify lines — HOW to check (tools, panes, queries). */
|
|
36
|
+
verification: string[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Split a manual scenario's numbered comment lines into the four structured
|
|
40
|
+
* fields. Labels are consumed (structured), never left inside the prose —
|
|
41
|
+
* review feedback §10.2(3). Continuation lines append to the previous item;
|
|
42
|
+
* pre-amble (rationale/header/dividers) is skipped.
|
|
43
|
+
*/
|
|
44
|
+
export declare function classifyManualComments(comments: string[]): ManualProcedure;
|
|
45
|
+
//# sourceMappingURL=wording.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wording.d.ts","sourceRoot":"","sources":["../../../src/exporters/matrix/wording.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAeH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAkChD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAyBlD;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKtD;AAMD,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,kEAAkE;IAClE,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,eAAe,CA2B1E"}
|