@sun-asterisk/sungen 3.2.32 → 3.2.33
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 +1 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +10 -1
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +35 -17
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +39 -18
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +14 -7
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/results-merge.d.ts.map +1 -1
- package/dist/cli/commands/results-merge.js +2 -12
- package/dist/cli/commands/results-merge.js.map +1 -1
- package/dist/cli/commands/results-sanitize.d.ts.map +1 -1
- package/dist/cli/commands/results-sanitize.js +2 -13
- package/dist/cli/commands/results-sanitize.js.map +1 -1
- package/dist/dashboard/snapshot-builder.d.ts.map +1 -1
- package/dist/dashboard/snapshot-builder.js +6 -10
- package/dist/dashboard/snapshot-builder.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +21 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +32 -1
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/locale-variants.d.ts +7 -1
- package/dist/exporters/locale-variants.d.ts.map +1 -1
- package/dist/exporters/locale-variants.js +23 -16
- package/dist/exporters/locale-variants.js.map +1 -1
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +13 -7
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.d.ts +70 -0
- package/dist/exporters/matrix/carry-manual-results.d.ts.map +1 -0
- package/dist/exporters/matrix/carry-manual-results.js +232 -0
- package/dist/exporters/matrix/carry-manual-results.js.map +1 -0
- package/dist/exporters/matrix/export.d.ts +2 -0
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +7 -1
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/wording.d.ts +7 -0
- package/dist/exporters/matrix/wording.d.ts.map +1 -1
- package/dist/exporters/matrix/wording.js +27 -1
- package/dist/exporters/matrix/wording.js.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +2 -0
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +7 -2
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +2 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +8 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +7 -3
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +68 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/label-value-assertion.hbs +7 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +8 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +5 -1
- package/dist/generators/test-generator/code-generator.d.ts +2 -1
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +67 -3
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +33 -4
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +32 -3
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/index.d.ts +12 -2
- package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/index.js +15 -9
- package/dist/generators/test-generator/patterns/index.js.map +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts +15 -0
- package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/with-parent-scope.d.ts +5 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/with-parent-scope.js +6 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.js.map +1 -1
- package/dist/generators/test-generator/step-mapper.d.ts +46 -0
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +84 -9
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.d.ts +25 -0
- package/dist/generators/test-generator/utils/data-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.js +39 -8
- package/dist/generators/test-generator/utils/data-resolver.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-entry-fields.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-entry-fields.js +1 -0
- package/dist/generators/test-generator/utils/selector-entry-fields.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts +37 -4
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +212 -79
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +12 -4
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability.d.ts +7 -1
- package/dist/harness/capability.d.ts.map +1 -1
- package/dist/harness/capability.js +15 -12
- package/dist/harness/capability.js.map +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +5 -5
- package/dist/harness/config-file.d.ts +17 -0
- package/dist/harness/config-file.d.ts.map +1 -0
- package/dist/harness/config-file.js +100 -0
- package/dist/harness/config-file.js.map +1 -0
- package/dist/harness/depth-lint.d.ts.map +1 -1
- package/dist/harness/depth-lint.js +2 -1
- package/dist/harness/depth-lint.js.map +1 -1
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +6 -2
- package/dist/harness/flow-check.js.map +1 -1
- package/dist/harness/keyword-match.d.ts +59 -0
- package/dist/harness/keyword-match.d.ts.map +1 -0
- package/dist/harness/keyword-match.js +86 -0
- package/dist/harness/keyword-match.js.map +1 -0
- package/dist/harness/perf.d.ts +7 -1
- package/dist/harness/perf.d.ts.map +1 -1
- package/dist/harness/perf.js +13 -10
- package/dist/harness/perf.js.map +1 -1
- package/dist/harness/quality-gates.d.ts +9 -2
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +16 -4
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/query-catalog.js +0 -0
- package/dist/harness/query-catalog.js.map +1 -1
- package/dist/harness/read-text.d.ts +6 -0
- package/dist/harness/read-text.d.ts.map +1 -1
- package/dist/harness/read-text.js +7 -1
- package/dist/harness/read-text.js.map +1 -1
- package/dist/harness/secret-scan.d.ts +27 -1
- package/dist/harness/secret-scan.d.ts.map +1 -1
- package/dist/harness/secret-scan.js +57 -4
- package/dist/harness/secret-scan.js.map +1 -1
- package/dist/harness/sensors.d.ts +12 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +41 -18
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/spec-branches.d.ts +0 -18
- package/dist/harness/spec-branches.d.ts.map +1 -1
- package/dist/harness/spec-branches.js +23 -2
- package/dist/harness/spec-branches.js.map +1 -1
- package/dist/harness/spec-coverage.d.ts.map +1 -1
- package/dist/harness/spec-coverage.js +14 -4
- package/dist/harness/spec-coverage.js.map +1 -1
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +2 -1
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/harness/write-atomic.d.ts +2 -0
- package/dist/harness/write-atomic.d.ts.map +1 -0
- package/dist/harness/write-atomic.js +62 -0
- package/dist/harness/write-atomic.js.map +1 -0
- package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -1
- package/dist/orchestrator/ai-skills/writer.js +15 -7
- package/dist/orchestrator/ai-skills/writer.js.map +1 -1
- package/dist/orchestrator/assets-drift.d.ts.map +1 -1
- package/dist/orchestrator/assets-drift.js +11 -6
- package/dist/orchestrator/assets-drift.js.map +1 -1
- package/dist/orchestrator/project-deps-sync.d.ts.map +1 -1
- package/dist/orchestrator/project-deps-sync.js +22 -1
- package/dist/orchestrator/project-deps-sync.js.map +1 -1
- package/dist/orchestrator/project-initializer.d.ts +8 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +49 -7
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/security-overrides-catalog.d.ts +39 -0
- package/dist/orchestrator/security-overrides-catalog.d.ts.map +1 -0
- package/dist/orchestrator/security-overrides-catalog.js +63 -0
- package/dist/orchestrator/security-overrides-catalog.js.map +1 -0
- package/dist/orchestrator/security-overrides.d.ts +51 -0
- package/dist/orchestrator/security-overrides.d.ts.map +1 -0
- package/dist/orchestrator/security-overrides.js +165 -0
- package/dist/orchestrator/security-overrides.js.map +1 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +3 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +9 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +13 -1
- package/dist/orchestrator/templates/specs-locale-fixture.ts +21 -9
- package/dist/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/dist/orchestrator/templates/specs-url-assert.d.ts +17 -1
- package/dist/orchestrator/templates/specs-url-assert.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.js +14 -2
- package/dist/orchestrator/templates/specs-url-assert.js.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.ts +24 -2
- package/dist/orchestrator/templates/wdio.conf.ts +24 -1
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +10 -2
- package/src/cli/commands/capability.ts +51 -18
- package/src/cli/commands/delivery.ts +38 -16
- package/src/cli/commands/generate.ts +15 -7
- package/src/cli/commands/results-merge.ts +2 -8
- package/src/cli/commands/results-sanitize.ts +2 -9
- package/src/dashboard/snapshot-builder.ts +6 -8
- package/src/exporters/feature-parser.ts +32 -2
- package/src/exporters/locale-variants.ts +23 -17
- package/src/exporters/matrix/build.ts +14 -8
- package/src/exporters/matrix/carry-manual-results.ts +229 -0
- package/src/exporters/matrix/export.ts +10 -4
- package/src/exporters/matrix/wording.ts +26 -1
- package/src/exporters/xlsx-exporter.ts +7 -2
- package/src/generators/test-generator/adapters/adapter-interface.ts +2 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +2 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +8 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-with-role-variable-assertion.hbs +7 -3
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +68 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/label-value-assertion.hbs +7 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +8 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +5 -1
- package/src/generators/test-generator/code-generator.ts +54 -3
- package/src/generators/test-generator/diagnostics.ts +33 -4
- package/src/generators/test-generator/patterns/index.ts +15 -8
- package/src/generators/test-generator/patterns/types.ts +15 -0
- package/src/generators/test-generator/patterns/with-parent-scope.ts +6 -0
- package/src/generators/test-generator/step-mapper.ts +90 -8
- package/src/generators/test-generator/utils/data-resolver.ts +41 -12
- package/src/generators/test-generator/utils/selector-entry-fields.ts +1 -0
- package/src/generators/test-generator/utils/selector-resolver.ts +238 -82
- package/src/harness/audit.ts +17 -7
- package/src/harness/capability.ts +23 -12
- package/src/harness/catalog/universal-viewpoints.yaml +5 -5
- package/src/harness/config-file.ts +66 -0
- package/src/harness/depth-lint.ts +2 -1
- package/src/harness/flow-check.ts +6 -2
- package/src/harness/keyword-match.ts +85 -0
- package/src/harness/perf.ts +15 -7
- package/src/harness/quality-gates.ts +16 -4
- package/src/harness/query-catalog.ts +0 -0
- package/src/harness/read-text.ts +7 -1
- package/src/harness/secret-scan.ts +60 -4
- package/src/harness/sensors.ts +50 -19
- package/src/harness/spec-branches.ts +5 -2
- package/src/harness/spec-coverage.ts +14 -4
- package/src/harness/viewpoint-ledger.ts +2 -1
- package/src/harness/write-atomic.ts +22 -0
- package/src/orchestrator/ai-skills/writer.ts +18 -3
- package/src/orchestrator/assets-drift.ts +10 -5
- package/src/orchestrator/project-deps-sync.ts +23 -1
- package/src/orchestrator/project-initializer.ts +54 -6
- package/src/orchestrator/security-overrides-catalog.ts +69 -0
- package/src/orchestrator/security-overrides.ts +149 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +3 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +9 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +13 -1
- package/src/orchestrator/templates/specs-locale-fixture.ts +21 -9
- package/src/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/src/orchestrator/templates/specs-url-assert.ts +24 -2
- package/src/orchestrator/templates/wdio.conf.ts +24 -1
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.RUNTIME_CAPTURE = void 0;
|
|
18
18
|
exports.runtimeVarsOf = runtimeVarsOf;
|
|
19
|
+
exports.afterSubstitution = afterSubstitution;
|
|
19
20
|
exports.renderAction = renderAction;
|
|
20
21
|
exports.renderExpected = renderExpected;
|
|
21
22
|
exports.renderPrecondition = renderPrecondition;
|
|
@@ -49,8 +50,25 @@ function runtimeVarsOf(stepTexts, tags) {
|
|
|
49
50
|
return out;
|
|
50
51
|
}
|
|
51
52
|
// `[Email] field` → `Email field` (the visible label + its element type).
|
|
53
|
+
// Only the DSL's own refs: a `"quoted literal"` and a `{{token}}` are data, so their
|
|
54
|
+
// brackets stay (#772) — `"[DRAFT] report"`, `{{q.rows[0].id}}`. Callers render BEFORE
|
|
55
|
+
// substituting values, so a value's brackets (`^[A-Za-z]{3}`) never reach this.
|
|
56
|
+
// A literal opens only where a word does not end: in free text (manual procedures) `5"`
|
|
57
|
+
// is an inch mark, and two of them must not shield the `[Ref]` between them.
|
|
52
58
|
function deRef(text) {
|
|
53
|
-
return text.replace(
|
|
59
|
+
return text.replace(/(?<![\p{L}\p{N}])"[^"]*"|\{\{[^}]*\}\}|\[([^\]]+)\]/gu, (m, ref) => ref ?? m);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Finish a cell rendered with `{{tokens}}` still in it, once the values are substituted
|
|
63
|
+
* (#772: render first, substitute after, so deRef never sees a value). Keeps what
|
|
64
|
+
* `sentence()` did when values went in first: a leading value is capitalised, and a
|
|
65
|
+
* value that already ends a sentence does not gain a second mark (`value..`).
|
|
66
|
+
*/
|
|
67
|
+
function afterSubstitution(text) {
|
|
68
|
+
if (!text)
|
|
69
|
+
return text;
|
|
70
|
+
const s = text.charAt(0).toUpperCase() + text.slice(1);
|
|
71
|
+
return s.replace(/([.!?…"])\.$/, '$1');
|
|
54
72
|
}
|
|
55
73
|
function sentence(text) {
|
|
56
74
|
// Trim the ENDS only — internal whitespace may be the test data itself
|
|
@@ -123,7 +141,15 @@ function renderExpected(raw) {
|
|
|
123
141
|
if (exports.RUNTIME_CAPTURE.test(raw) && /\bas\s+\{\{/.test(raw))
|
|
124
142
|
return renderAction(raw);
|
|
125
143
|
let s = raw.trim().replace(/^(User|The user)\s+/i, '');
|
|
144
|
+
// `table match data:` rows (folded in by feature-parser, #771) are the EXPECTED VALUES —
|
|
145
|
+
// `[E2E-01] Q1` is data, not a ref — so only the table's own ref is de-ref'd (#772).
|
|
146
|
+
const md = s.match(/^sees? \[([^\]]+)\]\s*table match(?:es)? data: (.+)$/i);
|
|
147
|
+
if (md)
|
|
148
|
+
return sentence(`The ${md[1]} table shows these rows: ${md[2]}`);
|
|
126
149
|
const rules = [
|
|
150
|
+
// tab order: (#771) row 1 is the focused origin, each later row is one Tab press —
|
|
151
|
+
// its cells ARE refs, so they are de-ref'd like any step's.
|
|
152
|
+
[/^sees? tab order: (.+)$/i, (m) => `Pressing Tab moves focus in this order: ${m[1]}`],
|
|
127
153
|
// expect A is (not) B — comparing two captured values (order matters: "is not" first)
|
|
128
154
|
[/^expects? (.+?) is not (.+)$/i, (m) => `${m[1]} differs from ${m[2]}`],
|
|
129
155
|
[/^expects? (.+?) is (.+)$/i, (m) => `${m[1]} equals ${m[2]}`],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wording.js","sourceRoot":"","sources":["../../../src/exporters/matrix/wording.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAYH,sCAcC;
|
|
1
|
+
{"version":3,"file":"wording.js","sourceRoot":"","sources":["../../../src/exporters/matrix/wording.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAYH,sCAcC;AAkBD,8CAIC;AAkBD,oCAyCC;AAMD,wCA+CC;AAGD,gDAuBC;AAOD,wDAEC;AAuBD,wDA2BC;AAnPD,iFAAiF;AACpE,QAAA,eAAe,GAAG,eAAe,CAAC;AAE/C;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,SAAmB,EAAE,IAAc;IAC/D,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,uBAAe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AI,GAAG,GAAG,IAAI,CAAC;QACpC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -69,6 +69,8 @@ export declare function buildApiDetailRows(catalog: Record<string, ApiCatalogEnt
|
|
|
69
69
|
* used by the multi-locale delivery aggregator. Pass `null` / empty string
|
|
70
70
|
* to force the base (no suffix) variant.
|
|
71
71
|
*/
|
|
72
|
+
/** Where `writeXlsx` puts a unit's workbook — shared so a reader targets the identical file. */
|
|
73
|
+
export declare function deliverableXlsxPath(cwd: string, screen: string, locale?: string | null): string;
|
|
72
74
|
export declare function writeXlsx(cwd: string, screen: string, wb: ExcelJS.Workbook, locale?: string | null): Promise<string>;
|
|
73
75
|
/**
|
|
74
76
|
* Post-process the workbook buffer: extend `<a:picLocks>` on every drawing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xlsx-exporter.d.ts","sourceRoot":"","sources":["../../src/exporters/xlsx-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAQpF,OAAO,EAIL,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACzC,uDAAuD;IACvD,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,WAAW,EAAE,EACnB,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,gBAAgB,GAC3B,OAAO,CAAC,QAAQ,CAMlB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WA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heet;
|
|
55
55
|
exports.buildApiDetailRows = buildApiDetailRows;
|
|
56
|
+
exports.deliverableXlsxPath = deliverableXlsxPath;
|
|
56
57
|
exports.writeXlsx = writeXlsx;
|
|
57
58
|
exports.lockEmbeddedImages = lockEmbeddedImages;
|
|
58
59
|
const fs = __importStar(require("fs"));
|
|
@@ -96,11 +97,15 @@ function buildApiDetailRows(catalog, scenarios) {
|
|
|
96
97
|
* used by the multi-locale delivery aggregator. Pass `null` / empty string
|
|
97
98
|
* to force the base (no suffix) variant.
|
|
98
99
|
*/
|
|
100
|
+
/** Where `writeXlsx` puts a unit's workbook — shared so a reader targets the identical file. */
|
|
101
|
+
function deliverableXlsxPath(cwd, screen, locale) {
|
|
102
|
+
return path.join(cwd, 'qa', 'deliverables', `${(0, csv_exporter_1.deliverableBasename)(screen, locale)}.xlsx`);
|
|
103
|
+
}
|
|
99
104
|
async function writeXlsx(cwd, screen, wb, locale) {
|
|
100
|
-
const
|
|
105
|
+
const outPath = deliverableXlsxPath(cwd, screen, locale);
|
|
106
|
+
const outDir = path.dirname(outPath);
|
|
101
107
|
if (!fs.existsSync(outDir))
|
|
102
108
|
fs.mkdirSync(outDir, { recursive: true });
|
|
103
|
-
const outPath = path.join(outDir, `${(0, csv_exporter_1.deliverableBasename)(screen, locale)}.xlsx`);
|
|
104
109
|
const buffer = await wb.xlsx.writeBuffer();
|
|
105
110
|
const locked = await lockEmbeddedImages(Buffer.from(buffer));
|
|
106
111
|
fs.writeFileSync(outPath, locked);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xlsx-exporter.js","sourceRoot":"","sources":["../../src/exporters/xlsx-exporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,gCAWC;AAqBD,oDAEC;AAYD,gDASC;
|
|
1
|
+
{"version":3,"file":"xlsx-exporter.js","sourceRoot":"","sources":["../../src/exporters/xlsx-exporter.ts"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M,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC9D,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC;iBACjD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;iBACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;iBACvB,IAAI,CAAC,EAAE,CAAC,CAAC;YACZ,OAAO,cAAc,KAAK,GAAG,SAAS,IAAI,CAAC;QAC7C,CAAC,CACF,CAAC;QACF,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Persistence oracles (dismissals, pins) hinge on what survives a reinstall.
|
|
3
3
|
await (async () => {
|
|
4
4
|
const __pkg = __resolveAppId();
|
|
5
|
-
|
|
6
|
-
const __appPath =
|
|
5
|
+
// Same reader the reset tiers use — one place decides what "the session has a build file" means.
|
|
6
|
+
const __appPath = __appBuildPath();
|
|
7
7
|
if (!__appPath) {
|
|
8
8
|
throw new Error('reinstall the app: the session must install from a build file — set APP_APK (Android) / IOS_APP (iOS) so the appium:app capability is present.');
|
|
9
9
|
}
|
|
@@ -9,12 +9,18 @@
|
|
|
9
9
|
Flutter screen; UiSelector has no OR, hence the xpath. iOS scatters it across
|
|
10
10
|
label/value, which the predicate already ORs.
|
|
11
11
|
|
|
12
|
+
SCOPE (#747): an `in [Parent] <type>` clause chains this under the parent element. The android
|
|
13
|
+
xpath must go RELATIVE (`.//`) to do so — a child xpath beginning with `//` is ABSOLUTE in
|
|
14
|
+
Appium even when chained, so keeping it would emit code that LOOKS scoped and searches the whole
|
|
15
|
+
screen, which is the same silent widening the scope clause exists to prevent. The iOS predicate
|
|
16
|
+
carries no such trap and chains as written.
|
|
17
|
+
|
|
12
18
|
The expected value must stay a standalone quoted literal so the runtime-data transform
|
|
13
19
|
can swap it for testData.get(...). --}}
|
|
14
20
|
{
|
|
15
21
|
const __expected = String('{{escapeQuotes dataValue}}').trim();
|
|
16
22
|
const __sel = driver.isIOS
|
|
17
23
|
? `-ios predicate string:label == "${__expected}" OR value == "${__expected}"`
|
|
18
|
-
:
|
|
19
|
-
await expect($(__sel)).toBeDisplayed();
|
|
24
|
+
: `{{#if parentLocator}}.{{/if}}//*[@text="${__expected}" or @content-desc="${__expected}"]`;
|
|
25
|
+
await expect({{#if parentLocator}}{{parentLocator}}.$(__sel){{else}}$(__sel){{/if}}).toBeDisplayed();
|
|
20
26
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{{!-- Role variable, visible (mobile best-effort): ARIA role has no native-mobile analog — reuse
|
|
2
2
|
the role→accessibility-id mapping in appium-selector.hbs (`~name`) when a static name
|
|
3
3
|
exists; the resolver already folds dataValue into name when there is none, so this is only
|
|
4
|
-
the fallback for a caller that omits both.
|
|
4
|
+
the fallback for a caller that omits both.
|
|
5
|
+
|
|
6
|
+
SCOPE (#747): an `in [Parent] <type>` clause chains this under the parent element. Both
|
|
7
|
+
branches locate by accessibility id / predicate, neither of which carries the absolute-xpath
|
|
8
|
+
trap the label-value twin has to work around. --}}
|
|
5
9
|
{{#if name}}
|
|
6
|
-
await expect($('~{{escapeQuotes name}}')).toBeDisplayed();
|
|
10
|
+
await expect({{#if parentLocator}}{{parentLocator}}.$('~{{escapeQuotes name}}'){{else}}$('~{{escapeQuotes name}}'){{/if}}).toBeDisplayed();
|
|
7
11
|
{{else}}
|
|
8
12
|
{
|
|
9
13
|
const __expected = String('{{escapeQuotes dataValue}}').trim();
|
|
10
14
|
const __sel = driver.isIOS ? `-ios predicate string:label == "${__expected}" OR value == "${__expected}"` : `android=new UiSelector().text("${__expected}")`;
|
|
11
|
-
await expect($(__sel)).toBeDisplayed();
|
|
15
|
+
await expect({{#if parentLocator}}{{parentLocator}}.$(__sel){{else}}$(__sel){{/if}}).toBeDisplayed();
|
|
12
16
|
}
|
|
13
17
|
{{/if}}
|
|
@@ -502,9 +502,36 @@ describe('{{featureName}}', () => {
|
|
|
502
502
|
// lose the escalation between them — SG-W024 already reports that shape when tiers are involved.)
|
|
503
503
|
let __escalateAfter: string | null = null;
|
|
504
504
|
|
|
505
|
+
// `@known-defect` marks a scenario that is EXPECTED to be red — it asserts a live defect. The
|
|
506
|
+
// scaffolded /sungen:run-test command tells authors exactly that ("expected-red scenarios stay red;
|
|
507
|
+
// never 'fix' them"), so the ladder honours it here: such a failure is the suite working as
|
|
508
|
+
// designed, not evidence of leftover state. Arming escalation off it would make the NEXT scenario
|
|
509
|
+
// pay a harder reset for nothing — on every run, forever, because the defect is known.
|
|
510
|
+
//
|
|
511
|
+
// Read off the TITLE because `@known-defect` is a pass-through tag: appium appends it there as the
|
|
512
|
+
// `[@a @b]` suffix (which is what keeps it greppable via `--grep`), and that is how the field
|
|
513
|
+
// report shows it. Anchored to that trailing group, so a scenario merely NAMED `… known-defect …`
|
|
514
|
+
// cannot exempt itself — the same reason __tierFor refuses to strip a trailing `[Selector]` ref.
|
|
515
|
+
//
|
|
516
|
+
// Matched as a whole TAG TOKEN, never as a substring. `@known-defect-list` is a DIFFERENT tag, and
|
|
517
|
+
// reading it as this one would silently stop the next scenario's real dirty-state failure from
|
|
518
|
+
// getting the escalated reset it needs — with no log line at all, because "never armed" is not the
|
|
519
|
+
// "capped" path and prints nothing. The `:<ref>` parameter form is accepted because that is what
|
|
520
|
+
// the rest of the vocabulary does (`@manual:M10`, `@reset:data`).
|
|
521
|
+
//
|
|
522
|
+
// Caveat, inherited rather than introduced: a @cases scenario builds its title at runtime as
|
|
523
|
+
// `name — <row label>`, so a row LABEL that itself ends in `[@…]` would be read as the tag group.
|
|
524
|
+
// Same trailing-bracket ambiguity __tierFor accepts for a `[Selector]` ref.
|
|
525
|
+
function __isExpectedFail(title: string): boolean {
|
|
526
|
+
const tagGroup = title.match(/ \[@[^\]]*\]$/);
|
|
527
|
+
if (!tagGroup) return false;
|
|
528
|
+
return tagGroup[0].slice(2, -1).split(/\s+/)
|
|
529
|
+
.some((t) => t === '@known-defect' || t.startsWith('@known-defect:'));
|
|
530
|
+
}
|
|
531
|
+
|
|
505
532
|
// Registered BEFORE any user @afterEach block so a throwing user hook cannot skip the bookkeeping.
|
|
506
533
|
afterEach(async function () {
|
|
507
|
-
__escalateAfter = this.currentTest?.state === 'failed' ? (this.currentTest?.title ?? '') : null;
|
|
534
|
+
__escalateAfter = this.currentTest?.state === 'failed' && !__isExpectedFail(this.currentTest?.title ?? '') ? (this.currentTest?.title ?? '') : null;
|
|
508
535
|
});
|
|
509
536
|
|
|
510
537
|
{{#if scenarioResetTiers}}
|
|
@@ -583,9 +610,31 @@ describe('{{featureName}}', () => {
|
|
|
583
610
|
await driver.execute('mobile: clearApp', { appId: pkg });
|
|
584
611
|
}
|
|
585
612
|
|
|
586
|
-
|
|
613
|
+
/** The app's build file, when the session was given one. Absent when the app was attached BY PACKAGE. */
|
|
614
|
+
function __appBuildPath(): string | undefined {
|
|
587
615
|
const caps = (driver.requestedCapabilities || {}) as Record<string, string>;
|
|
588
|
-
|
|
616
|
+
return caps['appium:app'] || caps['app'];
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* The strongest tier THIS SESSION can actually carry out.
|
|
621
|
+
*
|
|
622
|
+
* Reinstalling needs the app's build file, and `data` on iOS IS a reinstall (no `mobile: clearApp`
|
|
623
|
+
* outside UiAutomator2). Attaching the app by package — the common local setup — leaves no build
|
|
624
|
+
* file, so those tiers cannot run at all.
|
|
625
|
+
*
|
|
626
|
+
* This exists so ESCALATION can cap itself. Escalation is a recovery the runner CHOSE; nothing
|
|
627
|
+
* asked for it. Escalating into a tier that throws turns one failed scenario into a dead spec file,
|
|
628
|
+
* because the throw lands in `beforeEach` and mocha then skips every remaining test in the file.
|
|
629
|
+
* A DECLARED tier is never capped — that is an unmet contract and must still throw by name.
|
|
630
|
+
*/
|
|
631
|
+
function __performableTier(): string {
|
|
632
|
+
if (__appBuildPath()) return 'full';
|
|
633
|
+
return driver.isIOS ? 'soft' : 'data';
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
async function __reinstallApp(pkg: string): Promise<void> {
|
|
637
|
+
const appPath = __appBuildPath();
|
|
589
638
|
if (!appPath) {
|
|
590
639
|
throw new Error(
|
|
591
640
|
`reset tier needs the app's build file to reinstall — set APP_APK (Android) / IOS_APP (iOS) so the appium:app capability is present, or drop to @reset:soft.`,
|
|
@@ -637,9 +686,24 @@ describe('{{featureName}}', () => {
|
|
|
637
686
|
// Same title ⟹ this is a retry of the scenario that just failed: keep its declared tier so a real
|
|
638
687
|
// failure fails both attempts (see __escalateAfter above).
|
|
639
688
|
const __escalate = __escalateAfter !== null && __escalateAfter !== (this.currentTest?.title ?? '');
|
|
640
|
-
|
|
689
|
+
// Escalation caps at what this session can perform, with the DECLARED tier as the FLOOR.
|
|
690
|
+
// The cap stops a tier NOBODY ASKED FOR from throwing in this hook and taking the rest of the
|
|
691
|
+
// spec file with it. The floor stops the cap from silently WEAKENING what the feature declared:
|
|
692
|
+
// a declared tier this session cannot perform still reaches __resetApp and still throws by name,
|
|
693
|
+
// because that one IS an unmet contract.
|
|
694
|
+
const __want = __escalate ? __ESCALATE[__base] : __base;
|
|
695
|
+
const __tier = __escalate
|
|
696
|
+
? __TIER_ORDER[Math.max(
|
|
697
|
+
__TIER_ORDER.indexOf(__base),
|
|
698
|
+
Math.min(__TIER_ORDER.indexOf(__want), __TIER_ORDER.indexOf(__performableTier())),
|
|
699
|
+
)]
|
|
700
|
+
: __want;
|
|
641
701
|
if (__tier !== __base) {
|
|
642
702
|
console.log(` \u2191 reset escalated ${__base} \u2192 ${__tier} (previous scenario failed: "${__escalateAfter}")`);
|
|
703
|
+
} else if (__want !== __base) {
|
|
704
|
+
// Said per occurrence, not once per run: this names the scenario that did NOT get the stronger
|
|
705
|
+
// reset it was owed, which is a fact about THIS scenario, not just about the session.
|
|
706
|
+
console.warn(` ! reset could not escalate ${__base} \u2192 ${__want} — this session has no app build file to reinstall from (the app was attached by package). Staying at ${__base}; set APP_APK (Android) / IOS_APP (iOS) to enable the stronger reset.`);
|
|
643
707
|
}
|
|
644
708
|
await __resetApp(__tier);
|
|
645
709
|
{{#if backgroundSteps}}
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
{{!-- Caption+value read: the ref names on-screen TEXT ("学科 -"), not an element, so the locator is
|
|
2
|
+
built inline from the caption rather than through the `locator` partial. That is why the scope
|
|
3
|
+
clause needs its own slot here — the partial's `parentLocator` handling never runs (#747).
|
|
4
|
+
Unscoped, `… in [Education Card 6] card` compiled away to nothing: on a screen repeating ten
|
|
5
|
+
学歴・職歴 cards the assertion strict-mode-failed where the caption repeats, and where it
|
|
6
|
+
happened to be unique elsewhere it passed having read a DIFFERENT card than the sentence names. --}}
|
|
7
|
+
await expect({{#if parentLocator}}{{parentLocator}}{{else}}page{{/if}}.getByText(/{{#if label}}{{escapeRegex label}}\s*{{else}}(?:^|\s){{/if}}{{escapeRegex dataValue}}$/)).toBeVisible();
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
{{!-- `getByRole` is built inline from role/name rather than through the `locator` partial, so the
|
|
2
|
+
scope clause needs its own slot here exactly as in label-value-assertion — the label branch's
|
|
3
|
+
twin (#747). `see [Logo] image with {{alt}} in [Product Card 3] card` searched every card on
|
|
4
|
+
the page before this. --}}
|
|
1
5
|
{{#if name}}
|
|
2
6
|
{{#if dataValue}}
|
|
3
|
-
await expect(page.getByRole('{{role}}', { name: '{{escapeQuotes name}}'{{#if exact}}, exact: true{{/if}} }).filter({ hasText: /^{{escapeRegex dataValue}}$/ }){{> locator-nth}}).toBeVisible();
|
|
7
|
+
await expect({{#if parentLocator}}{{parentLocator}}{{else}}page{{/if}}.getByRole('{{role}}', { name: '{{escapeQuotes name}}'{{#if exact}}, exact: true{{/if}} }).filter({ hasText: /^{{escapeRegex dataValue}}$/ }){{> locator-nth}}).toBeVisible();
|
|
4
8
|
{{else}}
|
|
5
|
-
await expect(page.getByRole('{{role}}', { name: '{{escapeQuotes name}}'{{#if exact}}, exact: true{{/if}} }){{> locator-nth}}).toBeVisible();
|
|
9
|
+
await expect({{#if parentLocator}}{{parentLocator}}{{else}}page{{/if}}.getByRole('{{role}}', { name: '{{escapeQuotes name}}'{{#if exact}}, exact: true{{/if}} }){{> locator-nth}}).toBeVisible();
|
|
6
10
|
{{/if}}
|
|
7
11
|
{{else}}
|
|
8
|
-
await expect(page.getByRole('{{role}}'{{#if exact}}, { exact: true }{{/if}}).filter({ hasText: /^{{escapeRegex dataValue}}$/ }){{> locator-nth}}).toBeVisible();
|
|
9
|
-
{{/if}}
|
|
12
|
+
await expect({{#if parentLocator}}{{parentLocator}}{{else}}page{{/if}}.getByRole('{{role}}'{{#if exact}}, { exact: true }{{/if}}).filter({ hasText: /^{{escapeRegex dataValue}}$/ }){{> locator-nth}}).toBeVisible();
|
|
13
|
+
{{/if}}
|
|
@@ -23,8 +23,12 @@
|
|
|
23
23
|
`https://admin.example.com/jobs` asserted the PATH on any host, and the public site's /jobs
|
|
24
24
|
satisfied it.
|
|
25
25
|
|
|
26
|
+
`ignoreQuery` comes from the page ENTRY's `query: any`, not from the step, because it is a fact
|
|
27
|
+
about the page rather than about one assertion (#748). It relaxes only the bare-page rule; the
|
|
28
|
+
declared-value half below is untouched, so the two compose rather than override each other.
|
|
29
|
+
|
|
26
30
|
The declared-value half is gated on `dataRef`, not on `query`. The step wrote `with {{v}}`
|
|
27
31
|
either way; gating on the resolved VALUE meant an empty test-data entry silently dropped the
|
|
28
32
|
whole check and fell back to the bare-page rule, which is the one case specs/url-assert.ts
|
|
29
33
|
exists to throw on. --}}
|
|
30
|
-
await expectPage(page, { pathname: /^{{pathRegex}}\/?$/{{#if hostRegex}}, hostname: /^{{hostRegex}}$/{{/if}}{{#if dataRef}}, dataRef: '{{escapeQuotes dataRef}}', declared: '{{escapeQuotes query}}'{{/if}} });
|
|
34
|
+
await expectPage(page, { pathname: /^{{pathRegex}}\/?$/{{#if hostRegex}}, hostname: /^{{hostRegex}}$/{{/if}}{{#if ignoreQuery}}, ignoreQuery: true{{/if}}{{#if dataRef}}, dataRef: '{{escapeQuotes dataRef}}', declared: '{{escapeQuotes query}}'{{/if}} });
|
|
@@ -139,7 +139,8 @@ export declare class CodeGenerator {
|
|
|
139
139
|
* a name in the committed .env.qa.example. An undeclared ref means the test throws
|
|
140
140
|
* "environment variable not set" the moment the key is used — surface it at compile
|
|
141
141
|
* time instead. Only the `${QA_*}` shape is checked: any other `${...}` text is
|
|
142
|
-
* ordinary literal data by design (never resolved, never warned about).
|
|
142
|
+
* ordinary literal data by design (never resolved, never warned about). A `${QA_*}`
|
|
143
|
+
* that appears only inside a `#` comment is prose, not a reference, and is ignored.
|
|
143
144
|
*/
|
|
144
145
|
private reportedEnvRefs;
|
|
145
146
|
private checkEnvSecretRefs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-generator.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/code-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAA8B,MAAM,mBAAmB,CAAC;AAI9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"code-generator.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/code-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAA8B,MAAM,mBAAmB,CAAC;AAI9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAwTrD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,W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AgBG;YACW,YAAY;IA+C1B;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IAShC;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAgC3B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,wBAA+B;YAEnC,gBAAgB;IA6H9B;;OAEG;IACH,OAAO,CAAC,UAAU;IAKlB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;OAEG;IACH;;;;;;;;OAQG;IACH,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,kBAAkB;IAyBpB,gBAAgB,CACpB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,aAAa,EAAE,CAAC;CA+D5B"}
|
|
@@ -193,7 +193,7 @@ function getAuthMode(scenarioTags, featureTags) {
|
|
|
193
193
|
* Grouping key for the anonymous bucket. A literal that no `@auth:<role>` can produce, so an
|
|
194
194
|
* imaginative role name can never land in the same group as `@no-auth`.
|
|
195
195
|
*/
|
|
196
|
-
const NO_AUTH_GROUP_KEY = '
|
|
196
|
+
const NO_AUTH_GROUP_KEY = '\0no-auth';
|
|
197
197
|
/**
|
|
198
198
|
* True when the scenario has at least one step in the Then bucket —
|
|
199
199
|
* And/But inherit the preceding primary keyword (Given/When/Then).
|
|
@@ -243,6 +243,69 @@ function warnMultipleAuthTags(tags, context) {
|
|
|
243
243
|
` Ignoring: ${authTags.slice(1).join(', ')}`);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Drop the YAML comment from ONE line: a `#` at line start or preceded by whitespace,
|
|
248
|
+
* and not inside a quoted scalar. Line-level only — see `yamlWithoutComments` for the
|
|
249
|
+
* block-scalar case, which this function cannot see from a single line.
|
|
250
|
+
*/
|
|
251
|
+
function stripYamlComment(line) {
|
|
252
|
+
let quote = null;
|
|
253
|
+
for (let i = 0; i < line.length; i++) {
|
|
254
|
+
const c = line[i];
|
|
255
|
+
if (quote) {
|
|
256
|
+
if (quote === '"' && c === '\\') {
|
|
257
|
+
i++;
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
if (c === quote)
|
|
261
|
+
quote = null;
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
if (c === '"' || c === "'") {
|
|
265
|
+
quote = c;
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (c === '#' && (i === 0 || /\s/.test(line[i - 1])))
|
|
269
|
+
return line.slice(0, i);
|
|
270
|
+
}
|
|
271
|
+
return line;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* The YAML text a `${QA_*}` scan may look at: comments removed, block scalars kept whole.
|
|
275
|
+
*
|
|
276
|
+
* SG-W009's reference scan used to run over the whole raw file, so a `${QA_*}` that only ever
|
|
277
|
+
* appeared in a `#` comment counted as a live reference — including the one sungen's own
|
|
278
|
+
* scaffolded "HOW TO FILL VALUES" block writes into every test-data file. The declared side has
|
|
279
|
+
* always been line-wise; this brings the reference side to the same footing.
|
|
280
|
+
*
|
|
281
|
+
* Inside a `|`/`>` block scalar every character is literal content, `#` included, so those lines
|
|
282
|
+
* pass through untouched. Stripping them would send the check the other way — a real, undeclared
|
|
283
|
+
* `${QA_*}` written after a `#` in a block scalar would go unreported, and the run would only fail
|
|
284
|
+
* later with "environment variable not set". A missed warning is worse than a noisy one.
|
|
285
|
+
*/
|
|
286
|
+
function yamlWithoutComments(text) {
|
|
287
|
+
const out = [];
|
|
288
|
+
let blockIndent = null;
|
|
289
|
+
for (const line of text.split('\n')) {
|
|
290
|
+
if (blockIndent !== null) {
|
|
291
|
+
const indent = line.search(/\S/);
|
|
292
|
+
// blank lines and anything indented deeper than the key stay inside the scalar
|
|
293
|
+
if (indent === -1 || indent > blockIndent) {
|
|
294
|
+
out.push(line);
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
blockIndent = null;
|
|
298
|
+
}
|
|
299
|
+
const block = /^(\s*)[^#\s][^:]*:\s*[|>][+-]?\d*[+-]?\s*$/.exec(line);
|
|
300
|
+
if (block) {
|
|
301
|
+
blockIndent = block[1].length;
|
|
302
|
+
out.push(line);
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
out.push(stripYamlComment(line));
|
|
306
|
+
}
|
|
307
|
+
return out.join('\n');
|
|
308
|
+
}
|
|
246
309
|
class CodeGenerator {
|
|
247
310
|
constructor(options = {}) {
|
|
248
311
|
// Screen/flow name for the CURRENT feature, in catalog-resolution form (`flows/<x>` for flows).
|
|
@@ -265,7 +328,8 @@ class CodeGenerator {
|
|
|
265
328
|
* a name in the committed .env.qa.example. An undeclared ref means the test throws
|
|
266
329
|
* "environment variable not set" the moment the key is used — surface it at compile
|
|
267
330
|
* time instead. Only the `${QA_*}` shape is checked: any other `${...}` text is
|
|
268
|
-
* ordinary literal data by design (never resolved, never warned about).
|
|
331
|
+
* ordinary literal data by design (never resolved, never warned about). A `${QA_*}`
|
|
332
|
+
* that appears only inside a `#` comment is prose, not a reference, and is ignored.
|
|
269
333
|
*/
|
|
270
334
|
this.reportedEnvRefs = new Set();
|
|
271
335
|
this.options = options;
|
|
@@ -1184,7 +1248,7 @@ class CodeGenerator {
|
|
|
1184
1248
|
return;
|
|
1185
1249
|
const referenced = new Set();
|
|
1186
1250
|
for (const f of fs_1.default.readdirSync(testDataDir).filter((x) => x.endsWith('.yaml') || x.endsWith('.yml'))) {
|
|
1187
|
-
const text = fs_1.default.readFileSync(path_1.default.join(testDataDir, f), 'utf-8');
|
|
1251
|
+
const text = yamlWithoutComments(fs_1.default.readFileSync(path_1.default.join(testDataDir, f), 'utf-8'));
|
|
1188
1252
|
for (const m of text.matchAll(/\$\{(QA_[A-Z0-9_]+)\}/g))
|
|
1189
1253
|
referenced.add(m[1]);
|
|
1190
1254
|
}
|