@sun-asterisk/sungen 3.2.32 → 3.2.34-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/audit.d.ts +5 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +64 -11
- 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 +40 -18
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/changed.d.ts.map +1 -1
- package/dist/cli/commands/changed.js +2 -3
- package/dist/cli/commands/changed.js.map +1 -1
- package/dist/cli/commands/dashboard.d.ts.map +1 -1
- package/dist/cli/commands/dashboard.js +2 -28
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/commands/defect.d.ts +7 -0
- package/dist/cli/commands/defect.d.ts.map +1 -0
- package/dist/cli/commands/defect.js +68 -0
- package/dist/cli/commands/defect.js.map +1 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +113 -59
- 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 +9 -0
- package/dist/cli/commands/results-merge.d.ts.map +1 -1
- package/dist/cli/commands/results-merge.js +9 -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/cli/commands/select.d.ts +12 -0
- package/dist/cli/commands/select.d.ts.map +1 -0
- package/dist/cli/commands/select.js +122 -0
- package/dist/cli/commands/select.js.map +1 -0
- package/dist/cli/commands/triage.d.ts +7 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +98 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +3 -0
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/viewpoint.d.ts +7 -0
- package/dist/cli/commands/viewpoint.d.ts.map +1 -0
- package/dist/cli/commands/viewpoint.js +70 -0
- package/dist/cli/commands/viewpoint.js.map +1 -0
- package/dist/cli/index.js +13 -2
- package/dist/cli/index.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/dashboard/templates/index.html +1 -1
- package/dist/dashboard/types.d.ts +1 -0
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.d.ts +4 -0
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +12 -11
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +29 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +44 -1
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/json-exporter.d.ts.map +1 -1
- package/dist/exporters/json-exporter.js +7 -0
- package/dist/exporters/json-exporter.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/manual-hybrid-oracle.d.ts +54 -0
- package/dist/exporters/manual-hybrid-oracle.d.ts.map +1 -0
- package/dist/exporters/manual-hybrid-oracle.js +114 -0
- package/dist/exporters/manual-hybrid-oracle.js.map +1 -0
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +68 -19
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.d.ts +89 -0
- package/dist/exporters/matrix/carry-manual-results.d.ts.map +1 -0
- package/dist/exporters/matrix/carry-manual-results.js +302 -0
- package/dist/exporters/matrix/carry-manual-results.js.map +1 -0
- package/dist/exporters/matrix/export.d.ts +9 -1
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +21 -3
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/gates.js +6 -0
- package/dist/exporters/matrix/gates.js.map +1 -1
- package/dist/exporters/matrix/render-csv.js +1 -1
- package/dist/exporters/matrix/render-csv.js.map +1 -1
- package/dist/exporters/matrix/render-testcase-sheet.d.ts.map +1 -1
- package/dist/exporters/matrix/render-testcase-sheet.js +10 -4
- package/dist/exporters/matrix/render-testcase-sheet.js.map +1 -1
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
- package/dist/exporters/matrix/render-xlsx.js +3 -0
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +13 -1
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/matrix/wording.d.ts +8 -1
- package/dist/exporters/matrix/wording.d.ts.map +1 -1
- package/dist/exporters/matrix/wording.js +37 -2
- package/dist/exporters/matrix/wording.js.map +1 -1
- package/dist/exporters/playwright-report-parser.d.ts.map +1 -1
- package/dist/exporters/playwright-report-parser.js +1 -0
- package/dist/exporters/playwright-report-parser.js.map +1 -1
- package/dist/exporters/run-environment.d.ts +32 -0
- package/dist/exporters/run-environment.d.ts.map +1 -0
- package/dist/exporters/run-environment.js +125 -0
- package/dist/exporters/run-environment.js.map +1 -0
- package/dist/exporters/scenario-merger.d.ts +18 -0
- package/dist/exporters/scenario-merger.d.ts.map +1 -1
- package/dist/exporters/scenario-merger.js +49 -3
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/test-data-resolver.d.ts +0 -4
- package/dist/exporters/test-data-resolver.d.ts.map +1 -1
- package/dist/exporters/test-data-resolver.js +0 -7
- package/dist/exporters/test-data-resolver.js.map +1 -1
- package/dist/exporters/types.d.ts +5 -0
- package/dist/exporters/types.d.ts.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/gherkin-parser/index.d.ts +11 -4
- package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
- package/dist/generators/gherkin-parser/index.js +49 -19
- package/dist/generators/gherkin-parser/index.js.map +1 -1
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts +4 -0
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts.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/actions/click-select-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/select-action.hbs +1 -1
- 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/pick-option.hbs +13 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +5 -1
- package/dist/generators/test-generator/adapters/playwright/templates/test-file.hbs +16 -0
- 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 +90 -5
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +36 -5
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +35 -4
- 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 +3 -0
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +60 -19
- 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/counted-assertions.d.ts +2 -0
- package/dist/harness/counted-assertions.d.ts.map +1 -0
- package/dist/harness/counted-assertions.js +38 -0
- package/dist/harness/counted-assertions.js.map +1 -0
- package/dist/harness/data-driven-lint.d.ts.map +1 -1
- package/dist/harness/data-driven-lint.js +69 -27
- package/dist/harness/data-driven-lint.js.map +1 -1
- package/dist/harness/defect-draft.d.ts +14 -0
- package/dist/harness/defect-draft.d.ts.map +1 -0
- package/dist/harness/defect-draft.js +143 -0
- package/dist/harness/defect-draft.js.map +1 -0
- package/dist/harness/defects.d.ts +24 -0
- package/dist/harness/defects.d.ts.map +1 -0
- package/dist/harness/defects.js +118 -0
- package/dist/harness/defects.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/manifest.d.ts.map +1 -1
- package/dist/harness/manifest.js +2 -2
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/next-step.d.ts +2 -4
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +50 -5
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts +45 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +142 -24
- package/dist/harness/parse.js.map +1 -1
- 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 +22 -8
- 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 +21 -0
- package/dist/harness/read-text.d.ts.map +1 -1
- package/dist/harness/read-text.js +32 -1
- package/dist/harness/read-text.js.map +1 -1
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +7 -1
- package/dist/harness/script-check.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/select-by-ids.d.ts +31 -0
- package/dist/harness/select-by-ids.d.ts.map +1 -0
- package/dist/harness/select-by-ids.js +106 -0
- package/dist/harness/select-by-ids.js.map +1 -0
- package/dist/harness/sensors.d.ts +20 -1
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +133 -39
- 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 +24 -3
- 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/triage-signals.d.ts +20 -0
- package/dist/harness/triage-signals.d.ts.map +1 -0
- package/dist/harness/triage-signals.js +30 -0
- package/dist/harness/triage-signals.js.map +1 -0
- package/dist/harness/triage-unit.d.ts +23 -0
- package/dist/harness/triage-unit.d.ts.map +1 -0
- package/dist/harness/triage-unit.js +142 -0
- package/dist/harness/triage-unit.js.map +1 -0
- package/dist/harness/triage.d.ts +28 -0
- package/dist/harness/triage.d.ts.map +1 -0
- package/dist/harness/triage.js +99 -0
- package/dist/harness/triage.js.map +1 -0
- package/dist/harness/ui-inventory.d.ts +40 -0
- package/dist/harness/ui-inventory.d.ts.map +1 -0
- package/dist/harness/ui-inventory.js +191 -0
- package/dist/harness/ui-inventory.js.map +1 -0
- package/dist/harness/viewpoint-baseline.d.ts.map +1 -1
- package/dist/harness/viewpoint-baseline.js +7 -1
- package/dist/harness/viewpoint-baseline.js.map +1 -1
- package/dist/harness/viewpoint-draft-header.d.ts +7 -0
- package/dist/harness/viewpoint-draft-header.d.ts.map +1 -0
- package/dist/harness/viewpoint-draft-header.js +100 -0
- package/dist/harness/viewpoint-draft-header.js.map +1 -0
- package/dist/harness/viewpoint-ledger.d.ts +13 -3
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +106 -19
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/harness/viewpoint-mode.d.ts +9 -0
- package/dist/harness/viewpoint-mode.d.ts.map +1 -0
- package/dist/harness/viewpoint-mode.js +52 -0
- package/dist/harness/viewpoint-mode.js.map +1 -0
- package/dist/harness/viewpoint-priority.d.ts +19 -0
- package/dist/harness/viewpoint-priority.d.ts.map +1 -0
- package/dist/harness/viewpoint-priority.js +36 -0
- package/dist/harness/viewpoint-priority.js.map +1 -0
- package/dist/harness/viewpoint-review-open.d.ts +6 -0
- package/dist/harness/viewpoint-review-open.d.ts.map +1 -0
- package/dist/harness/viewpoint-review-open.js +90 -0
- package/dist/harness/viewpoint-review-open.js.map +1 -0
- package/dist/harness/viewpoint-scan-refs.d.ts +50 -0
- package/dist/harness/viewpoint-scan-refs.d.ts.map +1 -0
- package/dist/harness/viewpoint-scan-refs.js +200 -0
- package/dist/harness/viewpoint-scan-refs.js.map +1 -0
- package/dist/harness/viewpoint-scan.d.ts +41 -0
- package/dist/harness/viewpoint-scan.d.ts.map +1 -0
- package/dist/harness/viewpoint-scan.js +118 -0
- package/dist/harness/viewpoint-scan.js.map +1 -0
- 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/flow-manager.d.ts +0 -1
- package/dist/orchestrator/flow-manager.d.ts.map +1 -1
- package/dist/orchestrator/flow-manager.js +3 -52
- package/dist/orchestrator/flow-manager.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/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +8 -62
- package/dist/orchestrator/screen-manager.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/agents/discovery.md +11 -3
- package/dist/orchestrator/templates/ai-src/agents/reviewer.md +8 -0
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +32 -24
- package/dist/orchestrator/templates/ai-src/commands/review.md +2 -2
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +78 -15
- package/dist/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md +2 -2
- 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 +25 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +26 -8
- package/dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +5 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +58 -14
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +13 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +42 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +7 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +18 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/review-checklist.md +63 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/viewpoint-template.md +158 -0
- package/dist/orchestrator/templates/playwright.config.ts +4 -2
- 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 +38 -4
- package/dist/orchestrator/templates/specs-url-assert.js.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.ts +47 -4
- package/dist/orchestrator/templates/wdio.conf.ts +24 -1
- package/dist/orchestrator/trace-mode-install.d.ts +14 -0
- package/dist/orchestrator/trace-mode-install.d.ts.map +1 -0
- package/dist/orchestrator/trace-mode-install.js +132 -0
- package/dist/orchestrator/trace-mode-install.js.map +1 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.d.ts +23 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.d.ts.map +1 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.js +48 -0
- package/dist/orchestrator/viewpoint-pattern-catalog.js.map +1 -0
- package/dist/orchestrator/viewpoint-scaffold.d.ts +3 -0
- package/dist/orchestrator/viewpoint-scaffold.d.ts.map +1 -0
- package/dist/orchestrator/viewpoint-scaffold.js +70 -0
- package/dist/orchestrator/viewpoint-scaffold.js.map +1 -0
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +59 -12
- package/src/cli/commands/capability.ts +54 -19
- package/src/cli/commands/changed.ts +2 -4
- package/src/cli/commands/dashboard.ts +1 -26
- package/src/cli/commands/defect.ts +49 -0
- package/src/cli/commands/delivery.ts +106 -56
- package/src/cli/commands/generate.ts +15 -7
- package/src/cli/commands/results-merge.ts +9 -9
- package/src/cli/commands/results-sanitize.ts +2 -9
- package/src/cli/commands/select.ts +88 -0
- package/src/cli/commands/triage.ts +57 -0
- package/src/cli/commands/update.ts +3 -0
- package/src/cli/commands/viewpoint.ts +58 -0
- package/src/cli/index.ts +13 -2
- package/src/dashboard/snapshot-builder.ts +6 -8
- package/src/dashboard/templates/index.html +1 -1
- package/src/dashboard/types.ts +1 -0
- package/src/exporters/csv-exporter.ts +12 -11
- package/src/exporters/feature-parser.ts +44 -2
- package/src/exporters/json-exporter.ts +6 -1
- package/src/exporters/locale-variants.ts +23 -17
- package/src/exporters/manual-hybrid-oracle.ts +112 -0
- package/src/exporters/matrix/build.ts +71 -19
- package/src/exporters/matrix/carry-manual-results.ts +292 -0
- package/src/exporters/matrix/export.ts +24 -4
- package/src/exporters/matrix/gates.ts +6 -0
- package/src/exporters/matrix/render-csv.ts +1 -1
- package/src/exporters/matrix/render-testcase-sheet.ts +10 -4
- package/src/exporters/matrix/render-xlsx.ts +3 -0
- package/src/exporters/matrix/types.ts +13 -1
- package/src/exporters/matrix/wording.ts +36 -2
- package/src/exporters/playwright-report-parser.ts +1 -0
- package/src/exporters/run-environment.ts +89 -0
- package/src/exporters/scenario-merger.ts +51 -5
- package/src/exporters/test-data-resolver.ts +0 -6
- package/src/exporters/types.ts +5 -0
- package/src/exporters/xlsx-exporter.ts +7 -2
- package/src/generators/gherkin-parser/index.ts +50 -18
- package/src/generators/test-generator/adapters/adapter-interface.ts +6 -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/actions/click-select-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/select-action.hbs +1 -1
- 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/pick-option.hbs +13 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +5 -1
- package/src/generators/test-generator/adapters/playwright/templates/test-file.hbs +16 -0
- package/src/generators/test-generator/code-generator.ts +77 -5
- package/src/generators/test-generator/diagnostics.ts +36 -5
- 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 +69 -24
- 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/counted-assertions.ts +33 -0
- package/src/harness/data-driven-lint.ts +82 -24
- package/src/harness/defect-draft.ts +115 -0
- package/src/harness/defects.ts +94 -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/manifest.ts +2 -2
- package/src/harness/next-step.ts +47 -5
- package/src/harness/parse.ts +151 -27
- package/src/harness/perf.ts +15 -7
- package/src/harness/quality-gates.ts +22 -8
- package/src/harness/query-catalog.ts +0 -0
- package/src/harness/read-text.ts +32 -1
- package/src/harness/script-check.ts +7 -1
- package/src/harness/secret-scan.ts +60 -4
- package/src/harness/select-by-ids.ts +83 -0
- package/src/harness/sensors.ts +141 -40
- package/src/harness/spec-branches.ts +6 -3
- package/src/harness/spec-coverage.ts +14 -4
- package/src/harness/triage-signals.ts +46 -0
- package/src/harness/triage-unit.ts +113 -0
- package/src/harness/triage.ts +127 -0
- package/src/harness/ui-inventory.ts +164 -0
- package/src/harness/viewpoint-baseline.ts +7 -1
- package/src/harness/viewpoint-draft-header.ts +55 -0
- package/src/harness/viewpoint-ledger.ts +113 -25
- package/src/harness/viewpoint-mode.ts +49 -0
- package/src/harness/viewpoint-priority.ts +38 -0
- package/src/harness/viewpoint-review-open.ts +51 -0
- package/src/harness/viewpoint-scan-refs.ts +154 -0
- package/src/harness/viewpoint-scan.ts +111 -0
- 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/flow-manager.ts +3 -53
- package/src/orchestrator/project-deps-sync.ts +23 -1
- package/src/orchestrator/project-initializer.ts +54 -6
- package/src/orchestrator/screen-manager.ts +7 -61
- package/src/orchestrator/security-overrides-catalog.ts +69 -0
- package/src/orchestrator/security-overrides.ts +149 -0
- package/src/orchestrator/templates/ai-src/agents/discovery.md +11 -3
- package/src/orchestrator/templates/ai-src/agents/reviewer.md +8 -0
- package/src/orchestrator/templates/ai-src/commands/create-test.md +32 -24
- package/src/orchestrator/templates/ai-src/commands/review.md +2 -2
- package/src/orchestrator/templates/ai-src/commands/run-test.md +78 -15
- package/src/orchestrator/templates/ai-src/skills/sungen-capture/mode-local.md +2 -2
- 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 +25 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +26 -8
- package/src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +5 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +58 -14
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +13 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +42 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +7 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +18 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/review-checklist.md +63 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/viewpoint-template.md +158 -0
- package/src/orchestrator/templates/playwright.config.ts +4 -2
- 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 +47 -4
- package/src/orchestrator/templates/wdio.conf.ts +24 -1
- package/src/orchestrator/trace-mode-install.ts +94 -0
- package/src/orchestrator/viewpoint-pattern-catalog.ts +61 -0
- package/src/orchestrator/viewpoint-scaffold.ts +36 -0
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
* SG-W008 — @manual scenario is incomplete in either direction: Gherkin steps without a
|
|
25
25
|
* Then (invalid Gherkin; comments cannot substitute), or a documentation-style
|
|
26
26
|
* manual (no steps) whose comments lack the extractable procedure — ≥1 numbered
|
|
27
|
-
* action line + ≥1 labeled Observable:/Oracle:/Expected: line
|
|
27
|
+
* action line + ≥1 labeled Observable:/Oracle:/Expected: line — or a Then that
|
|
28
|
+
* asserts only presence while the real oracle sits in a `# Tester verifies:`
|
|
29
|
+
* comment (#810)
|
|
28
30
|
* SG-W009 — test-data references a `${QA_*}` secret that is declared in neither .env.qa
|
|
29
31
|
* nor .env.qa.example — the test will throw "not set" the moment the key is used
|
|
30
32
|
* SG-W010 — a row step's [Ref] looks POSITIONAL (First/Last/Top/…) but has no selectors.yaml
|
|
@@ -186,12 +188,29 @@
|
|
|
186
188
|
* build names itself at generate time instead of one step further downstream
|
|
187
189
|
*
|
|
188
190
|
* SG-W028 — a step's trailing scope clause was DROPPED, so the step runs against more of the page
|
|
189
|
-
* than its sentence names.
|
|
191
|
+
* than its sentence names. Three causes, one code: the `<word>` after `in [X]` is not a
|
|
190
192
|
* container type (a typo, or a leaf element used as a parent), or the by-content form
|
|
191
193
|
* `in [X] <type> with {{v}}` was written for the mobile adapter, which chains a parent
|
|
192
194
|
* element and has no content filter. Before this, both compiled clean and silently
|
|
193
195
|
* widened the assertion to the whole screen — the failure mode that only a diff of the
|
|
194
|
-
* generated spec against the Gherkin could reveal (#667)
|
|
196
|
+
* generated spec against the Gherkin could reveal (#667).
|
|
197
|
+
* The third is the RENDER-time half #667 could not reach: the clause parsed and the
|
|
198
|
+
* container resolved, but the step form that won the sentence emits a locator built
|
|
199
|
+
* inline and never applies it. Judged on the emitted code — every path that honours a
|
|
200
|
+
* scope emits the resolved container locator verbatim, so its absence IS the drop —
|
|
201
|
+
* which makes the check total rather than a list of templates to keep in sync. Found
|
|
202
|
+
* via `see [学科] label with {{v}} in [Education Card 6] card` compiling to a page-wide
|
|
203
|
+
* `getByText` on a screen repeating ten identical cards (#747)
|
|
204
|
+
* SG-W037 — a `type: page` entry says something about the QUERY that the compiler cannot use.
|
|
205
|
+
* Two causes, one code, and the same root confusion behind both: a bare `see [X] page`
|
|
206
|
+
* asserts the URL carries NO query (#464), which is unsatisfiable for a page keyed by
|
|
207
|
+
* one (`/admins/detail?id=5`, where the id comes from the row just clicked). Either the
|
|
208
|
+
* entry's `value` carries a `?`/`#` — dropped, because a page value is the path only and
|
|
209
|
+
* the pattern is matched against `u.pathname`, which never holds a query — or `query:`
|
|
210
|
+
* declares something other than `any`, which is ignored rather than read as permissive,
|
|
211
|
+
* since a typo must never quietly switch off the #464 assertion. Both used to be silent,
|
|
212
|
+
* and the first is how #748 was misdiagnosed in the field as a regex-escaping bug: the
|
|
213
|
+
* obvious workaround produced byte-identical output and no hint why
|
|
195
214
|
* SG-W029 — a mobile (appium) feature compiled with NO usable app-package `Path:` — either the line
|
|
196
215
|
* is missing outright, or it holds a web-style route (`Path: /applied-jobs`) that the
|
|
197
216
|
* package guard rejects. Both used to be silent, and both cost the same two things: the
|
|
@@ -255,16 +274,28 @@
|
|
|
255
274
|
* than the one the scenario means, and nothing else would ever say so. Not reported for
|
|
256
275
|
* testid/label/placeholder/role+name/text entries, which name a particular thing —
|
|
257
276
|
* warning there would fire on nearly every capture in a suite
|
|
277
|
+
* SG-E038 — a `{{var}}` the compiler cannot resolve: no test-data file for the feature, no such
|
|
278
|
+
* key, or a key holding a list/map where a value was needed. Twenty-four step patterns
|
|
279
|
+
* used to catch this and emit the PLACEHOLDER TEXT as the value — `fill [ID] with
|
|
280
|
+
* {{valid_partner_id}}` compiled to `fill('${valid_partner_id}')`, generate exited 0,
|
|
281
|
+
* and the literal 20 characters were typed into the app. The field under test applied
|
|
282
|
+
* no format validation, so the string was accepted, the server saw an unknown user, and
|
|
283
|
+
* the scenario failed at the assertion it was written to fail at, for the reason it was
|
|
284
|
+
* written to fail: a suite that looked exactly right while feeding the system garbage.
|
|
285
|
+
* Worse than one wrong value — every run shared the SAME literal id, so a scenario
|
|
286
|
+
* needing a fresh user silently reused one and its state leaked between runs (#781).
|
|
287
|
+
* Note a feature resolves `{{var}}` against a data file named after ITSELF, so the
|
|
288
|
+
* second `.feature` in a screen directory starts life with no data file at all
|
|
258
289
|
* Diagnostics never change the EXIT CODE by themselves; `sungen generate --strict` turns any
|
|
259
290
|
* collected diagnostic into a non-zero exit. They are not all inert, though: SG-W001, SG-W011,
|
|
260
|
-
* SG-E020, SG-E021, SG-W020, SG-E023, SG-E024, SG-E025, SG-E026, SG-E027 and SG-
|
|
291
|
+
* SG-E020, SG-E021, SG-W020, SG-E023, SG-E024, SG-E025, SG-E026, SG-E027, SG-E035 and SG-E038 additionally compile
|
|
261
292
|
* the offending step to a runtime `throw` — a step that reads as a check and silently checks
|
|
262
293
|
* nothing is worse than one that fails loudly — and SG-E031 refuses the file outright. (SG-E022 is
|
|
263
294
|
* the one exception to the "blame the Gherkin" rule and throws nothing: the file is still written
|
|
264
295
|
* so the user keeps the artifact to inspect.)
|
|
265
296
|
* Generation always COMPLETES — the rest of the scenario and the rest of the file still compile.
|
|
266
297
|
*/
|
|
267
|
-
export type DiagnosticCode = 'SG-W001' | 'SG-W002' | 'SG-W003' | 'SG-W004' | 'SG-W005' | 'SG-W006' | 'SG-W007' | 'SG-W008' | 'SG-W009' | 'SG-W010' | 'SG-W011' | 'SG-W012' | 'SG-W013' | 'SG-W014' | 'SG-W015' | 'SG-W016' | 'SG-W017' | 'SG-W018' | 'SG-E020' | 'SG-E021' | 'SG-W020' | 'SG-W021' | 'SG-W022' | 'SG-W023' | 'SG-W024' | 'SG-W026' | 'SG-E025' | 'SG-E026' | 'SG-E022' | 'SG-E023' | 'SG-E024' | 'SG-E027' | 'SG-W028' | 'SG-W029' | 'SG-W030' | 'SG-E031' | 'SG-W032' | 'SG-W034' | 'SG-E035' | 'SG-W036';
|
|
298
|
+
export type DiagnosticCode = 'SG-W001' | 'SG-W002' | 'SG-W003' | 'SG-W004' | 'SG-W005' | 'SG-W006' | 'SG-W007' | 'SG-W008' | 'SG-W009' | 'SG-W010' | 'SG-W011' | 'SG-W012' | 'SG-W013' | 'SG-W014' | 'SG-W015' | 'SG-W016' | 'SG-W017' | 'SG-W018' | 'SG-E020' | 'SG-E021' | 'SG-W020' | 'SG-W021' | 'SG-W022' | 'SG-W023' | 'SG-W024' | 'SG-W026' | 'SG-E025' | 'SG-E026' | 'SG-E022' | 'SG-E023' | 'SG-E024' | 'SG-E027' | 'SG-W028' | 'SG-W029' | 'SG-W030' | 'SG-E031' | 'SG-W032' | 'SG-W034' | 'SG-E035' | 'SG-W036' | 'SG-W037' | 'SG-E038';
|
|
268
299
|
export interface Diagnostic {
|
|
269
300
|
code: DiagnosticCode;
|
|
270
301
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/diagnostics.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwSG;AAEH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnhB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,KAAK,CAAoB;IAEjC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,IAAI;IAInG,GAAG,IAAI,UAAU,EAAE;IAInB,IAAI,KAAK,IAAI,MAAM,CAElB;IAGD,qDAAqD;IACrD,WAAW,IAAI,MAAM,EAAE;CAOxB"}
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
* SG-W008 — @manual scenario is incomplete in either direction: Gherkin steps without a
|
|
26
26
|
* Then (invalid Gherkin; comments cannot substitute), or a documentation-style
|
|
27
27
|
* manual (no steps) whose comments lack the extractable procedure — ≥1 numbered
|
|
28
|
-
* action line + ≥1 labeled Observable:/Oracle:/Expected: line
|
|
28
|
+
* action line + ≥1 labeled Observable:/Oracle:/Expected: line — or a Then that
|
|
29
|
+
* asserts only presence while the real oracle sits in a `# Tester verifies:`
|
|
30
|
+
* comment (#810)
|
|
29
31
|
* SG-W009 — test-data references a `${QA_*}` secret that is declared in neither .env.qa
|
|
30
32
|
* nor .env.qa.example — the test will throw "not set" the moment the key is used
|
|
31
33
|
* SG-W010 — a row step's [Ref] looks POSITIONAL (First/Last/Top/…) but has no selectors.yaml
|
|
@@ -187,12 +189,29 @@
|
|
|
187
189
|
* build names itself at generate time instead of one step further downstream
|
|
188
190
|
*
|
|
189
191
|
* SG-W028 — a step's trailing scope clause was DROPPED, so the step runs against more of the page
|
|
190
|
-
* than its sentence names.
|
|
192
|
+
* than its sentence names. Three causes, one code: the `<word>` after `in [X]` is not a
|
|
191
193
|
* container type (a typo, or a leaf element used as a parent), or the by-content form
|
|
192
194
|
* `in [X] <type> with {{v}}` was written for the mobile adapter, which chains a parent
|
|
193
195
|
* element and has no content filter. Before this, both compiled clean and silently
|
|
194
196
|
* widened the assertion to the whole screen — the failure mode that only a diff of the
|
|
195
|
-
* generated spec against the Gherkin could reveal (#667)
|
|
197
|
+
* generated spec against the Gherkin could reveal (#667).
|
|
198
|
+
* The third is the RENDER-time half #667 could not reach: the clause parsed and the
|
|
199
|
+
* container resolved, but the step form that won the sentence emits a locator built
|
|
200
|
+
* inline and never applies it. Judged on the emitted code — every path that honours a
|
|
201
|
+
* scope emits the resolved container locator verbatim, so its absence IS the drop —
|
|
202
|
+
* which makes the check total rather than a list of templates to keep in sync. Found
|
|
203
|
+
* via `see [学科] label with {{v}} in [Education Card 6] card` compiling to a page-wide
|
|
204
|
+
* `getByText` on a screen repeating ten identical cards (#747)
|
|
205
|
+
* SG-W037 — a `type: page` entry says something about the QUERY that the compiler cannot use.
|
|
206
|
+
* Two causes, one code, and the same root confusion behind both: a bare `see [X] page`
|
|
207
|
+
* asserts the URL carries NO query (#464), which is unsatisfiable for a page keyed by
|
|
208
|
+
* one (`/admins/detail?id=5`, where the id comes from the row just clicked). Either the
|
|
209
|
+
* entry's `value` carries a `?`/`#` — dropped, because a page value is the path only and
|
|
210
|
+
* the pattern is matched against `u.pathname`, which never holds a query — or `query:`
|
|
211
|
+
* declares something other than `any`, which is ignored rather than read as permissive,
|
|
212
|
+
* since a typo must never quietly switch off the #464 assertion. Both used to be silent,
|
|
213
|
+
* and the first is how #748 was misdiagnosed in the field as a regex-escaping bug: the
|
|
214
|
+
* obvious workaround produced byte-identical output and no hint why
|
|
196
215
|
* SG-W029 — a mobile (appium) feature compiled with NO usable app-package `Path:` — either the line
|
|
197
216
|
* is missing outright, or it holds a web-style route (`Path: /applied-jobs`) that the
|
|
198
217
|
* package guard rejects. Both used to be silent, and both cost the same two things: the
|
|
@@ -256,9 +275,21 @@
|
|
|
256
275
|
* than the one the scenario means, and nothing else would ever say so. Not reported for
|
|
257
276
|
* testid/label/placeholder/role+name/text entries, which name a particular thing —
|
|
258
277
|
* warning there would fire on nearly every capture in a suite
|
|
278
|
+
* SG-E038 — a `{{var}}` the compiler cannot resolve: no test-data file for the feature, no such
|
|
279
|
+
* key, or a key holding a list/map where a value was needed. Twenty-four step patterns
|
|
280
|
+
* used to catch this and emit the PLACEHOLDER TEXT as the value — `fill [ID] with
|
|
281
|
+
* {{valid_partner_id}}` compiled to `fill('${valid_partner_id}')`, generate exited 0,
|
|
282
|
+
* and the literal 20 characters were typed into the app. The field under test applied
|
|
283
|
+
* no format validation, so the string was accepted, the server saw an unknown user, and
|
|
284
|
+
* the scenario failed at the assertion it was written to fail at, for the reason it was
|
|
285
|
+
* written to fail: a suite that looked exactly right while feeding the system garbage.
|
|
286
|
+
* Worse than one wrong value — every run shared the SAME literal id, so a scenario
|
|
287
|
+
* needing a fresh user silently reused one and its state leaked between runs (#781).
|
|
288
|
+
* Note a feature resolves `{{var}}` against a data file named after ITSELF, so the
|
|
289
|
+
* second `.feature` in a screen directory starts life with no data file at all
|
|
259
290
|
* Diagnostics never change the EXIT CODE by themselves; `sungen generate --strict` turns any
|
|
260
291
|
* collected diagnostic into a non-zero exit. They are not all inert, though: SG-W001, SG-W011,
|
|
261
|
-
* SG-E020, SG-E021, SG-W020, SG-E023, SG-E024, SG-E025, SG-E026, SG-E027 and SG-
|
|
292
|
+
* SG-E020, SG-E021, SG-W020, SG-E023, SG-E024, SG-E025, SG-E026, SG-E027, SG-E035 and SG-E038 additionally compile
|
|
262
293
|
* the offending step to a runtime `throw` — a step that reads as a check and silently checks
|
|
263
294
|
* nothing is worse than one that fails loudly — and SG-E031 refuses the file outright. (SG-E022 is
|
|
264
295
|
* the one exception to the "blame the Gherkin" rule and throws nothing: the file is still written
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../../src/generators/test-generator/diagnostics.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../../src/generators/test-generator/diagnostics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwSG;;;AAWH,MAAa,oBAAoB;IAAjC;QACU,UAAK,GAAiB,EAAE,CAAC;IAuBnC,CAAC;IArBC,GAAG,CAAC,IAAoB,EAAE,OAAe,EAAE,UAA+C,EAAE;QAC1F,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,GAAG;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC3B,CAAC;IAGD,qDAAqD;IACrD,WAAW;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,oDAwBC"}
|
|
@@ -139,8 +139,18 @@ export declare class PatternRegistry {
|
|
|
139
139
|
private static filterParentByValue;
|
|
140
140
|
/**
|
|
141
141
|
* Resolve a `{{var}}` written where literal text is expected, leaving anything else untouched.
|
|
142
|
-
*
|
|
143
|
-
*
|
|
142
|
+
*
|
|
143
|
+
* An unresolvable ref is NOT kept as written. That was the last of the #781 swallows, and the
|
|
144
|
+
* hardest to see, because the old rationale — "the locator is then wrong in a way the author can
|
|
145
|
+
* read, which beats losing the whole step" — is true of a locator NAME and false here. The second
|
|
146
|
+
* `with` in `see [Tag] header with {{label}} in [Job Card] card with {{job_title}}` binds to the
|
|
147
|
+
* PARENT scope, so the value lands in `.filter({ hasText: '{{job_title}}' })`: a scope that can
|
|
148
|
+
* never match, compiled with ZERO diagnostics and `generate` exiting 0. The author then reads a
|
|
149
|
+
* "element not found" timeout that says nothing about the missing test-data key.
|
|
150
|
+
*
|
|
151
|
+
* Letting it throw routes it to StepMapper.mapStep like every other ref, so the step names the
|
|
152
|
+
* ref and the file it wanted. Only a string that IS exactly `{{ref}}` is ever resolved here;
|
|
153
|
+
* anything else is returned untouched, so ordinary literal text is unaffected.
|
|
144
154
|
*/
|
|
145
155
|
private static resolveInlineData;
|
|
146
156
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAyB,MAAM,SAAS,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAQ9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;AASpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD;AAUD;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAqB;;IAMrC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAK3C;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI;IAejD;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,GAAG,UAAU,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAyB,MAAM,SAAS,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;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comment: resolved.comment,
|
|
196
196
|
pattern: pattern.name,
|
|
197
197
|
templateData: resolved.data,
|
|
198
|
+
parentLocator,
|
|
198
199
|
};
|
|
199
200
|
}
|
|
200
201
|
if (pattern.generator) {
|
|
@@ -204,7 +205,7 @@ class PatternRegistry {
|
|
|
204
205
|
return generatorStateMiss;
|
|
205
206
|
// A generator returning nothing still falls through to the no-pattern path.
|
|
206
207
|
const generated = pattern.generator(step, scoped);
|
|
207
|
-
return generated ? { ...generated, pattern: pattern.name } : null;
|
|
208
|
+
return generated ? { ...generated, pattern: pattern.name, parentLocator } : null;
|
|
208
209
|
}
|
|
209
210
|
return null;
|
|
210
211
|
}
|
|
@@ -418,19 +419,24 @@ class PatternRegistry {
|
|
|
418
419
|
}
|
|
419
420
|
/**
|
|
420
421
|
* Resolve a `{{var}}` written where literal text is expected, leaving anything else untouched.
|
|
421
|
-
*
|
|
422
|
-
*
|
|
422
|
+
*
|
|
423
|
+
* An unresolvable ref is NOT kept as written. That was the last of the #781 swallows, and the
|
|
424
|
+
* hardest to see, because the old rationale — "the locator is then wrong in a way the author can
|
|
425
|
+
* read, which beats losing the whole step" — is true of a locator NAME and false here. The second
|
|
426
|
+
* `with` in `see [Tag] header with {{label}} in [Job Card] card with {{job_title}}` binds to the
|
|
427
|
+
* PARENT scope, so the value lands in `.filter({ hasText: '{{job_title}}' })`: a scope that can
|
|
428
|
+
* never match, compiled with ZERO diagnostics and `generate` exiting 0. The author then reads a
|
|
429
|
+
* "element not found" timeout that says nothing about the missing test-data key.
|
|
430
|
+
*
|
|
431
|
+
* Letting it throw routes it to StepMapper.mapStep like every other ref, so the step names the
|
|
432
|
+
* ref and the file it wanted. Only a string that IS exactly `{{ref}}` is ever resolved here;
|
|
433
|
+
* anything else is returned untouched, so ordinary literal text is unaffected.
|
|
423
434
|
*/
|
|
424
435
|
static resolveInlineData(text, context) {
|
|
425
436
|
const match = text.match(/^\{\{([a-z0-9\-._]+)\}\}$/i);
|
|
426
437
|
if (!match)
|
|
427
438
|
return text;
|
|
428
|
-
|
|
429
|
-
return context.dataResolver.resolveData(match[1], context.featureName);
|
|
430
|
-
}
|
|
431
|
-
catch {
|
|
432
|
-
return text;
|
|
433
|
-
}
|
|
439
|
+
return context.dataResolver.resolveData(match[1], context.featureName);
|
|
434
440
|
}
|
|
435
441
|
/**
|
|
436
442
|
* Check if step matches a pattern matcher
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgEA,wCAGC;AAhED,6DAAoE;AACpE,6DAAiF;AACjF,4EAAsE;AAS7D,oGATA,4CAAmB,OASA;AAR5B,mEAA8D;AAQhC,oGARrB,2CAAmB,OAQqB;AAPjD,8DAAoE;AACpE,2DAAsD;AACtD,gEAA+D;AAO/D;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,uEAAuE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,kDAAkD,CAAC;AAE9E;;GAEG;AACH,MAAa,eAAe;IAG1B;QAFQ,aAAQ,GAAkB,EAAE,CAAC;QAGnC,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,uFAAuF;QACvF,0FAA0F;QAC1F,4FAA4F;QAC5F,IAAA,0CAA+B,GAAE,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,6BAAkB,CAAC,Q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,CAAC;CACF;AA5ZD,0CA4ZC;AAED,qGAAqG;AACrG,kFAAkF;AAClF,0CAAwB"}
|
|
@@ -79,6 +79,21 @@ export interface PatternContext {
|
|
|
79
79
|
adapterName?: string;
|
|
80
80
|
/** Compile-diagnostics channel, so the pattern layer can report instead of throwing. */
|
|
81
81
|
diagnostics?: DiagnosticsSink;
|
|
82
|
+
/**
|
|
83
|
+
* The container locator the step's `in [Parent] <type>` clause resolved to, already rendered —
|
|
84
|
+
* set by `withParentScope`, absent when the step carries no scope clause.
|
|
85
|
+
*
|
|
86
|
+
* `withParentScope` also stamps this onto everything the pattern RESOLVES, which is the seam that
|
|
87
|
+
* serves the ordinary case. It is not enough on its own: a pattern whose locator is not built from
|
|
88
|
+
* a selectors.yaml entry never has a `resolved` object to carry it. `see [学科] label with {{v}}`
|
|
89
|
+
* is exactly that — the ref names on-screen CAPTION text, so the common case has no entry at all,
|
|
90
|
+
* `resolveSelector` throws, and the branch renders from `{}`. The scope was then dropped with no
|
|
91
|
+
* diagnostic (#747), which is the silence #667 set out to end.
|
|
92
|
+
*
|
|
93
|
+
* Read it ONLY where the template's locator is built inline rather than from `resolved`; every
|
|
94
|
+
* other pattern gets the scope through `resolved` and must not apply it twice.
|
|
95
|
+
*/
|
|
96
|
+
parentLocator?: string;
|
|
82
97
|
/** App profile (qa/app.yaml merged over presets/defaults) — widget variants, recipes,
|
|
83
98
|
* loading indicator, table row conventions. Typed loosely to keep the SPI decoupled;
|
|
84
99
|
* the concrete shape is ResolvedAppProfile. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YA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;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACrC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACtF;AAED;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,kBAAkB,GAClB,mBAAmB,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,KAAK,UAAU,CAAC;AAEzF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC,MAA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QACzB,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,iBAAiB,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACpC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACrC"}
|
|
@@ -13,6 +13,11 @@ import { PatternContext } from './types';
|
|
|
13
13
|
* Only the target's own scope is stamped; anything a pattern resolves that ALREADY carries a
|
|
14
14
|
* `parentLocator` is left alone, so a pattern that builds its own container chain (table rows) keeps
|
|
15
15
|
* winning over the generic one.
|
|
16
|
+
*
|
|
17
|
+
* The scope also rides on the CONTEXT itself, not only on what the pattern resolves. A pattern whose
|
|
18
|
+
* locator is built inline — `see [X] label with {{v}}` matches on-screen caption text and usually
|
|
19
|
+
* has no selectors.yaml entry at all, so `resolveSelector` throws and the branch renders from `{}` —
|
|
20
|
+
* has no `resolved` object for the stamp to land on, and lost the scope silently (#747).
|
|
16
21
|
*/
|
|
17
22
|
export declare function withParentScope(context: PatternContext, parentLocator: string): PatternContext;
|
|
18
23
|
//# sourceMappingURL=with-parent-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-parent-scope.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/with-parent-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"with-parent-scope.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/with-parent-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,GAAG,cAAc,CAwB9F"}
|
|
@@ -15,6 +15,11 @@ exports.withParentScope = withParentScope;
|
|
|
15
15
|
* Only the target's own scope is stamped; anything a pattern resolves that ALREADY carries a
|
|
16
16
|
* `parentLocator` is left alone, so a pattern that builds its own container chain (table rows) keeps
|
|
17
17
|
* winning over the generic one.
|
|
18
|
+
*
|
|
19
|
+
* The scope also rides on the CONTEXT itself, not only on what the pattern resolves. A pattern whose
|
|
20
|
+
* locator is built inline — `see [X] label with {{v}}` matches on-screen caption text and usually
|
|
21
|
+
* has no selectors.yaml entry at all, so `resolveSelector` throws and the branch renders from `{}` —
|
|
22
|
+
* has no `resolved` object for the stamp to land on, and lost the scope silently (#747).
|
|
18
23
|
*/
|
|
19
24
|
function withParentScope(context, parentLocator) {
|
|
20
25
|
const scope = (resolved) => resolved && typeof resolved === 'object' && !resolved.parentLocator
|
|
@@ -33,6 +38,7 @@ function withParentScope(context, parentLocator) {
|
|
|
33
38
|
});
|
|
34
39
|
return {
|
|
35
40
|
...context,
|
|
41
|
+
parentLocator,
|
|
36
42
|
selectorResolver,
|
|
37
43
|
renderLocator: (resolved) => context.renderLocator(scope(resolved)),
|
|
38
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-parent-scope.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/with-parent-scope.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"with-parent-scope.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/with-parent-scope.ts"],"names":[],"mappings":";;AAsBA,0CAwBC;AA5CD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,eAAe,CAAC,OAAuB,EAAE,aAAqB;IAC5E,MAAM,KAAK,GAAG,CAAI,QAAW,EAAK,EAAE,CAClC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAE,QAAgB,CAAC,aAAa;QAC1E,CAAC,CAAC,EAAE,GAAI,QAAgB,EAAE,aAAa,EAAE;QACzC,CAAC,CAAC,QAAQ,CAAC;IAEf,+FAA+F;IAC/F,sEAAsE;IACtE,MAAM,gBAAgB,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE;QAC3D,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;YACxB,IAAI,IAAI,KAAK,iBAAiB,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,KAAK,CAAE,MAAc,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACjF,CAAC;YACD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClD,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAClE,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,OAAO;QACV,aAAa;QACb,gBAAgB;QAChB,aAAa,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;KACzE,CAAC;AACJ,CAAC"}
|
|
@@ -6,6 +6,9 @@ export interface MappedStep {
|
|
|
6
6
|
imports?: string[];
|
|
7
7
|
pattern?: string;
|
|
8
8
|
templateData?: Record<string, any>;
|
|
9
|
+
/** The container locator the step's `in [Parent] <type>` clause resolved to, when it carried one.
|
|
10
|
+
* Recorded so a post-map guard can check the scope actually reached the code (SG-W028, #747). */
|
|
11
|
+
parentLocator?: string;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* StepMapper - Orchestrates step-to-code conversion using pattern registry
|
|
@@ -94,7 +97,23 @@ export declare class StepMapper {
|
|
|
94
97
|
* Map a Gherkin step to Playwright code
|
|
95
98
|
* Uses pattern registry first, falls back to AI if enabled
|
|
96
99
|
*/
|
|
100
|
+
/**
|
|
101
|
+
* SG-E038 — the ONE place an unresolvable `{{var}}` is answered.
|
|
102
|
+
*
|
|
103
|
+
* Twenty-four step patterns used to catch the resolver's failure each in their own way and
|
|
104
|
+
* substitute the placeholder TEXT as the value, so `fill [ID] with {{valid_partner_id}}` shipped
|
|
105
|
+
* `fill('${valid_partner_id}')` — 20 literal characters typed into the app, `generate` exiting 0,
|
|
106
|
+
* and a scenario that failed exactly where it was written to fail, for the reason it was written
|
|
107
|
+
* to fail. Nothing told the run apart from a correct one (#781).
|
|
108
|
+
*
|
|
109
|
+
* The step now compiles to a throw naming the ref and the file, which is the house answer to
|
|
110
|
+
* "the compiler would otherwise invent something" (SG-E023/E024/E026 all work this way). A throw
|
|
111
|
+
* is preferred over letting the error kill the feature file, because one run then reports EVERY
|
|
112
|
+
* unresolved ref instead of the first; `--strict` turns the diagnostic into exit 1.
|
|
113
|
+
*/
|
|
97
114
|
mapStep(step: ParsedStep): MappedStep | Promise<MappedStep>;
|
|
115
|
+
private unresolvedDataRef;
|
|
116
|
+
private mapStepResolving;
|
|
98
117
|
/** Strategies the `locator` partial renders into a usable ROOT expression. Anything else
|
|
99
118
|
* (mobile native strategies) has no meaning as a Playwright dialog root. */
|
|
100
119
|
private static readonly DIALOG_ROOT_STRATEGIES;
|
|
@@ -216,6 +235,33 @@ export declare class StepMapper {
|
|
|
216
235
|
*/
|
|
217
236
|
private static readonly ROW_FILTER_WRITE_CALL;
|
|
218
237
|
private checkRowFilterClauseDropped;
|
|
238
|
+
/**
|
|
239
|
+
* The container scope parsed, resolved — and then never reached the emitted code.
|
|
240
|
+
*
|
|
241
|
+
* #667 closed the parse-time half of this: an `in [X] <word>` whose `<word>` is not a container
|
|
242
|
+
* type is reported (SG-W028) rather than truncated. It could not close the render-time half,
|
|
243
|
+
* because honouring the scope is per-template work: the registry stamps `parentLocator` on what a
|
|
244
|
+
* RESOLVER hands back and `withParentScope` stamps it on what any pattern RESOLVES, but a branch
|
|
245
|
+
* that builds its locator inline and renders from hand-picked fields receives neither. Three did,
|
|
246
|
+
* and `see [学科] label with {{v}} in [Education Card 6] card` compiled to a page-wide
|
|
247
|
+
* `getByText` with no diagnostic at all (#747) — a green test reading a card the sentence never
|
|
248
|
+
* names, findable only by diffing the generated spec against the Gherkin.
|
|
249
|
+
*
|
|
250
|
+
* So the fact is taken from the OUTPUT, exactly as SG-W032 takes the row filter from `.filter(`:
|
|
251
|
+
* every path that honours a container scope emits the resolved container locator verbatim, so its
|
|
252
|
+
* absence from the code IS the drop. That makes the guard total — it covers every template that
|
|
253
|
+
* exists now and every one added later, without a list to keep in sync.
|
|
254
|
+
*
|
|
255
|
+
* A step already refused elsewhere is excluded: it compiles to a `throw`, and a second opinion on
|
|
256
|
+
* top of a refusal is two contradictory messages about one step (SG-W032's reasoning, unchanged).
|
|
257
|
+
* The `throw` test covers a refusal the PATTERN layer recorded; a refusal one of the guards above
|
|
258
|
+
* substitutes is covered by call order instead — this one runs last.
|
|
259
|
+
*
|
|
260
|
+
* Returns `void`, not `MappedStep | null` like its siblings: it only ever REPORTS. Typed that way
|
|
261
|
+
* on purpose, so a future edit copying the sibling shape cannot assume a replacement step is being
|
|
262
|
+
* consumed when nothing is looking at one.
|
|
263
|
+
*/
|
|
264
|
+
private checkParentScopeDropped;
|
|
219
265
|
private checkAssertionClauseSwallowed;
|
|
220
266
|
/**
|
|
221
267
|
* A click step that names a POSITION (`at position "top-left"`, `at offset x=…, y=…`) must compile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-mapper.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/step-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAgCrD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"step-mapper.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/step-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAgCrD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC;sGACkG;IAClG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,uFAAuF;IACvF,OAA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;;;;OAQG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CACgG;IAE3I,OAAO,CAAC,yBAAyB;IAwBjC,OAAO,CAAC,oBAAoB;IAqB5B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,gCAAgC;IAmExC;;OAEG;IACH;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CAAC,2BAA2B;IAkBnC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,sBAAsB;IAuB9B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,8BAA8B;IAgBtC;;;;;;;;OAQG;IACH,OAAO,CAAC,wBAAwB;IAOhC;;;;;;;;OAQG;IACH,OAAO,CAAC,8BAA8B;IAOtC,OAAO,CAAC,oBAAoB;CAyB7B"}
|
|
@@ -186,7 +186,44 @@ class StepMapper {
|
|
|
186
186
|
* Map a Gherkin step to Playwright code
|
|
187
187
|
* Uses pattern registry first, falls back to AI if enabled
|
|
188
188
|
*/
|
|
189
|
+
/**
|
|
190
|
+
* SG-E038 — the ONE place an unresolvable `{{var}}` is answered.
|
|
191
|
+
*
|
|
192
|
+
* Twenty-four step patterns used to catch the resolver's failure each in their own way and
|
|
193
|
+
* substitute the placeholder TEXT as the value, so `fill [ID] with {{valid_partner_id}}` shipped
|
|
194
|
+
* `fill('${valid_partner_id}')` — 20 literal characters typed into the app, `generate` exiting 0,
|
|
195
|
+
* and a scenario that failed exactly where it was written to fail, for the reason it was written
|
|
196
|
+
* to fail. Nothing told the run apart from a correct one (#781).
|
|
197
|
+
*
|
|
198
|
+
* The step now compiles to a throw naming the ref and the file, which is the house answer to
|
|
199
|
+
* "the compiler would otherwise invent something" (SG-E023/E024/E026 all work this way). A throw
|
|
200
|
+
* is preferred over letting the error kill the feature file, because one run then reports EVERY
|
|
201
|
+
* unresolved ref instead of the first; `--strict` turns the diagnostic into exit 1.
|
|
202
|
+
*/
|
|
189
203
|
mapStep(step) {
|
|
204
|
+
try {
|
|
205
|
+
return this.mapStepResolving(step);
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
if (err instanceof data_resolver_1.DataRefError)
|
|
209
|
+
return this.unresolvedDataRef(step, err);
|
|
210
|
+
throw err;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
unresolvedDataRef(step, err) {
|
|
214
|
+
const fix = err.file
|
|
215
|
+
? `add a "${err.dataRef}" key to ${err.file}`
|
|
216
|
+
: `define "${err.dataRef}" in the feature's test-data file`;
|
|
217
|
+
const reason = `step "${step.text}": {{${err.dataRef}}} does not resolve — ${err.message}. `
|
|
218
|
+
+ `${fix}, or reference a key that exists. The step compiles to this throw rather than `
|
|
219
|
+
+ `typing the literal text "\${${err.dataRef}}" into the app as if it were data.`;
|
|
220
|
+
this.diagnostics?.add('SG-E038', reason, { feature: this.featureName, step: step.text });
|
|
221
|
+
return {
|
|
222
|
+
code: (0, unsupported_step_code_1.unsupportedStepCode)(reason),
|
|
223
|
+
comment: `Unresolved {{${err.dataRef}}} — see SG-E038: ${step.text}`,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
mapStepResolving(step) {
|
|
190
227
|
this.stepCounter++;
|
|
191
228
|
// Track effective keyword: And/But inherit from previous Given/When/Then
|
|
192
229
|
const keyword = step.keyword.trim();
|
|
@@ -325,13 +362,7 @@ class StepMapper {
|
|
|
325
362
|
// Case 3: [panel] dialog with {{value}}
|
|
326
363
|
// Use dataRef as filter text — the dialog name is dynamic (from test-data),
|
|
327
364
|
// so use .filter({ hasText }) instead of { name } for reliable matching
|
|
328
|
-
|
|
329
|
-
try {
|
|
330
|
-
filterText = this.dataResolver.resolveData(step.dataRef, this.featureName);
|
|
331
|
-
}
|
|
332
|
-
catch {
|
|
333
|
-
filterText = `\${${step.dataRef}}`;
|
|
334
|
-
}
|
|
365
|
+
const filterText = this.dataResolver.resolveData(step.dataRef, this.featureName);
|
|
335
366
|
contextVars.dialogFilterText = filterText;
|
|
336
367
|
// The declared entry still owns the ROOT the filter applies to — but only when it
|
|
337
368
|
// is a non-role strategy (locator/testid/css). A role entry keeps the bare
|
|
@@ -424,6 +455,10 @@ class StepMapper {
|
|
|
424
455
|
const badType = this.checkUnknownSelectorType(step, mappedStep);
|
|
425
456
|
if (badType)
|
|
426
457
|
return badType;
|
|
458
|
+
// LAST of the guards, and deliberately so: every check above can REPLACE the step with a
|
|
459
|
+
// refusal, and reporting a dropped scope against code that is about to be discarded is the
|
|
460
|
+
// "two contradictory messages about one step" this guard's own doc rules out.
|
|
461
|
+
this.checkParentScopeDropped(step, mappedStep);
|
|
427
462
|
return mappedStep;
|
|
428
463
|
}
|
|
429
464
|
// No pattern matched. The step is, by definition, vocabulary sungen does not have — so it
|
|
@@ -654,6 +689,48 @@ class StepMapper {
|
|
|
654
689
|
+ `applied to the table narrows nothing and the assertion stays as weak as it is now.`, { feature: this.featureName, step: step.text });
|
|
655
690
|
return null;
|
|
656
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* The container scope parsed, resolved — and then never reached the emitted code.
|
|
694
|
+
*
|
|
695
|
+
* #667 closed the parse-time half of this: an `in [X] <word>` whose `<word>` is not a container
|
|
696
|
+
* type is reported (SG-W028) rather than truncated. It could not close the render-time half,
|
|
697
|
+
* because honouring the scope is per-template work: the registry stamps `parentLocator` on what a
|
|
698
|
+
* RESOLVER hands back and `withParentScope` stamps it on what any pattern RESOLVES, but a branch
|
|
699
|
+
* that builds its locator inline and renders from hand-picked fields receives neither. Three did,
|
|
700
|
+
* and `see [学科] label with {{v}} in [Education Card 6] card` compiled to a page-wide
|
|
701
|
+
* `getByText` with no diagnostic at all (#747) — a green test reading a card the sentence never
|
|
702
|
+
* names, findable only by diffing the generated spec against the Gherkin.
|
|
703
|
+
*
|
|
704
|
+
* So the fact is taken from the OUTPUT, exactly as SG-W032 takes the row filter from `.filter(`:
|
|
705
|
+
* every path that honours a container scope emits the resolved container locator verbatim, so its
|
|
706
|
+
* absence from the code IS the drop. That makes the guard total — it covers every template that
|
|
707
|
+
* exists now and every one added later, without a list to keep in sync.
|
|
708
|
+
*
|
|
709
|
+
* A step already refused elsewhere is excluded: it compiles to a `throw`, and a second opinion on
|
|
710
|
+
* top of a refusal is two contradictory messages about one step (SG-W032's reasoning, unchanged).
|
|
711
|
+
* The `throw` test covers a refusal the PATTERN layer recorded; a refusal one of the guards above
|
|
712
|
+
* substitutes is covered by call order instead — this one runs last.
|
|
713
|
+
*
|
|
714
|
+
* Returns `void`, not `MappedStep | null` like its siblings: it only ever REPORTS. Typed that way
|
|
715
|
+
* on purpose, so a future edit copying the sibling shape cannot assume a replacement step is being
|
|
716
|
+
* consumed when nothing is looking at one.
|
|
717
|
+
*/
|
|
718
|
+
checkParentScopeDropped(step, mapped) {
|
|
719
|
+
const parent = mapped.parentLocator;
|
|
720
|
+
if (!parent)
|
|
721
|
+
return;
|
|
722
|
+
const code = mapped.code || '';
|
|
723
|
+
if (code.startsWith('throw new Error('))
|
|
724
|
+
return;
|
|
725
|
+
if (code.includes(parent))
|
|
726
|
+
return;
|
|
727
|
+
this.diagnostics?.add('SG-W028', `step "${step.text}" names the container [${step.parentRef}] but the generated code does not `
|
|
728
|
+
+ `scope to it — the step runs against the WHOLE page, so it fails where the target repeats and `
|
|
729
|
+
+ `passes on a DIFFERENT [${step.parentRef}] where it does not. The "${mapped.pattern}" step `
|
|
730
|
+
+ `form does not carry a container scope. Assert on an element the container owns (give it a `
|
|
731
|
+
+ `selectors.yaml entry and use "has text"/"contains"), or drop the clause so the sentence `
|
|
732
|
+
+ `matches what is actually checked.`, { feature: this.featureName, step: step.text });
|
|
733
|
+
}
|
|
657
734
|
checkAssertionClauseSwallowed(step, mapped) {
|
|
658
735
|
const code = mapped.code || '';
|
|
659
736
|
// Bare visibility: nothing but a visible/displayed assertion on one locator.
|
|
@@ -731,8 +808,6 @@ class StepMapper {
|
|
|
731
808
|
const marker = data_resolver_1.DataResolver.encodeMarker(step.dataRef);
|
|
732
809
|
if (code.includes(marker) || code.includes(marker.replace(/\$/g, '\\$')))
|
|
733
810
|
return;
|
|
734
|
-
if (code.includes(`\${${step.dataRef}}`))
|
|
735
|
-
return; // unresolved fallback
|
|
736
811
|
if (code.includes(step.dataRef))
|
|
737
812
|
return; // testData.set('ref'), comments
|
|
738
813
|
try {
|