@sun-asterisk/sungen 3.2.28 → 3.2.30
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/capabilities/discover.d.ts +29 -0
- package/dist/capabilities/discover.d.ts.map +1 -1
- package/dist/capabilities/discover.js +144 -10
- package/dist/capabilities/discover.js.map +1 -1
- package/dist/capabilities/registry.d.ts +18 -0
- package/dist/capabilities/registry.d.ts.map +1 -1
- package/dist/capabilities/registry.js +25 -0
- package/dist/capabilities/registry.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +9 -0
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.js +1 -1
- 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 +2 -1
- 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 +6 -2
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/inspect.js +1 -1
- package/dist/cli/commands/inspect.js.map +1 -1
- package/dist/cli/commands/results-merge.d.ts.map +1 -1
- package/dist/cli/commands/results-merge.js +9 -2
- package/dist/cli/commands/results-merge.js.map +1 -1
- package/dist/cli/commands/results-sanitize.d.ts +24 -0
- package/dist/cli/commands/results-sanitize.d.ts.map +1 -0
- package/dist/cli/commands/results-sanitize.js +126 -0
- package/dist/cli/commands/results-sanitize.js.map +1 -0
- package/dist/cli/commands/script-check.d.ts.map +1 -1
- package/dist/cli/commands/script-check.js +3 -1
- package/dist/cli/commands/script-check.js.map +1 -1
- 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/dashboard/templates/index.html +1 -1
- package/dist/exporters/api-testcase-formatter.d.ts +3 -6
- package/dist/exporters/api-testcase-formatter.d.ts.map +1 -1
- package/dist/exporters/api-testcase-formatter.js +7 -10
- package/dist/exporters/api-testcase-formatter.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +1 -1
- package/dist/exporters/feature-parser.js +1 -1
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +18 -3
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/item-labels.d.ts +35 -0
- package/dist/exporters/matrix/item-labels.d.ts.map +1 -0
- package/dist/exporters/matrix/item-labels.js +90 -0
- package/dist/exporters/matrix/item-labels.js.map +1 -0
- package/dist/exporters/matrix/render-coverage-sheet.d.ts +14 -0
- package/dist/exporters/matrix/render-coverage-sheet.d.ts.map +1 -0
- package/dist/exporters/matrix/render-coverage-sheet.js +162 -0
- package/dist/exporters/matrix/render-coverage-sheet.js.map +1 -0
- package/dist/exporters/matrix/render-csv.d.ts.map +1 -1
- package/dist/exporters/matrix/render-csv.js +3 -1
- package/dist/exporters/matrix/render-csv.js.map +1 -1
- package/dist/exporters/matrix/render-overview-sheet.d.ts +20 -0
- package/dist/exporters/matrix/render-overview-sheet.d.ts.map +1 -0
- package/dist/exporters/matrix/render-overview-sheet.js +32 -0
- package/dist/exporters/matrix/render-overview-sheet.js.map +1 -0
- package/dist/exporters/matrix/render-testcase-sheet.d.ts +30 -0
- package/dist/exporters/matrix/render-testcase-sheet.d.ts.map +1 -0
- package/dist/exporters/matrix/render-testcase-sheet.js +156 -0
- package/dist/exporters/matrix/render-testcase-sheet.js.map +1 -0
- package/dist/exporters/matrix/render-xlsx.d.ts +41 -31
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
- package/dist/exporters/matrix/render-xlsx.js +72 -425
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/result-totals.d.ts +23 -0
- package/dist/exporters/matrix/result-totals.d.ts.map +1 -0
- package/dist/exporters/matrix/result-totals.js +21 -0
- package/dist/exporters/matrix/result-totals.js.map +1 -0
- package/dist/exporters/matrix/testcase-summary-band.d.ts +30 -0
- package/dist/exporters/matrix/testcase-summary-band.d.ts.map +1 -0
- package/dist/exporters/matrix/testcase-summary-band.js +71 -0
- package/dist/exporters/matrix/testcase-summary-band.js.map +1 -0
- package/dist/exporters/matrix/wording.d.ts.map +1 -1
- package/dist/exporters/matrix/wording.js +13 -0
- package/dist/exporters/matrix/wording.js.map +1 -1
- package/dist/exporters/matrix/xlsx-cells.d.ts +38 -0
- package/dist/exporters/matrix/xlsx-cells.d.ts.map +1 -0
- package/dist/exporters/matrix/xlsx-cells.js +52 -0
- package/dist/exporters/matrix/xlsx-cells.js.map +1 -0
- package/dist/exporters/qa-env-secret-denylist.js +2 -2
- package/dist/exporters/qa-env-secret-denylist.js.map +1 -1
- package/dist/exporters/report-path-sanitizer.d.ts +38 -0
- package/dist/exporters/report-path-sanitizer.d.ts.map +1 -0
- package/dist/exporters/report-path-sanitizer.js +137 -0
- package/dist/exporters/report-path-sanitizer.js.map +1 -0
- package/dist/exporters/result-variants.d.ts.map +1 -1
- package/dist/exporters/result-variants.js +2 -1
- package/dist/exporters/result-variants.js.map +1 -1
- package/dist/exporters/sensitive-key.d.ts +31 -0
- package/dist/exporters/sensitive-key.d.ts.map +1 -0
- package/dist/exporters/sensitive-key.js +50 -0
- package/dist/exporters/sensitive-key.js.map +1 -0
- package/dist/exporters/test-data-resolver.d.ts +4 -1
- package/dist/exporters/test-data-resolver.d.ts.map +1 -1
- package/dist/exporters/test-data-resolver.js +12 -2
- package/dist/exporters/test-data-resolver.js.map +1 -1
- package/dist/exporters/xlsx-report-builder.d.ts +12 -1
- package/dist/exporters/xlsx-report-builder.d.ts.map +1 -1
- package/dist/exporters/xlsx-report-builder.js +10 -2
- package/dist/exporters/xlsx-report-builder.js.map +1 -1
- package/dist/generators/gherkin-parser/index.d.ts +10 -0
- package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
- package/dist/generators/gherkin-parser/index.js +20 -12
- package/dist/generators/gherkin-parser/index.js.map +1 -1
- package/dist/generators/gherkin-parser/parent-scope-clause.d.ts +54 -0
- package/dist/generators/gherkin-parser/parent-scope-clause.d.ts.map +1 -0
- package/dist/generators/gherkin-parser/parent-scope-clause.js +109 -0
- package/dist/generators/gherkin-parser/parent-scope-clause.js.map +1 -0
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts +23 -18
- package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/appium-adapter.d.ts +4 -19
- package/dist/generators/test-generator/adapters/appium/appium-adapter.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/appium/appium-adapter.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/os-support.d.ts +53 -0
- package/dist/generators/test-generator/adapters/appium/os-support.d.ts.map +1 -0
- package/dist/generators/test-generator/adapters/appium/os-support.js +200 -0
- package/dist/generators/test-generator/adapters/appium/os-support.js.map +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/after-all.hbs +18 -0
- package/dist/generators/test-generator/adapters/appium/templates/after-each.hbs +18 -0
- package/dist/generators/test-generator/adapters/appium/templates/before-all.hbs +18 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/alert-fill-action.hbs +9 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +24 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-at-position-action.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-element-with-text.hbs +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/double-click-action.hbs +7 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/frame-enter-action.hbs +3 -6
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-action.hbs +6 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +4 -3
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/table-paginate-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/unknown-element-action.hbs +9 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/have-value-assertion.hbs +34 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +14 -6
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/go-back-action.hbs +21 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/long-press-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/pinch-zoom-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/set-geolocation-action.hbs +16 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/partials/locator.hbs +9 -1
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +62 -23
- package/dist/generators/test-generator/adapters/index.d.ts +1 -1
- package/dist/generators/test-generator/adapters/index.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/playwright/playwright-adapter.d.ts +4 -19
- package/dist/generators/test-generator/adapters/playwright/playwright-adapter.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/playwright/playwright-adapter.js.map +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/after-all.hbs +19 -1
- package/dist/generators/test-generator/adapters/playwright/templates/after-each.hbs +18 -0
- package/dist/generators/test-generator/adapters/playwright/templates/before-all.hbs +19 -1
- package/dist/generators/test-generator/adapters/playwright/templates/imports.hbs +3 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/check-action.hbs +6 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/click-at-position-action.hbs +23 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/expand-action.hbs +8 -8
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/fill-editor-action.hbs +7 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row-nth.hbs +7 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row.hbs +7 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/table-paginate-action.hbs +5 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/uncheck-action.hbs +3 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/unknown-element-action.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/wait-for-page.hbs +18 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-assertion.hbs +32 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/checked-assertion.hbs +5 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/column-cell-assertion.hbs +13 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +2 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-variable-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/have-text-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +2 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-variable-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/not-checked-assertion.hbs +2 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/selected-assertion.hbs +21 -3
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/state-with-filter-assertion.hbs +20 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-empty.hbs +4 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-match-data.hbs +4 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-count.hbs +4 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-exists.hbs +12 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-not-exists.hbs +14 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +3 -3
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-value-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-variable-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/checked-opts.hbs +8 -0
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-base.hbs +8 -8
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-nth.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/id.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/testid.hbs +1 -1
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator.hbs +8 -8
- package/dist/generators/test-generator/adapters/playwright/templates/test-file.hbs +10 -8
- package/dist/generators/test-generator/code-generator.d.ts +37 -0
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +165 -40
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +116 -6
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +115 -5
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/index.d.ts +57 -11
- package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/index.js +163 -21
- package/dist/generators/test-generator/patterns/index.js.map +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts +8 -0
- package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/with-parent-scope.d.ts +18 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.d.ts.map +1 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.js +40 -0
- package/dist/generators/test-generator/patterns/with-parent-scope.js.map +1 -0
- package/dist/generators/test-generator/step-mapper.d.ts +103 -10
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +266 -45
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/generators/test-generator/template-engine.d.ts +4 -19
- package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
- package/dist/generators/test-generator/template-engine.js +17 -12
- package/dist/generators/test-generator/template-engine.js.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.d.ts +7 -0
- package/dist/generators/test-generator/utils/data-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.js +19 -2
- package/dist/generators/test-generator/utils/data-resolver.js.map +1 -1
- package/dist/generators/test-generator/utils/dialog-scope-identity.d.ts +41 -0
- package/dist/generators/test-generator/utils/dialog-scope-identity.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/dialog-scope-identity.js +61 -0
- package/dist/generators/test-generator/utils/dialog-scope-identity.js.map +1 -0
- package/dist/generators/test-generator/utils/escape-js-string.d.ts +17 -0
- package/dist/generators/test-generator/utils/escape-js-string.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/escape-js-string.js +29 -0
- package/dist/generators/test-generator/utils/escape-js-string.js.map +1 -0
- package/dist/generators/test-generator/utils/nearest-match.d.ts +24 -0
- package/dist/generators/test-generator/utils/nearest-match.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/nearest-match.js +56 -0
- package/dist/generators/test-generator/utils/nearest-match.js.map +1 -0
- package/dist/generators/test-generator/utils/selector-entry-fields.d.ts +58 -0
- package/dist/generators/test-generator/utils/selector-entry-fields.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/selector-entry-fields.js +119 -0
- package/dist/generators/test-generator/utils/selector-entry-fields.js.map +1 -0
- package/dist/generators/test-generator/utils/selector-entry-walk.d.ts +25 -0
- package/dist/generators/test-generator/utils/selector-entry-walk.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/selector-entry-walk.js +54 -0
- package/dist/generators/test-generator/utils/selector-entry-walk.js.map +1 -0
- package/dist/generators/test-generator/utils/selector-nth-validation.d.ts +59 -0
- package/dist/generators/test-generator/utils/selector-nth-validation.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/selector-nth-validation.js +91 -0
- package/dist/generators/test-generator/utils/selector-nth-validation.js.map +1 -0
- package/dist/generators/test-generator/utils/selector-resolver.d.ts +53 -2
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +273 -27
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-type-validation.d.ts +51 -0
- package/dist/generators/test-generator/utils/selector-type-validation.d.ts.map +1 -0
- package/dist/generators/test-generator/utils/selector-type-validation.js +77 -0
- package/dist/generators/test-generator/utils/selector-type-validation.js.map +1 -0
- package/dist/harness/audit.d.ts +3 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +51 -28
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability-plan.d.ts +4 -0
- package/dist/harness/capability-plan.d.ts.map +1 -1
- package/dist/harness/capability-plan.js +32 -2
- package/dist/harness/capability-plan.js.map +1 -1
- package/dist/harness/catalog/drivers.yaml +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +145 -0
- package/dist/harness/data-driven-lint.d.ts.map +1 -1
- package/dist/harness/data-driven-lint.js +217 -33
- package/dist/harness/data-driven-lint.js.map +1 -1
- package/dist/harness/parse.d.ts +6 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +1 -1
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/repair.d.ts.map +1 -1
- package/dist/harness/repair.js +8 -1
- package/dist/harness/repair.js.map +1 -1
- package/dist/harness/script-check.d.ts +2 -2
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +186 -25
- package/dist/harness/script-check.js.map +1 -1
- package/dist/harness/sensors.d.ts +48 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +26 -1
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/viewpoint-ledger.d.ts +10 -0
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +23 -2
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/project-initializer.d.ts +6 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +16 -0
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/report-sanitize-reporter-install.d.ts +24 -0
- package/dist/orchestrator/report-sanitize-reporter-install.d.ts.map +1 -0
- package/dist/orchestrator/report-sanitize-reporter-install.js +161 -0
- package/dist/orchestrator/report-sanitize-reporter-install.js.map +1 -0
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +4 -3
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +9 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-api-coverage-model/SKILL.md +10 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -5
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +62 -3
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +126 -11
- package/dist/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +16 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +12 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +19 -5
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +88 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +62 -5
- package/dist/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md +13 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +59 -10
- package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-f-mobile-native.md +419 -0
- package/dist/orchestrator/templates/playwright.config.ts +7 -0
- package/dist/orchestrator/templates/readme.md +1 -1
- package/dist/orchestrator/templates/specs-checked-state.d.ts +83 -0
- package/dist/orchestrator/templates/specs-checked-state.d.ts.map +1 -0
- package/dist/orchestrator/templates/specs-checked-state.js +261 -0
- package/dist/orchestrator/templates/specs-checked-state.js.map +1 -0
- package/dist/orchestrator/templates/specs-checked-state.ts +324 -0
- package/dist/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.d.ts +36 -0
- package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.d.ts.map +1 -0
- package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.js +155 -0
- package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.js.map +1 -0
- package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.ts +142 -0
- package/dist/orchestrator/templates/specs-url-assert.d.ts +50 -25
- package/dist/orchestrator/templates/specs-url-assert.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.js +65 -24
- package/dist/orchestrator/templates/specs-url-assert.js.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.ts +101 -28
- package/dist/orchestrator/templates/wdio.conf.ts +105 -1
- package/dist/utils/selector-types.d.ts +43 -1
- package/dist/utils/selector-types.d.ts.map +1 -1
- package/dist/utils/selector-types.js +51 -7
- package/dist/utils/selector-types.js.map +1 -1
- package/package.json +3 -3
- package/src/capabilities/discover.ts +146 -10
- package/src/capabilities/registry.ts +30 -0
- package/src/cli/commands/audit.ts +9 -0
- package/src/cli/commands/capability.ts +1 -1
- package/src/cli/commands/delivery.ts +2 -1
- package/src/cli/commands/generate.ts +5 -2
- package/src/cli/commands/inspect.ts +1 -1
- package/src/cli/commands/results-merge.ts +9 -2
- package/src/cli/commands/results-sanitize.ts +98 -0
- package/src/cli/commands/script-check.ts +3 -1
- package/src/cli/commands/update.ts +3 -0
- package/src/dashboard/templates/index.html +1 -1
- package/src/exporters/api-testcase-formatter.ts +5 -7
- package/src/exporters/feature-parser.ts +1 -1
- package/src/exporters/matrix/build.ts +17 -3
- package/src/exporters/matrix/item-labels.ts +78 -0
- package/src/exporters/matrix/render-coverage-sheet.ts +170 -0
- package/src/exporters/matrix/render-csv.ts +3 -1
- package/src/exporters/matrix/render-overview-sheet.ts +51 -0
- package/src/exporters/matrix/render-testcase-sheet.ts +178 -0
- package/src/exporters/matrix/render-xlsx.ts +67 -448
- package/src/exporters/matrix/result-totals.ts +37 -0
- package/src/exporters/matrix/testcase-summary-band.ts +74 -0
- package/src/exporters/matrix/wording.ts +13 -0
- package/src/exporters/matrix/xlsx-cells.ts +56 -0
- package/src/exporters/qa-env-secret-denylist.ts +1 -1
- package/src/exporters/report-path-sanitizer.ts +144 -0
- package/src/exporters/result-variants.ts +2 -1
- package/src/exporters/sensitive-key.ts +48 -0
- package/src/exporters/test-data-resolver.ts +12 -2
- package/src/exporters/xlsx-report-builder.ts +16 -2
- package/src/generators/gherkin-parser/index.ts +22 -11
- package/src/generators/gherkin-parser/parent-scope-clause.ts +130 -0
- package/src/generators/test-generator/adapters/adapter-interface.ts +25 -3
- package/src/generators/test-generator/adapters/appium/appium-adapter.ts +4 -4
- package/src/generators/test-generator/adapters/appium/os-support.ts +176 -0
- package/src/generators/test-generator/adapters/appium/templates/after-all.hbs +18 -0
- package/src/generators/test-generator/adapters/appium/templates/after-each.hbs +18 -0
- package/src/generators/test-generator/adapters/appium/templates/before-all.hbs +18 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/alert-fill-action.hbs +9 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +24 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-at-position-action.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-element-with-text.hbs +1 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/double-click-action.hbs +7 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/frame-enter-action.hbs +3 -6
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-action.hbs +6 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +4 -3
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/table-paginate-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/unknown-element-action.hbs +9 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/have-value-assertion.hbs +34 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +14 -6
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/go-back-action.hbs +21 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/long-press-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/pinch-zoom-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/set-geolocation-action.hbs +16 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/partials/locator.hbs +9 -1
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +62 -23
- package/src/generators/test-generator/adapters/index.ts +1 -1
- package/src/generators/test-generator/adapters/playwright/playwright-adapter.ts +4 -4
- package/src/generators/test-generator/adapters/playwright/templates/after-all.hbs +19 -1
- package/src/generators/test-generator/adapters/playwright/templates/after-each.hbs +18 -0
- package/src/generators/test-generator/adapters/playwright/templates/before-all.hbs +19 -1
- package/src/generators/test-generator/adapters/playwright/templates/imports.hbs +3 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/check-action.hbs +6 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/click-at-position-action.hbs +23 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/expand-action.hbs +8 -8
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/fill-editor-action.hbs +7 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row-nth.hbs +7 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row.hbs +7 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/table-paginate-action.hbs +5 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/uncheck-action.hbs +3 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/unknown-element-action.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/wait-for-page.hbs +18 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-assertion.hbs +32 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/checked-assertion.hbs +5 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/column-cell-assertion.hbs +13 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +2 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-variable-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/have-text-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +2 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-variable-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/not-checked-assertion.hbs +2 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/selected-assertion.hbs +21 -3
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/state-with-filter-assertion.hbs +20 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-empty.hbs +4 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-match-data.hbs +4 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-count.hbs +4 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-exists.hbs +12 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-not-exists.hbs +14 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +3 -3
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-value-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-variable-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/checked-opts.hbs +8 -0
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-base.hbs +8 -8
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-nth.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/id.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/testid.hbs +1 -1
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator.hbs +8 -8
- package/src/generators/test-generator/adapters/playwright/templates/test-file.hbs +10 -8
- package/src/generators/test-generator/code-generator.ts +181 -46
- package/src/generators/test-generator/diagnostics.ts +117 -6
- package/src/generators/test-generator/patterns/index.ts +175 -24
- package/src/generators/test-generator/patterns/types.ts +8 -0
- package/src/generators/test-generator/patterns/with-parent-scope.ts +41 -0
- package/src/generators/test-generator/step-mapper.ts +277 -43
- package/src/generators/test-generator/template-engine.ts +21 -21
- package/src/generators/test-generator/utils/data-resolver.ts +23 -2
- package/src/generators/test-generator/utils/dialog-scope-identity.ts +71 -0
- package/src/generators/test-generator/utils/escape-js-string.ts +24 -0
- package/src/generators/test-generator/utils/nearest-match.ts +55 -0
- package/src/generators/test-generator/utils/selector-entry-fields.ts +131 -0
- package/src/generators/test-generator/utils/selector-entry-walk.ts +58 -0
- package/src/generators/test-generator/utils/selector-nth-validation.ts +99 -0
- package/src/generators/test-generator/utils/selector-resolver.ts +333 -28
- package/src/generators/test-generator/utils/selector-type-validation.ts +87 -0
- package/src/harness/audit.ts +55 -30
- package/src/harness/capability-plan.ts +33 -1
- package/src/harness/catalog/drivers.yaml +1 -1
- package/src/harness/catalog/universal-viewpoints.yaml +145 -0
- package/src/harness/data-driven-lint.ts +192 -32
- package/src/harness/parse.ts +7 -1
- package/src/harness/repair.ts +8 -1
- package/src/harness/script-check.ts +186 -21
- package/src/harness/sensors.ts +75 -1
- package/src/harness/viewpoint-ledger.ts +26 -5
- package/src/index.ts +7 -0
- package/src/orchestrator/project-initializer.ts +17 -0
- package/src/orchestrator/report-sanitize-reporter-install.ts +109 -0
- package/src/orchestrator/templates/ai-src/commands/delivery.md +4 -3
- package/src/orchestrator/templates/ai-src/commands/run-test.md +9 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-api-coverage-model/SKILL.md +10 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -5
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +62 -3
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +126 -11
- package/src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +16 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +12 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +19 -5
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +88 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +62 -5
- package/src/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md +13 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +59 -10
- package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-f-mobile-native.md +419 -0
- package/src/orchestrator/templates/playwright.config.ts +7 -0
- package/src/orchestrator/templates/readme.md +1 -1
- package/src/orchestrator/templates/specs-checked-state.ts +324 -0
- package/src/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/src/orchestrator/templates/specs-report-path-sanitize-reporter.ts +142 -0
- package/src/orchestrator/templates/specs-url-assert.ts +101 -28
- package/src/orchestrator/templates/wdio.conf.ts +105 -1
- package/src/utils/selector-types.ts +54 -5
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
* SG-W002 — step parsed a {{dataRef}} value but the generated code never uses it
|
|
11
11
|
* SG-W003 — `name` filter defaulted from the Gherkin reference on a name-from-content
|
|
12
12
|
* role (status/alert/…) — such a filter can never match; opt out with `name: null`
|
|
13
|
+
* SG-W004 — a selectors.yaml entry declares a field no consumer reads, so writing it has no
|
|
14
|
+
* effect on the generated test. Reserved for this in the original diagnostics spec
|
|
15
|
+
* (`exact: true` with no construct it applies to) and implemented for the wider class
|
|
16
|
+
* by #712, where `pagination:` and `contenteditable:` were public, documented,
|
|
17
|
+
* plumbed — and read by nothing. The field partition lives in
|
|
18
|
+
* utils/selector-entry-fields.ts; a field added there without a named consumer is
|
|
19
|
+
* the bug this code exists to catch.
|
|
13
20
|
* SG-W005 — qa/app.yaml problem (unknown key, unknown preset, unparseable)
|
|
14
21
|
* SG-W006 — qa/app.<env>.yaml found (per-environment profiles are unsupported by design)
|
|
15
22
|
* SG-W007 — browser-alert handler step written AFTER an action step: the listener
|
|
@@ -45,6 +52,12 @@
|
|
|
45
52
|
* "3 cards are shown" gets an assertion that can only pass if the card's text
|
|
46
53
|
* IS the digit. Count semantics exist on row/table ("see [T] table with {{n}}",
|
|
47
54
|
* "see [Ref] row with {{n}}") and lists ("should have count") only
|
|
55
|
+
* SG-W016 — a table step on a table located by CSS/testid whose value does not mention `table`
|
|
56
|
+
* and that declares no `rows:`. The table templates find rows by `getByRole('row')`;
|
|
57
|
+
* on a <div> list that is 0 elements, so `is hidden` / `is empty` pass without checking
|
|
58
|
+
* anything and counts/clicks time out (issue #688). A heuristic — the compiler cannot
|
|
59
|
+
* see the DOM — so a warning that names both ways out: `rows: '<row shape>'` on the
|
|
60
|
+
* table entry, or `role: table`. Once per table per feature
|
|
48
61
|
* SG-E024 — a mobile app-lifecycle step (restart / reinstall) in a feature that declares no
|
|
49
62
|
* `Path:` app id. The templates resolve the app through a helper the test-file only
|
|
50
63
|
* emits when the id is present, so the spec used to compile clean and then die at
|
|
@@ -53,6 +66,23 @@
|
|
|
53
66
|
* but the generated code is a BARE VISIBILITY check: the clause was swallowed by the
|
|
54
67
|
* catch-all and the test would pass whatever the element says. Four separate defects
|
|
55
68
|
* have arrived this way, so the step compiles to a runtime throw instead.
|
|
69
|
+
* SG-W017 — a step needs a selector-entry field the entry does not declare, so there is nothing
|
|
70
|
+
* honest to compile. Today: a table paginate step whose table declares no
|
|
71
|
+
* `pagination.next`/`.prev` (#712). The mirror of SG-W004 — that one reports a field
|
|
72
|
+
* written that nothing reads, this one a field a consumer needs that nobody wrote.
|
|
73
|
+
* Compiles the step to a loud runtime throw rather than guessing a locator, which is
|
|
74
|
+
* the #690 failure (a locator no page has, failing far from the cause).
|
|
75
|
+
* SG-W018 — a selectors.yaml entry declares an `nth:` the compiler cannot use (#720). `nth:` was
|
|
76
|
+
* the one entry field whose VALUE nothing checked: the key is known (SG-W004 quiet) and
|
|
77
|
+
* the `type:` is valid (SG-E027 quiet), so `nth: -1`, `nth: 'last'`, `nth: 1.5` and
|
|
78
|
+
* `nth: -2` all compiled clean — the web side dropped the filter entirely (identical to
|
|
79
|
+
* deleting the line, then a strict-mode violation naming the DOM) while the mobile side
|
|
80
|
+
* emitted `$$('~x')[-1]` / `[last]`, undefined-indexing and a bare identifier that even
|
|
81
|
+
* the SG-E022 parse check reads as valid JavaScript. The contract is an integer `>= -1`
|
|
82
|
+
* (`0..N` a zero-based index, `-1` the last match); anything else is normalised away
|
|
83
|
+
* before it reaches a template, and reported here so "ignored" is stated rather than
|
|
84
|
+
* discovered. A warning, on SG-W004's reasoning — the value is inert once dropped and
|
|
85
|
+
* `--strict` already turns the channel non-zero
|
|
56
86
|
* SG-E020 — the step matched a pattern whose template the ACTIVE adapter does not ship. Before
|
|
57
87
|
* the platform SPI this was an unhandled `Template not found` that killed the WHOLE
|
|
58
88
|
* feature file and named neither the step nor the adapter. The step now compiles to a
|
|
@@ -74,7 +104,10 @@
|
|
|
74
104
|
* (11), the clause vanished, and the step compiled to `toHaveURL(...)` — asserting the
|
|
75
105
|
* page IS displayed, the exact opposite of what it reads as, and passing while doing so.
|
|
76
106
|
* The pattern layer declares what it accounts for via `StepPattern.states`; anything
|
|
77
|
-
* undeclared reports here and compiles to a loud `throw
|
|
107
|
+
* undeclared reports here and compiles to a loud `throw`. One shape is NOT the author's:
|
|
108
|
+
* a pattern NAMED for the state (`is-hidden`) with no `states` at all is a
|
|
109
|
+
* @sungen/driver-* older than core — the message then names `sungen update` as the
|
|
110
|
+
* fix, and discovery prefers core's own copy of a bundled driver over a stale project one
|
|
78
111
|
* SG-W022 — a `page` assertion on the mobile adapter that emitted NO executable code. A native app
|
|
79
112
|
* has no URL, so `Then User see [X] page` compiles to a bare comment: the step reads as
|
|
80
113
|
* an assertion, checks nothing, and the scenario PASSES regardless. Worse than the
|
|
@@ -91,6 +124,40 @@
|
|
|
91
124
|
* mobile suite already carrying one of these steps. The remedy is a feature-level reset
|
|
92
125
|
* tier (`@reset:data`), which is what the message names — app state is reset between
|
|
93
126
|
* scenarios in the `beforeEach` hook, not mid-scenario by a step.
|
|
127
|
+
* SG-E025 — a feature that declares `@platform:ios` uses a step the Appium adapter does NOT serve
|
|
128
|
+
* on iOS. The template ships and the step compiles, so nothing about the feature file
|
|
129
|
+
* looks wrong; on a simulator it either throws deep in the run (set-connectivity,
|
|
130
|
+
* location-services, open-notifications) or — worse — silently does nothing
|
|
131
|
+
* (hide-keyboard, guarded `if (!driver.isIOS …)`). Derived from the template body via
|
|
132
|
+
* the per-OS axis of the step-support matrix, so it cannot disagree with the adapter.
|
|
133
|
+
* SCOPE, stated plainly because the name oversells it: only `@platform:ios` is caught.
|
|
134
|
+
* A feature tagged `@platform:mobile` runs on whichever OS `MOBILE_PLATFORM` selects at
|
|
135
|
+
* RUN time, so the compiler cannot know — the matrix, not this code, is the net that
|
|
136
|
+
* covers that case. Reported as an E-code and compiled to a loud throw, because the
|
|
137
|
+
* feature has declared the one OS where the step is known not to work.
|
|
138
|
+
* SG-E026 — a click step names a POSITION (`at position "top-left"`, `at offset x=…, y=…`) that
|
|
139
|
+
* would not be honoured: the keyword is misspelt, a value is outside the grammar (not a
|
|
140
|
+
* number, negative, above 100%, a missing axis, an unknown preset), or another click form
|
|
141
|
+
* claimed the step first (`try to click`, a `with {{v}}` text filter, `… and accept [OK]
|
|
142
|
+
* alert`). Each of those would compile to a click on the element's CENTRE and pass — for a
|
|
143
|
+
* backdrop-dismiss overlay that is the one outcome that proves nothing — so the step
|
|
144
|
+
* compiles to a loud throw instead
|
|
145
|
+
* SG-W026 — a mobile ACTIVE-NAVIGATION step that emitted NO executable code, so a promised screen
|
|
146
|
+
* change never happens. `When User open [Settings] page` compiles to the one-line
|
|
147
|
+
* `navigation` template — a comment noting the app was already launched by the wdio
|
|
148
|
+
* capabilities — so the step reads as "go to Settings" and goes nowhere. Pair it with a
|
|
149
|
+
* `page` assertion (itself a no-op, reported as SG-W022) and the scenario passes without
|
|
150
|
+
* ever touching the app. Completes a half-finished class: `route-assertion` already
|
|
151
|
+
* throws and `page-assertion` already reports W022; only `navigation` was silent.
|
|
152
|
+
* Scoped to the ACTIVE forms (`open [X] page`, `navigate to [X] page`). The `is on [X]
|
|
153
|
+
* page|screen` anchor is EXCLUDED on purpose: that is mobile's app-launch directive and
|
|
154
|
+
* its empty output is correct, so warning on it would cry wolf on valid features — and a
|
|
155
|
+
* diagnostic that cries wolf gets filtered out, taking the real ones with it.
|
|
156
|
+
* Like W021/W022/W023 this stays a WARNING by default. `generate --strict` already fails
|
|
157
|
+
* on ANY diagnostic, so this code is blocking under it from the day it lands — which
|
|
158
|
+
* means a project running --strict today with an `open [X] page` step starts failing.
|
|
159
|
+
* That is the intended outcome (the step was never navigating), but it is a migration
|
|
160
|
+
* step, not a silent one: the message names the tap/gesture rewrite.
|
|
94
161
|
* SG-W024 — two or more scenarios in one feature share a name and at least ONE carries a `@reset:`
|
|
95
162
|
* tag. The generated per-scenario lookup is keyed on the scenario NAME (a @cases title is
|
|
96
163
|
* built at runtime, so no compile-time key can match the rendered title), so every
|
|
@@ -101,6 +168,15 @@
|
|
|
101
168
|
* Reported rather than resolved by precedence — two tests genuinely sharing one title
|
|
102
169
|
* cannot be told apart by a name-keyed lookup, so the only honest fix is a rename. Silently
|
|
103
170
|
* picking a winner would be the same silent-discard shape as SG-W021
|
|
171
|
+
* SG-E027 — a selectors.yaml entry declares a `type:` that is not a selector type at all. YAML is
|
|
172
|
+
* untyped at run time, so `type: 'testId'` (capital I), `'xpth'`, `'rol'` or any other
|
|
173
|
+
* misspelling used to compile clean and resolve through the strategy switch's
|
|
174
|
+
* `default:` branch as `getByPlaceholder('<the value>')` — a locator that cannot
|
|
175
|
+
* match, failing much later as a timeout naming placeholder text the author never
|
|
176
|
+
* wrote. Checked where the selector FILE is loaded rather than in the switch: `page`
|
|
177
|
+
* legitimately reaches that `default:` on every page assertion, and the load point can
|
|
178
|
+
* name the entry key and the nearest valid spelling. Reported once per entry, and
|
|
179
|
+
* every step naming that entry compiles to a `throw`
|
|
104
180
|
* SG-E022 — the generated spec is not parseable JS/TS, so NOTHING in the file runs — Playwright
|
|
105
181
|
* reports one SyntaxError and every scenario in the unit is lost. A compiler self-check
|
|
106
182
|
* (@babel/parser) on the emitted code, added after a field report where the runtime-data
|
|
@@ -109,15 +185,49 @@
|
|
|
109
185
|
* compiler, not the Gherkin: it should be impossible, and it is reported so a broken
|
|
110
186
|
* build names itself at generate time instead of one step further downstream
|
|
111
187
|
*
|
|
188
|
+
* SG-W028 — a step's trailing scope clause was DROPPED, so the step runs against more of the page
|
|
189
|
+
* than its sentence names. Two causes, one code: the `<word>` after `in [X]` is not a
|
|
190
|
+
* container type (a typo, or a leaf element used as a parent), or the by-content form
|
|
191
|
+
* `in [X] <type> with {{v}}` was written for the mobile adapter, which chains a parent
|
|
192
|
+
* element and has no content filter. Before this, both compiled clean and silently
|
|
193
|
+
* 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)
|
|
195
|
+
* SG-W029 — a mobile (appium) feature compiled with NO usable app-package `Path:` — either the line
|
|
196
|
+
* is missing outright, or it holds a web-style route (`Path: /applied-jobs`) that the
|
|
197
|
+
* package guard rejects. Both used to be silent, and both cost the same two things: the
|
|
198
|
+
* per-scenario `beforeEach` was not emitted at all, so Background dropped to Mocha's
|
|
199
|
+
* `before()` (once per FILE, every scenario sharing one continuous app session — a tab
|
|
200
|
+
* switch or a scroll in one scenario stranding elements off-screen for every later one),
|
|
201
|
+
* and the `@reset:` tier ladder went with it, leaving the tag inert. The spec now always
|
|
202
|
+
* emits the reset machinery and resolves the app id from the session capability that
|
|
203
|
+
* wdio.conf sets, throwing a named error when nothing supplies one — so this is a
|
|
204
|
+
* warning about an under-declared feature file, not a broken build (#669)
|
|
205
|
+
* SG-W030 — a selectors.yaml `expanded.class`/`expanded.attribute` carries a character outside the
|
|
206
|
+
* accepted class/attribute-name set (whitespace, a quote, a backslash, `$`, `{`, `}`).
|
|
207
|
+
* The value is pasted into the generated spec (string literal, regex, classList argument),
|
|
208
|
+
* and selectors.yaml is often generated from the page under test, so it is refused and the
|
|
209
|
+
* field dropped — the step falls back to driving/asserting `aria-expanded`. Reported once
|
|
210
|
+
* per entry and field. A WARNING rather than a refusal because the fallback still tests
|
|
211
|
+
* something; the checked/selected signal has no fallback and is refused outright instead
|
|
212
|
+
*
|
|
213
|
+
* SG-E031 — a selectors.yaml `checked:`/`selected:` declaration the compiler refuses: the two
|
|
214
|
+
* spellings disagree, a class token or attribute name carries whitespace/a quote/a
|
|
215
|
+
* backslash, or one entry declares both a class and an attribute. Each is silent at run
|
|
216
|
+
* time — the matcher would never match and the step would time out blaming the
|
|
217
|
+
* component — so the declaration is refused rather than compiled. Unlike the expanded
|
|
218
|
+
* signal (SG-W030) it is not dropped-and-warned: with no signal the step is back on the
|
|
219
|
+
* failure the declaration exists to fix. Recorded here AND thrown, so a pattern that
|
|
220
|
+
* resolves selectors inside a `catch` cannot swallow it silently
|
|
112
221
|
* Diagnostics never change the EXIT CODE by themselves; `sungen generate --strict` turns any
|
|
113
222
|
* collected diagnostic into a non-zero exit. They are not all inert, though: SG-W001, SG-W011,
|
|
114
|
-
* SG-E020, SG-E021, SG-W020, SG-E023
|
|
115
|
-
* `throw
|
|
116
|
-
*
|
|
117
|
-
*
|
|
223
|
+
* SG-E020, SG-E021, SG-W020, SG-E023, SG-E024, SG-E025, SG-E026 and SG-E027 additionally compile
|
|
224
|
+
* the offending step to a runtime `throw` — a step that reads as a check and silently checks
|
|
225
|
+
* nothing is worse than one that fails loudly — and SG-E031 refuses the file outright. (SG-E022 is
|
|
226
|
+
* the one exception to the "blame the Gherkin" rule and throws nothing: the file is still written
|
|
227
|
+
* so the user keeps the artifact to inspect.)
|
|
118
228
|
* Generation always COMPLETES — the rest of the scenario and the rest of the file still compile.
|
|
119
229
|
*/
|
|
120
|
-
export type DiagnosticCode = 'SG-W001' | 'SG-W002' | 'SG-W003' | 'SG-W005' | 'SG-W006' | 'SG-W007' | 'SG-W008' | 'SG-W009' | 'SG-W010' | 'SG-W011' | 'SG-W012' | 'SG-W013' | 'SG-W014' | 'SG-W015' | 'SG-E020' | 'SG-E021' | 'SG-W020' | 'SG-W021' | 'SG-W022' | 'SG-W023' | 'SG-W024' | 'SG-E022' | 'SG-E023' | 'SG-E024';
|
|
230
|
+
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';
|
|
121
231
|
export interface Diagnostic {
|
|
122
232
|
code: DiagnosticCode;
|
|
123
233
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoOG;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,CAAC;AAE3c,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"}
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
* SG-W002 — step parsed a {{dataRef}} value but the generated code never uses it
|
|
12
12
|
* SG-W003 — `name` filter defaulted from the Gherkin reference on a name-from-content
|
|
13
13
|
* role (status/alert/…) — such a filter can never match; opt out with `name: null`
|
|
14
|
+
* SG-W004 — a selectors.yaml entry declares a field no consumer reads, so writing it has no
|
|
15
|
+
* effect on the generated test. Reserved for this in the original diagnostics spec
|
|
16
|
+
* (`exact: true` with no construct it applies to) and implemented for the wider class
|
|
17
|
+
* by #712, where `pagination:` and `contenteditable:` were public, documented,
|
|
18
|
+
* plumbed — and read by nothing. The field partition lives in
|
|
19
|
+
* utils/selector-entry-fields.ts; a field added there without a named consumer is
|
|
20
|
+
* the bug this code exists to catch.
|
|
14
21
|
* SG-W005 — qa/app.yaml problem (unknown key, unknown preset, unparseable)
|
|
15
22
|
* SG-W006 — qa/app.<env>.yaml found (per-environment profiles are unsupported by design)
|
|
16
23
|
* SG-W007 — browser-alert handler step written AFTER an action step: the listener
|
|
@@ -46,6 +53,12 @@
|
|
|
46
53
|
* "3 cards are shown" gets an assertion that can only pass if the card's text
|
|
47
54
|
* IS the digit. Count semantics exist on row/table ("see [T] table with {{n}}",
|
|
48
55
|
* "see [Ref] row with {{n}}") and lists ("should have count") only
|
|
56
|
+
* SG-W016 — a table step on a table located by CSS/testid whose value does not mention `table`
|
|
57
|
+
* and that declares no `rows:`. The table templates find rows by `getByRole('row')`;
|
|
58
|
+
* on a <div> list that is 0 elements, so `is hidden` / `is empty` pass without checking
|
|
59
|
+
* anything and counts/clicks time out (issue #688). A heuristic — the compiler cannot
|
|
60
|
+
* see the DOM — so a warning that names both ways out: `rows: '<row shape>'` on the
|
|
61
|
+
* table entry, or `role: table`. Once per table per feature
|
|
49
62
|
* SG-E024 — a mobile app-lifecycle step (restart / reinstall) in a feature that declares no
|
|
50
63
|
* `Path:` app id. The templates resolve the app through a helper the test-file only
|
|
51
64
|
* emits when the id is present, so the spec used to compile clean and then die at
|
|
@@ -54,6 +67,23 @@
|
|
|
54
67
|
* but the generated code is a BARE VISIBILITY check: the clause was swallowed by the
|
|
55
68
|
* catch-all and the test would pass whatever the element says. Four separate defects
|
|
56
69
|
* have arrived this way, so the step compiles to a runtime throw instead.
|
|
70
|
+
* SG-W017 — a step needs a selector-entry field the entry does not declare, so there is nothing
|
|
71
|
+
* honest to compile. Today: a table paginate step whose table declares no
|
|
72
|
+
* `pagination.next`/`.prev` (#712). The mirror of SG-W004 — that one reports a field
|
|
73
|
+
* written that nothing reads, this one a field a consumer needs that nobody wrote.
|
|
74
|
+
* Compiles the step to a loud runtime throw rather than guessing a locator, which is
|
|
75
|
+
* the #690 failure (a locator no page has, failing far from the cause).
|
|
76
|
+
* SG-W018 — a selectors.yaml entry declares an `nth:` the compiler cannot use (#720). `nth:` was
|
|
77
|
+
* the one entry field whose VALUE nothing checked: the key is known (SG-W004 quiet) and
|
|
78
|
+
* the `type:` is valid (SG-E027 quiet), so `nth: -1`, `nth: 'last'`, `nth: 1.5` and
|
|
79
|
+
* `nth: -2` all compiled clean — the web side dropped the filter entirely (identical to
|
|
80
|
+
* deleting the line, then a strict-mode violation naming the DOM) while the mobile side
|
|
81
|
+
* emitted `$$('~x')[-1]` / `[last]`, undefined-indexing and a bare identifier that even
|
|
82
|
+
* the SG-E022 parse check reads as valid JavaScript. The contract is an integer `>= -1`
|
|
83
|
+
* (`0..N` a zero-based index, `-1` the last match); anything else is normalised away
|
|
84
|
+
* before it reaches a template, and reported here so "ignored" is stated rather than
|
|
85
|
+
* discovered. A warning, on SG-W004's reasoning — the value is inert once dropped and
|
|
86
|
+
* `--strict` already turns the channel non-zero
|
|
57
87
|
* SG-E020 — the step matched a pattern whose template the ACTIVE adapter does not ship. Before
|
|
58
88
|
* the platform SPI this was an unhandled `Template not found` that killed the WHOLE
|
|
59
89
|
* feature file and named neither the step nor the adapter. The step now compiles to a
|
|
@@ -75,7 +105,10 @@
|
|
|
75
105
|
* (11), the clause vanished, and the step compiled to `toHaveURL(...)` — asserting the
|
|
76
106
|
* page IS displayed, the exact opposite of what it reads as, and passing while doing so.
|
|
77
107
|
* The pattern layer declares what it accounts for via `StepPattern.states`; anything
|
|
78
|
-
* undeclared reports here and compiles to a loud `throw
|
|
108
|
+
* undeclared reports here and compiles to a loud `throw`. One shape is NOT the author's:
|
|
109
|
+
* a pattern NAMED for the state (`is-hidden`) with no `states` at all is a
|
|
110
|
+
* @sungen/driver-* older than core — the message then names `sungen update` as the
|
|
111
|
+
* fix, and discovery prefers core's own copy of a bundled driver over a stale project one
|
|
79
112
|
* SG-W022 — a `page` assertion on the mobile adapter that emitted NO executable code. A native app
|
|
80
113
|
* has no URL, so `Then User see [X] page` compiles to a bare comment: the step reads as
|
|
81
114
|
* an assertion, checks nothing, and the scenario PASSES regardless. Worse than the
|
|
@@ -92,6 +125,40 @@
|
|
|
92
125
|
* mobile suite already carrying one of these steps. The remedy is a feature-level reset
|
|
93
126
|
* tier (`@reset:data`), which is what the message names — app state is reset between
|
|
94
127
|
* scenarios in the `beforeEach` hook, not mid-scenario by a step.
|
|
128
|
+
* SG-E025 — a feature that declares `@platform:ios` uses a step the Appium adapter does NOT serve
|
|
129
|
+
* on iOS. The template ships and the step compiles, so nothing about the feature file
|
|
130
|
+
* looks wrong; on a simulator it either throws deep in the run (set-connectivity,
|
|
131
|
+
* location-services, open-notifications) or — worse — silently does nothing
|
|
132
|
+
* (hide-keyboard, guarded `if (!driver.isIOS …)`). Derived from the template body via
|
|
133
|
+
* the per-OS axis of the step-support matrix, so it cannot disagree with the adapter.
|
|
134
|
+
* SCOPE, stated plainly because the name oversells it: only `@platform:ios` is caught.
|
|
135
|
+
* A feature tagged `@platform:mobile` runs on whichever OS `MOBILE_PLATFORM` selects at
|
|
136
|
+
* RUN time, so the compiler cannot know — the matrix, not this code, is the net that
|
|
137
|
+
* covers that case. Reported as an E-code and compiled to a loud throw, because the
|
|
138
|
+
* feature has declared the one OS where the step is known not to work.
|
|
139
|
+
* SG-E026 — a click step names a POSITION (`at position "top-left"`, `at offset x=…, y=…`) that
|
|
140
|
+
* would not be honoured: the keyword is misspelt, a value is outside the grammar (not a
|
|
141
|
+
* number, negative, above 100%, a missing axis, an unknown preset), or another click form
|
|
142
|
+
* claimed the step first (`try to click`, a `with {{v}}` text filter, `… and accept [OK]
|
|
143
|
+
* alert`). Each of those would compile to a click on the element's CENTRE and pass — for a
|
|
144
|
+
* backdrop-dismiss overlay that is the one outcome that proves nothing — so the step
|
|
145
|
+
* compiles to a loud throw instead
|
|
146
|
+
* SG-W026 — a mobile ACTIVE-NAVIGATION step that emitted NO executable code, so a promised screen
|
|
147
|
+
* change never happens. `When User open [Settings] page` compiles to the one-line
|
|
148
|
+
* `navigation` template — a comment noting the app was already launched by the wdio
|
|
149
|
+
* capabilities — so the step reads as "go to Settings" and goes nowhere. Pair it with a
|
|
150
|
+
* `page` assertion (itself a no-op, reported as SG-W022) and the scenario passes without
|
|
151
|
+
* ever touching the app. Completes a half-finished class: `route-assertion` already
|
|
152
|
+
* throws and `page-assertion` already reports W022; only `navigation` was silent.
|
|
153
|
+
* Scoped to the ACTIVE forms (`open [X] page`, `navigate to [X] page`). The `is on [X]
|
|
154
|
+
* page|screen` anchor is EXCLUDED on purpose: that is mobile's app-launch directive and
|
|
155
|
+
* its empty output is correct, so warning on it would cry wolf on valid features — and a
|
|
156
|
+
* diagnostic that cries wolf gets filtered out, taking the real ones with it.
|
|
157
|
+
* Like W021/W022/W023 this stays a WARNING by default. `generate --strict` already fails
|
|
158
|
+
* on ANY diagnostic, so this code is blocking under it from the day it lands — which
|
|
159
|
+
* means a project running --strict today with an `open [X] page` step starts failing.
|
|
160
|
+
* That is the intended outcome (the step was never navigating), but it is a migration
|
|
161
|
+
* step, not a silent one: the message names the tap/gesture rewrite.
|
|
95
162
|
* SG-W024 — two or more scenarios in one feature share a name and at least ONE carries a `@reset:`
|
|
96
163
|
* tag. The generated per-scenario lookup is keyed on the scenario NAME (a @cases title is
|
|
97
164
|
* built at runtime, so no compile-time key can match the rendered title), so every
|
|
@@ -102,6 +169,15 @@
|
|
|
102
169
|
* Reported rather than resolved by precedence — two tests genuinely sharing one title
|
|
103
170
|
* cannot be told apart by a name-keyed lookup, so the only honest fix is a rename. Silently
|
|
104
171
|
* picking a winner would be the same silent-discard shape as SG-W021
|
|
172
|
+
* SG-E027 — a selectors.yaml entry declares a `type:` that is not a selector type at all. YAML is
|
|
173
|
+
* untyped at run time, so `type: 'testId'` (capital I), `'xpth'`, `'rol'` or any other
|
|
174
|
+
* misspelling used to compile clean and resolve through the strategy switch's
|
|
175
|
+
* `default:` branch as `getByPlaceholder('<the value>')` — a locator that cannot
|
|
176
|
+
* match, failing much later as a timeout naming placeholder text the author never
|
|
177
|
+
* wrote. Checked where the selector FILE is loaded rather than in the switch: `page`
|
|
178
|
+
* legitimately reaches that `default:` on every page assertion, and the load point can
|
|
179
|
+
* name the entry key and the nearest valid spelling. Reported once per entry, and
|
|
180
|
+
* every step naming that entry compiles to a `throw`
|
|
105
181
|
* SG-E022 — the generated spec is not parseable JS/TS, so NOTHING in the file runs — Playwright
|
|
106
182
|
* reports one SyntaxError and every scenario in the unit is lost. A compiler self-check
|
|
107
183
|
* (@babel/parser) on the emitted code, added after a field report where the runtime-data
|
|
@@ -110,12 +186,46 @@
|
|
|
110
186
|
* compiler, not the Gherkin: it should be impossible, and it is reported so a broken
|
|
111
187
|
* build names itself at generate time instead of one step further downstream
|
|
112
188
|
*
|
|
189
|
+
* SG-W028 — a step's trailing scope clause was DROPPED, so the step runs against more of the page
|
|
190
|
+
* than its sentence names. Two causes, one code: the `<word>` after `in [X]` is not a
|
|
191
|
+
* container type (a typo, or a leaf element used as a parent), or the by-content form
|
|
192
|
+
* `in [X] <type> with {{v}}` was written for the mobile adapter, which chains a parent
|
|
193
|
+
* element and has no content filter. Before this, both compiled clean and silently
|
|
194
|
+
* 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)
|
|
196
|
+
* SG-W029 — a mobile (appium) feature compiled with NO usable app-package `Path:` — either the line
|
|
197
|
+
* is missing outright, or it holds a web-style route (`Path: /applied-jobs`) that the
|
|
198
|
+
* package guard rejects. Both used to be silent, and both cost the same two things: the
|
|
199
|
+
* per-scenario `beforeEach` was not emitted at all, so Background dropped to Mocha's
|
|
200
|
+
* `before()` (once per FILE, every scenario sharing one continuous app session — a tab
|
|
201
|
+
* switch or a scroll in one scenario stranding elements off-screen for every later one),
|
|
202
|
+
* and the `@reset:` tier ladder went with it, leaving the tag inert. The spec now always
|
|
203
|
+
* emits the reset machinery and resolves the app id from the session capability that
|
|
204
|
+
* wdio.conf sets, throwing a named error when nothing supplies one — so this is a
|
|
205
|
+
* warning about an under-declared feature file, not a broken build (#669)
|
|
206
|
+
* SG-W030 — a selectors.yaml `expanded.class`/`expanded.attribute` carries a character outside the
|
|
207
|
+
* accepted class/attribute-name set (whitespace, a quote, a backslash, `$`, `{`, `}`).
|
|
208
|
+
* The value is pasted into the generated spec (string literal, regex, classList argument),
|
|
209
|
+
* and selectors.yaml is often generated from the page under test, so it is refused and the
|
|
210
|
+
* field dropped — the step falls back to driving/asserting `aria-expanded`. Reported once
|
|
211
|
+
* per entry and field. A WARNING rather than a refusal because the fallback still tests
|
|
212
|
+
* something; the checked/selected signal has no fallback and is refused outright instead
|
|
213
|
+
*
|
|
214
|
+
* SG-E031 — a selectors.yaml `checked:`/`selected:` declaration the compiler refuses: the two
|
|
215
|
+
* spellings disagree, a class token or attribute name carries whitespace/a quote/a
|
|
216
|
+
* backslash, or one entry declares both a class and an attribute. Each is silent at run
|
|
217
|
+
* time — the matcher would never match and the step would time out blaming the
|
|
218
|
+
* component — so the declaration is refused rather than compiled. Unlike the expanded
|
|
219
|
+
* signal (SG-W030) it is not dropped-and-warned: with no signal the step is back on the
|
|
220
|
+
* failure the declaration exists to fix. Recorded here AND thrown, so a pattern that
|
|
221
|
+
* resolves selectors inside a `catch` cannot swallow it silently
|
|
113
222
|
* Diagnostics never change the EXIT CODE by themselves; `sungen generate --strict` turns any
|
|
114
223
|
* collected diagnostic into a non-zero exit. They are not all inert, though: SG-W001, SG-W011,
|
|
115
|
-
* SG-E020, SG-E021, SG-W020, SG-E023
|
|
116
|
-
* `throw
|
|
117
|
-
*
|
|
118
|
-
*
|
|
224
|
+
* SG-E020, SG-E021, SG-W020, SG-E023, SG-E024, SG-E025, SG-E026 and SG-E027 additionally compile
|
|
225
|
+
* the offending step to a runtime `throw` — a step that reads as a check and silently checks
|
|
226
|
+
* nothing is worse than one that fails loudly — and SG-E031 refuses the file outright. (SG-E022 is
|
|
227
|
+
* the one exception to the "blame the Gherkin" rule and throws nothing: the file is still written
|
|
228
|
+
* so the user keeps the artifact to inspect.)
|
|
119
229
|
* Generation always COMPLETES — the rest of the scenario and the rest of the file still compile.
|
|
120
230
|
*/
|
|
121
231
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoOG;;;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"}
|
|
@@ -17,12 +17,18 @@ export { maskRefsForMatching, unsupportedStepCode };
|
|
|
17
17
|
* The rewrite is ADDITIVE — `tap` becomes `tap click`, it does not become `click`. Two reasons, and
|
|
18
18
|
* the first one cost a full golden run to learn:
|
|
19
19
|
*
|
|
20
|
-
* 1. `@sungen/driver-mobile`
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* 1. `@sungen/driver-mobile` can be registered on a WEB project. (It is NOT bundled — an earlier
|
|
21
|
+
* version of this comment said it was, which was never true: it is not in `BUNDLED_DRIVERS`
|
|
22
|
+
* and not a core dependency. Discovery simply loaded whatever it could resolve, which in this
|
|
23
|
+
* monorepo is everything; discovery now gates an opt-in platform driver by the project
|
|
24
|
+
* `platform:`, so this reaches web only when both drivers are present and no platform is
|
|
25
|
+
* declared.) Substituting the verb re-keys `mobile-tap` onto "click", where its
|
|
26
|
+
* priority 15 outranks the generic `click-element` (10) — so it captured every plain click on
|
|
27
|
+
* every WEB feature and relabelled it a tap. 8 golden fixtures caught it. Adding a verb instead
|
|
28
|
+
* of swapping one means text with no "tap" in it is returned untouched, so web output cannot
|
|
29
|
+
* change here BY CONSTRUCTION rather than by our vigilance. `platforms:` does not remove the
|
|
30
|
+
* need for that: `mobile-tap` resolves to `click-action`, which both adapters ship, so it is
|
|
31
|
+
* one of the two mobile patterns that must stay UNDECLARED.
|
|
26
32
|
* 2. Both vocabularies then see their own verb, and ordinary PRIORITY decides the winner —
|
|
27
33
|
* no matcher has to learn about the other. `tap … and accept alert` reaches
|
|
28
34
|
* `click-with-alert` (21); `tap … in [T] table row 2` reaches `table-action-in-row-nth` (19);
|
|
@@ -66,6 +72,19 @@ export declare class PatternRegistry {
|
|
|
66
72
|
/**
|
|
67
73
|
* SG-W020 — the matched pattern declares `platforms` and the active one is not among them.
|
|
68
74
|
*/
|
|
75
|
+
/**
|
|
76
|
+
* SG-E025 — the feature says `@platform:ios`, and the template it reached does not work there.
|
|
77
|
+
*
|
|
78
|
+
* Derived from the template body (`osSupportOfTemplate`), never from a list, so it cannot drift
|
|
79
|
+
* from the adapter the way a hand-kept table would. Two states are refused, for different
|
|
80
|
+
* reasons: `refuses` would throw deep inside a device run instead of at compile time, and `noop`
|
|
81
|
+
* would not fail at all — the step would run, do nothing, and the scenario would pass.
|
|
82
|
+
*
|
|
83
|
+
* Only an EXPLICIT `@platform:ios` is gated. `@platform:mobile` picks its OS from
|
|
84
|
+
* MOBILE_PLATFORM at run time, so gating it would mean guessing; the per-OS matrix columns are
|
|
85
|
+
* what cover that case, and they are the primary deliverable of this axis.
|
|
86
|
+
*/
|
|
87
|
+
private static iosUnsupported;
|
|
69
88
|
private static platformMiss;
|
|
70
89
|
/**
|
|
71
90
|
* SG-E021 — the step carries a trailing state clause the matched pattern does not account for.
|
|
@@ -83,20 +102,47 @@ export declare class PatternRegistry {
|
|
|
83
102
|
* close, and nothing catches it again.
|
|
84
103
|
*/
|
|
85
104
|
private static stateMiss;
|
|
105
|
+
/**
|
|
106
|
+
* The one SG-E021 that is NOT the author's to fix. A pattern NAMED for the state (`is-hidden`,
|
|
107
|
+
* `should-be-disabled`) that declares no `states` at all is not under-annotated — it is a driver
|
|
108
|
+
* built before the field existed, loaded against a core that requires it (a stale project copy of
|
|
109
|
+
* @sungen/driver-ui). The generic message then tells the author to use the exact form they wrote,
|
|
110
|
+
* which cost a QA team a day of Gherkin rewrites that could never work. Name the real cause.
|
|
111
|
+
*/
|
|
112
|
+
private static stateMissSkewHint;
|
|
86
113
|
/**
|
|
87
114
|
* SG-E020 — the pattern is in-platform but the active adapter ships no template for it. A gap in
|
|
88
115
|
* the adapter, not in the authored Gherkin: name every coordinate a reader needs to act on it.
|
|
89
116
|
*/
|
|
90
117
|
private static unsupportedTemplate;
|
|
91
118
|
/**
|
|
92
|
-
* Resolve
|
|
93
|
-
*
|
|
119
|
+
* Resolve a step's `in [Parent] <type> [with <value>]` scope to a locator string, or `undefined`
|
|
120
|
+
* when the step carries no scope.
|
|
94
121
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
122
|
+
* Tries YAML lookup first, falls back to auto-inferring a role from the container type with the
|
|
123
|
+
* reference as the accessible name. A reference written as `{{var}}` is resolved through
|
|
124
|
+
* test-data before it reaches that name — containers are routinely labelled with the text under
|
|
125
|
+
* test, and a literal `{{var}}` in the name matches nothing.
|
|
98
126
|
*/
|
|
99
127
|
private static resolveParentLocator;
|
|
128
|
+
private static parentContainerLocator;
|
|
129
|
+
/**
|
|
130
|
+
* Narrow the container to the ONE whose content matches the step's parent value — the
|
|
131
|
+
* `with {{job_title}}` tail of `see [Tag] header with {{label}} in [Job Card] card with
|
|
132
|
+
* {{job_title}}`. Without it a list of identical cards leaves the assertion matching whichever
|
|
133
|
+
* one Playwright reaches first.
|
|
134
|
+
*
|
|
135
|
+
* Web-only, and refused rather than approximated elsewhere: the Appium partial chains a parent
|
|
136
|
+
* with `$()`, which has no content filter, so emitting one would be invalid code and pretending
|
|
137
|
+
* the scope applied would be the very silence this whole fix exists to end (SG-W028).
|
|
138
|
+
*/
|
|
139
|
+
private static filterParentByValue;
|
|
140
|
+
/**
|
|
141
|
+
* Resolve a `{{var}}` written where literal text is expected, leaving anything else untouched.
|
|
142
|
+
* An unknown variable stays as written rather than throwing — the locator is then wrong in a way
|
|
143
|
+
* the author can read, which beats losing the whole step.
|
|
144
|
+
*/
|
|
145
|
+
private static resolveInlineData;
|
|
100
146
|
/**
|
|
101
147
|
* Check if step matches a pattern matcher
|
|
102
148
|
*/
|
|
@@ -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,
|
|
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;IAwF1E;;OAEG;IACH;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IA2B7B,OAAO,CAAC,MAAM,CAAC,YAAY;IAwB3B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAyBxB;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAUhC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAmBlC;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAQnC,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAsCrC;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAiBlC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAUhC;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;IACH,WAAW,IAAI,WAAW,EAAE;IAI5B;;OAEG;IACH,eAAe,IAAI,MAAM;CAG1B;AAID,cAAc,SAAS,CAAC"}
|