@sun-asterisk/sungen 3.2.31 → 3.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/audit.d.ts +1 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +13 -2
- 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 +46 -17
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +39 -18
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +14 -7
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +2 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/results-merge.d.ts.map +1 -1
- package/dist/cli/commands/results-merge.js +2 -12
- package/dist/cli/commands/results-merge.js.map +1 -1
- package/dist/cli/commands/results-sanitize.d.ts.map +1 -1
- package/dist/cli/commands/results-sanitize.js +2 -13
- package/dist/cli/commands/results-sanitize.js.map +1 -1
- package/dist/cli/commands/setup-mobile-env.d.ts +15 -0
- package/dist/cli/commands/setup-mobile-env.d.ts.map +1 -0
- package/dist/cli/commands/setup-mobile-env.js +65 -0
- package/dist/cli/commands/setup-mobile-env.js.map +1 -0
- package/dist/cli/index.js +2 -0
- 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/exporters/feature-parser.d.ts +21 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +32 -1
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/locale-variants.d.ts +7 -1
- package/dist/exporters/locale-variants.d.ts.map +1 -1
- package/dist/exporters/locale-variants.js +23 -16
- package/dist/exporters/locale-variants.js.map +1 -1
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +13 -7
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.d.ts +70 -0
- package/dist/exporters/matrix/carry-manual-results.d.ts.map +1 -0
- package/dist/exporters/matrix/carry-manual-results.js +232 -0
- package/dist/exporters/matrix/carry-manual-results.js.map +1 -0
- package/dist/exporters/matrix/export.d.ts +2 -0
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +7 -1
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/wording.d.ts +7 -0
- package/dist/exporters/matrix/wording.d.ts.map +1 -1
- package/dist/exporters/matrix/wording.js +27 -1
- package/dist/exporters/matrix/wording.js.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +2 -0
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +7 -2
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +2 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-assertion.hbs +1 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-element.hbs +8 -5
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/count-assertion.hbs +5 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-filter-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-filter-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +1 -1
- 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/list-item-count-assertion.hbs +5 -2
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-filtered-assertion.hbs +1 -1
- 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/steps/partials/await-elements.hbs +12 -0
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +94 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/capture-variable.hbs +7 -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/row-scoped-column-assertion.hbs +23 -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/locator-base.hbs +4 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/default.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.hbs +4 -4
- package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +17 -2
- package/dist/generators/test-generator/adapters/playwright/templates/test-file.hbs +14 -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 +122 -15
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +70 -4
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +69 -3
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/index.d.ts +13 -3
- package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
- package/dist/generators/test-generator/patterns/index.js +16 -10
- 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 +81 -0
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +187 -13
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
- package/dist/generators/test-generator/template-engine.js +18 -0
- package/dist/generators/test-generator/template-engine.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 +84 -4
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +229 -82
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +35 -8
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability.d.ts +7 -1
- package/dist/harness/capability.d.ts.map +1 -1
- package/dist/harness/capability.js +15 -12
- package/dist/harness/capability.js.map +1 -1
- package/dist/harness/catalog/universal-viewpoints.yaml +5 -5
- package/dist/harness/config-file.d.ts +17 -0
- package/dist/harness/config-file.d.ts.map +1 -0
- package/dist/harness/config-file.js +100 -0
- package/dist/harness/config-file.js.map +1 -0
- package/dist/harness/depth-lint.d.ts.map +1 -1
- package/dist/harness/depth-lint.js +2 -1
- package/dist/harness/depth-lint.js.map +1 -1
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +6 -2
- package/dist/harness/flow-check.js.map +1 -1
- package/dist/harness/keyword-match.d.ts +59 -0
- package/dist/harness/keyword-match.d.ts.map +1 -0
- package/dist/harness/keyword-match.js +86 -0
- package/dist/harness/keyword-match.js.map +1 -0
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +2 -1
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +42 -7
- 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 +16 -4
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/query-catalog.js +0 -0
- package/dist/harness/query-catalog.js.map +1 -1
- package/dist/harness/read-text.d.ts +6 -0
- package/dist/harness/read-text.d.ts.map +1 -1
- package/dist/harness/read-text.js +7 -1
- package/dist/harness/read-text.js.map +1 -1
- package/dist/harness/secret-scan.d.ts +27 -1
- package/dist/harness/secret-scan.d.ts.map +1 -1
- package/dist/harness/secret-scan.js +57 -4
- package/dist/harness/secret-scan.js.map +1 -1
- package/dist/harness/sensors.d.ts +12 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +41 -18
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/spec-branches.d.ts +7 -20
- package/dist/harness/spec-branches.d.ts.map +1 -1
- package/dist/harness/spec-branches.js +85 -13
- package/dist/harness/spec-branches.js.map +1 -1
- package/dist/harness/spec-coverage.d.ts +16 -0
- package/dist/harness/spec-coverage.d.ts.map +1 -1
- package/dist/harness/spec-coverage.js +131 -12
- package/dist/harness/spec-coverage.js.map +1 -1
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +2 -1
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/harness/write-atomic.d.ts +2 -0
- package/dist/harness/write-atomic.d.ts.map +1 -0
- package/dist/harness/write-atomic.js +62 -0
- package/dist/harness/write-atomic.js.map +1 -0
- package/dist/orchestrator/ai-skills/writer.d.ts.map +1 -1
- package/dist/orchestrator/ai-skills/writer.js +15 -7
- package/dist/orchestrator/ai-skills/writer.js.map +1 -1
- package/dist/orchestrator/appium-environment-setup.d.ts +24 -0
- package/dist/orchestrator/appium-environment-setup.d.ts.map +1 -0
- package/dist/orchestrator/appium-environment-setup.js +157 -0
- package/dist/orchestrator/appium-environment-setup.js.map +1 -0
- 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/mobile-runtime-scaffolder.d.ts +2 -0
- package/dist/orchestrator/mobile-runtime-scaffolder.d.ts.map +1 -1
- package/dist/orchestrator/mobile-runtime-scaffolder.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 +9 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +63 -7
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/security-overrides-catalog.d.ts +39 -0
- package/dist/orchestrator/security-overrides-catalog.d.ts.map +1 -0
- package/dist/orchestrator/security-overrides-catalog.js +63 -0
- package/dist/orchestrator/security-overrides-catalog.js.map +1 -0
- package/dist/orchestrator/security-overrides.d.ts +51 -0
- package/dist/orchestrator/security-overrides.d.ts.map +1 -0
- package/dist/orchestrator/security-overrides.js +165 -0
- package/dist/orchestrator/security-overrides.js.map +1 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +8 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +64 -2
- 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 +20 -5
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +3 -3
- package/dist/orchestrator/templates/appium-environment/README.md +83 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/install-appium.ps1 +44 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/install-appium.sh +50 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/lib.ps1 +108 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/lib.sh +141 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/verify-appium.ps1 +39 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/verify-appium.sh +43 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/verify-node.ps1 +13 -0
- package/dist/orchestrator/templates/appium-environment/scripts/common/verify-node.sh +16 -0
- package/dist/orchestrator/templates/appium-environment/scripts/macos/install-android.sh +110 -0
- package/dist/orchestrator/templates/appium-environment/scripts/macos/install-ios.sh +32 -0
- package/dist/orchestrator/templates/appium-environment/scripts/macos/verify-android.sh +32 -0
- package/dist/orchestrator/templates/appium-environment/scripts/macos/verify-ios.sh +15 -0
- package/dist/orchestrator/templates/appium-environment/scripts/windows/install-android.ps1 +153 -0
- package/dist/orchestrator/templates/appium-environment/scripts/windows/verify-android.ps1 +26 -0
- package/dist/orchestrator/templates/appium-environment/setup.ps1 +58 -0
- package/dist/orchestrator/templates/appium-environment/setup.sh +88 -0
- package/dist/orchestrator/templates/specs-checked-state.d.ts +1 -1
- package/dist/orchestrator/templates/specs-checked-state.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-checked-state.js +26 -3
- package/dist/orchestrator/templates/specs-checked-state.js.map +1 -1
- package/dist/orchestrator/templates/specs-checked-state.ts +31 -6
- package/dist/orchestrator/templates/specs-locale-fixture.ts +21 -9
- package/dist/orchestrator/templates/specs-mock.d.ts +2 -1
- package/dist/orchestrator/templates/specs-mock.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-mock.js +10 -3
- package/dist/orchestrator/templates/specs-mock.js.map +1 -1
- package/dist/orchestrator/templates/specs-mock.ts +12 -4
- package/dist/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/dist/orchestrator/templates/specs-url-assert.d.ts +17 -1
- package/dist/orchestrator/templates/specs-url-assert.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.js +14 -2
- package/dist/orchestrator/templates/specs-url-assert.js.map +1 -1
- package/dist/orchestrator/templates/specs-url-assert.ts +24 -2
- package/dist/orchestrator/templates/wdio.conf.ts +24 -1
- package/package.json +3 -3
- package/src/cli/commands/audit.ts +12 -3
- package/src/cli/commands/capability.ts +63 -19
- package/src/cli/commands/delivery.ts +38 -16
- package/src/cli/commands/generate.ts +15 -7
- package/src/cli/commands/init.ts +3 -0
- package/src/cli/commands/results-merge.ts +2 -8
- package/src/cli/commands/results-sanitize.ts +2 -9
- package/src/cli/commands/setup-mobile-env.ts +64 -0
- package/src/cli/index.ts +2 -0
- package/src/dashboard/snapshot-builder.ts +6 -8
- package/src/exporters/feature-parser.ts +32 -2
- package/src/exporters/locale-variants.ts +23 -17
- package/src/exporters/matrix/build.ts +14 -8
- package/src/exporters/matrix/carry-manual-results.ts +229 -0
- package/src/exporters/matrix/export.ts +10 -4
- package/src/exporters/matrix/wording.ts +26 -1
- package/src/exporters/xlsx-exporter.ts +7 -2
- package/src/generators/test-generator/adapters/adapter-interface.ts +2 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/reinstall-app-action.hbs +2 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-assertion.hbs +1 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/all-contain-element.hbs +8 -5
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/count-assertion.hbs +5 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-filter-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-filter-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +1 -1
- 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/list-item-count-assertion.hbs +5 -2
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/state-with-filter-assertion.hbs +1 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-filtered-assertion.hbs +1 -1
- 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/steps/partials/await-elements.hbs +12 -0
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +94 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/capture-variable.hbs +7 -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/row-scoped-column-assertion.hbs +23 -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/locator-base.hbs +4 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/default.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.hbs +4 -4
- package/src/generators/test-generator/adapters/playwright/templates/steps/partials/url-assertion.hbs +17 -2
- package/src/generators/test-generator/adapters/playwright/templates/test-file.hbs +14 -0
- package/src/generators/test-generator/code-generator.ts +119 -19
- package/src/generators/test-generator/diagnostics.ts +70 -4
- package/src/generators/test-generator/patterns/index.ts +16 -9
- 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 +196 -13
- package/src/generators/test-generator/template-engine.ts +18 -0
- 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 +256 -85
- package/src/harness/audit.ts +41 -12
- package/src/harness/capability.ts +23 -12
- package/src/harness/catalog/universal-viewpoints.yaml +5 -5
- package/src/harness/config-file.ts +66 -0
- package/src/harness/depth-lint.ts +2 -1
- package/src/harness/flow-check.ts +6 -2
- package/src/harness/keyword-match.ts +85 -0
- package/src/harness/next-step.ts +2 -1
- package/src/harness/parse.ts +42 -7
- package/src/harness/perf.ts +15 -7
- package/src/harness/quality-gates.ts +16 -4
- package/src/harness/query-catalog.ts +0 -0
- package/src/harness/read-text.ts +7 -1
- package/src/harness/secret-scan.ts +60 -4
- package/src/harness/sensors.ts +50 -19
- package/src/harness/spec-branches.ts +72 -14
- package/src/harness/spec-coverage.ts +133 -13
- package/src/harness/viewpoint-ledger.ts +2 -1
- package/src/harness/write-atomic.ts +22 -0
- package/src/orchestrator/ai-skills/writer.ts +18 -3
- package/src/orchestrator/appium-environment-setup.ts +127 -0
- package/src/orchestrator/assets-drift.ts +10 -5
- package/src/orchestrator/mobile-runtime-scaffolder.ts +2 -0
- package/src/orchestrator/project-deps-sync.ts +23 -1
- package/src/orchestrator/project-initializer.ts +69 -7
- package/src/orchestrator/security-overrides-catalog.ts +69 -0
- package/src/orchestrator/security-overrides.ts +149 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +8 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +64 -2
- 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 +20 -5
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +3 -3
- package/src/orchestrator/templates/appium-environment/README.md +83 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/install-appium.ps1 +44 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/install-appium.sh +50 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/lib.ps1 +108 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/lib.sh +141 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/verify-appium.ps1 +39 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/verify-appium.sh +43 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/verify-node.ps1 +13 -0
- package/src/orchestrator/templates/appium-environment/scripts/common/verify-node.sh +16 -0
- package/src/orchestrator/templates/appium-environment/scripts/macos/install-android.sh +110 -0
- package/src/orchestrator/templates/appium-environment/scripts/macos/install-ios.sh +32 -0
- package/src/orchestrator/templates/appium-environment/scripts/macos/verify-android.sh +32 -0
- package/src/orchestrator/templates/appium-environment/scripts/macos/verify-ios.sh +15 -0
- package/src/orchestrator/templates/appium-environment/scripts/windows/install-android.ps1 +153 -0
- package/src/orchestrator/templates/appium-environment/scripts/windows/verify-android.ps1 +26 -0
- package/src/orchestrator/templates/appium-environment/setup.ps1 +58 -0
- package/src/orchestrator/templates/appium-environment/setup.sh +88 -0
- package/src/orchestrator/templates/specs-checked-state.ts +31 -6
- package/src/orchestrator/templates/specs-locale-fixture.ts +21 -9
- package/src/orchestrator/templates/specs-mock.ts +12 -4
- package/src/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
- package/src/orchestrator/templates/specs-url-assert.ts +24 -2
- package/src/orchestrator/templates/wdio.conf.ts +24 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-resolver.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/data-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,oDAA0D;AAE1D;;;;;;GAMG;AACH,MAAa,YAAY;IAWvB,6EAA6E;IAC7E,gBAAgB,CAAC,IAAY;QAC3B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,gEAAgE;IAChE,aAAa;QACX,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAQD,iGAAiG;IACjG,uBAAuB,CAAC,IAAY;QAClC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,8EAA8E;IAC9E,oBAAoB;QAClB,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC/B,CAAC;IAED,yFAAyF;IACjF,UAAU,CAAC,OAAe;QAChC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED,YAAY,WAAoB,EAAE,UAAmB,EAAE,cAAuB,KAAK;QAzC3E,cAAS,GAAG,IAAI,GAAG,EAAe,CAAC;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O,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACjD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAEO,YAAY,CAAC,OAAe,EAAE,WAAoB;QACxD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACxE,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"data-resolver.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/data-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,oDAA0D;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAa,YAAa,SAAQ,KAAK;IACrC,YACE,OAAe;IACf,wFAAwF;IAC/E,OAAe;IACxB,mGAAmG;IAC1F,IAAa;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAC;QAJN,YAAO,GAAP,OAAO,CAAQ;QAEf,SAAI,GAAJ,IAAI,CAAS;QAGtB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAXD,oCAWC;AAED;;;;;;GAMG;AACH,MAAa,YAAY;IAWvB,6EAA6E;IAC7E,gBAAgB,CAAC,IAAY;QAC3B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,gEAAgE;IAChE,aAAa;QACX,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAQD,iGAAiG;IACjG,uBAAuB,CAAC,IAAY;QAClC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,8EAA8E;IAC9E,oBAAoB;QAClB,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE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AAC;QACnC,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,QAAQ,IAAI,GAAG,OAAO,CAAC,CAAC;YAC9D,MAAM,OAAO,GAAG,IAAA,0BAAgB,EAAC,OAAO,CAAC,CAAC;YAC1C,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;gBAC3C,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC;YACrC,CAAC;QACH,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACF;AA5MD,oCA4MC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector-entry-fields.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/selector-entry-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAI3D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"selector-entry-fields.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/selector-entry-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAI3D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CA8BpD,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAAe,CAAC;AAEzE,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAGjD,CAAC;AAEH,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAA4C,CAAC;AAE/F,MAAM,WAAW,YAAY;IAC3B,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,2DAA2D;AAC3D,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE,CAmBvF;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,oBAAoB,CAAA;CAAE,GAC7D,IAAI,CAaN"}
|
|
@@ -38,6 +38,7 @@ exports.CONSUMED_ENTRY_FIELDS = new Set([
|
|
|
38
38
|
'scope', // dialog/landmark scoping in the locator partial
|
|
39
39
|
'match', // collapses into `exact` for getByText
|
|
40
40
|
'anchor', // page assertions — the rendered-content proof (#662)
|
|
41
|
+
'query', // page assertions — `any` drops the bare-page no-query rule (#748)
|
|
41
42
|
'android', // appium adapter → androidSelector (#392)
|
|
42
43
|
'ios', // appium adapter → iosSelector (#392)
|
|
43
44
|
'variant', // widget recipes / native select / upload subtype
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector-entry-fields.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/selector-entry-fields.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;
|
|
1
|
+
{"version":3,"file":"selector-entry-fields.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/selector-entry-fields.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;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E,IAAI,CAAC,GAAG,CAAC,SAAS,EAChB,yBAAyB,IAAI,eAAe,KAAK,+BAA+B;cAC9E,iEAAiE,IAAI,GAAG;cACxE,8DAA8D,EAChE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
import { SelectorType } from '../../../utils/selector-types';
|
|
2
2
|
import { DiagnosticsCollector } from '../diagnostics';
|
|
3
|
+
interface SelectorEntry {
|
|
4
|
+
locator?: string;
|
|
5
|
+
type?: SelectorType;
|
|
6
|
+
value?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
nth?: number;
|
|
9
|
+
exact?: boolean;
|
|
10
|
+
inputMethod?: string;
|
|
11
|
+
scope?: string;
|
|
12
|
+
match?: 'exact' | 'partial';
|
|
13
|
+
anchor?: SelectorEntry;
|
|
14
|
+
query?: 'any';
|
|
15
|
+
android?: SelectorEntry;
|
|
16
|
+
ios?: SelectorEntry;
|
|
17
|
+
variant?: string;
|
|
18
|
+
trigger?: string;
|
|
19
|
+
frame?: string;
|
|
20
|
+
contenteditable?: boolean;
|
|
21
|
+
columns?: Record<string, {
|
|
22
|
+
index: number;
|
|
23
|
+
header: string;
|
|
24
|
+
elements?: Record<string, SelectorEntry>;
|
|
25
|
+
}>;
|
|
26
|
+
pagination?: Record<string, string>;
|
|
27
|
+
rows?: string;
|
|
28
|
+
checked?: {
|
|
29
|
+
class?: string;
|
|
30
|
+
attribute?: string;
|
|
31
|
+
};
|
|
32
|
+
selected?: {
|
|
33
|
+
class?: string;
|
|
34
|
+
attribute?: string;
|
|
35
|
+
};
|
|
36
|
+
attribute?: string;
|
|
37
|
+
pattern?: string;
|
|
38
|
+
expanded?: {
|
|
39
|
+
class?: string;
|
|
40
|
+
attribute?: string;
|
|
41
|
+
state?: 'none';
|
|
42
|
+
};
|
|
43
|
+
}
|
|
3
44
|
/**
|
|
4
45
|
* Roles whose accessible name comes from their own CONTENT, not from a label — so a name the
|
|
5
46
|
* compiler invented from the `[Reference]` text can never match a real element.
|
|
@@ -59,11 +100,8 @@ export interface ResolvedSelector {
|
|
|
59
100
|
checkedClass?: string;
|
|
60
101
|
checkedAttribute?: string;
|
|
61
102
|
anchor?: ResolvedSelector;
|
|
103
|
+
query?: 'any';
|
|
62
104
|
}
|
|
63
|
-
/**
|
|
64
|
-
* SelectorResolver - Resolves selector references to direct Playwright locator code
|
|
65
|
-
* Supports natural language references with auto-generated keys
|
|
66
|
-
*/
|
|
67
105
|
export declare class SelectorResolver {
|
|
68
106
|
private selectorCache;
|
|
69
107
|
private selectorsDir;
|
|
@@ -158,6 +196,32 @@ export declare class SelectorResolver {
|
|
|
158
196
|
* [Email] field → getByPlaceholder('...')
|
|
159
197
|
*/
|
|
160
198
|
private static inferFromElementType;
|
|
199
|
+
/**
|
|
200
|
+
* Does the compiler have an OPINION about this element type — is it an alias it normalizes, or a
|
|
201
|
+
* type auto-infer can serve?
|
|
202
|
+
*
|
|
203
|
+
* The distinction decides whether the last-resort sweep may run, and it exists because
|
|
204
|
+
* `step.elementType` is not always an element type. The parser takes the first word after `]`
|
|
205
|
+
* (gherkin-parser/index.ts), so `see [Quick Panel] is hidden` arrives here with the "type" `is`
|
|
206
|
+
* and `drag [Item] to [Drop Zone]` with `to`. Nine such function words appear across the shipped
|
|
207
|
+
* features. A word the compiler cannot reason about carries no type information at all, so it must
|
|
208
|
+
* not be treated as a narrowing signal — a step like that has to keep the same open fallback a
|
|
209
|
+
* bare `[Ref]` gets, or a project whose label needs suffixed keys loses every state-clause step.
|
|
210
|
+
*
|
|
211
|
+
* Derived from the two maps rather than listed, so a new alias or strategy is known here the day
|
|
212
|
+
* it is added. tests/docs/element-type-vocabulary-parity.run.ts pins the maps against the parser's
|
|
213
|
+
* own list and the published table.
|
|
214
|
+
*/
|
|
215
|
+
private static isKnownElementType;
|
|
216
|
+
/**
|
|
217
|
+
* Every selectors.yaml key that could legitimately hold the entry for `[label] <elementType>`.
|
|
218
|
+
*
|
|
219
|
+
* Shared by the lookup and by the not-found message, so the error can never advertise a key the
|
|
220
|
+
* resolver did not actually try — the two drifting apart is how #752 stayed invisible: the throw
|
|
221
|
+
* that would have named the missing key was unreachable, and when it did fire it listed two
|
|
222
|
+
* candidates while the resolver had its own idea of which to check.
|
|
223
|
+
*/
|
|
224
|
+
private static typedKeyCandidates;
|
|
161
225
|
/**
|
|
162
226
|
* Normalize elementType aliases to canonical YAML suffix
|
|
163
227
|
* Gherkin writers may use: title, label, heading, text → all map to "text"
|
|
@@ -212,6 +276,21 @@ export declare class SelectorResolver {
|
|
|
212
276
|
* whose fallback is the failure it exists to fix, refuses outright.
|
|
213
277
|
*/
|
|
214
278
|
private validatedStateSignal;
|
|
279
|
+
/**
|
|
280
|
+
* Report a selectors.yaml problem ONCE per entry+field, not once per step that resolves it.
|
|
281
|
+
*
|
|
282
|
+
* An entry is resolved again for every step that names it, so an unguarded `diagnostics.add`
|
|
283
|
+
* here repeats the same sentence a dozen times for one typo and buries everything else in the
|
|
284
|
+
* channel. `warnedContentNamed` is the existing de-dupe set; `key` namespaces the callers so two
|
|
285
|
+
* diagnostics about one entry cannot silence each other.
|
|
286
|
+
*/
|
|
287
|
+
private warnOnce;
|
|
288
|
+
/**
|
|
289
|
+
* Resolve a selectors.yaml entry that is NOT reachable by key — a `columns.<col>.elements.cell`
|
|
290
|
+
* declaration, which lives nested under a table entry. Public for that one caller; everything
|
|
291
|
+
* addressable by name goes through `resolveSelector`.
|
|
292
|
+
*/
|
|
293
|
+
resolveNestedEntry(entry: SelectorEntry, originalLabel: string): ResolvedSelector;
|
|
215
294
|
private resolveFromEntry;
|
|
216
295
|
/**
|
|
217
296
|
* Resolve selector by priority chain (legacy)
|
|
@@ -257,4 +336,5 @@ export declare class SelectorResolver {
|
|
|
257
336
|
*/
|
|
258
337
|
clearCache(): void;
|
|
259
338
|
}
|
|
339
|
+
export {};
|
|
260
340
|
//# sourceMappingURL=selector-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector-resolver.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/selector-resolver.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"selector-resolver.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/utils/selector-resolver.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,oBAAoB,EAAuB,MAAM,gBAAgB,CAAC;AAO3E,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAM5B,MAAM,CAAC,EAAE,aAAa,CAAC;IAmBvB,KAAK,CAAC,EAAE,KAAK,CAAC;IAKd,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,GAAG,CAAC,EAAE,aAAa,CAAC;IAKpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAG1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,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;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAQjC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAInC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAuH9B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAoC3B;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAMlC,yFAAyF;IACzF,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAYnC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IA+D5B;;OAEG;IACH;;;;;;;;OAQG;IACH,OAAO,CAAC,oBAAoB;IA6B5B;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ;IAMhB;;;;OAIG;IACH,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,gBAAgB;IAIjF,OAAO,CAAC,gBAAgB;IA8RxB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAuEzB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,mBAAmB;IA8D3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA6B5B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA4BxB;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAcjC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAqD9B;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB"}
|
|
@@ -63,6 +63,105 @@ exports.LIST_MEMBER_ROLES = new Set(['listitem', 'option', 'cell']);
|
|
|
63
63
|
* SelectorResolver - Resolves selector references to direct Playwright locator code
|
|
64
64
|
* Supports natural language references with auto-generated keys
|
|
65
65
|
*/
|
|
66
|
+
/**
|
|
67
|
+
* Read an OWN property of a lookup table, or undefined.
|
|
68
|
+
*
|
|
69
|
+
* Every type table here — the alias map, the strategy map, the reverse index, and the parsed
|
|
70
|
+
* selectors.yaml itself — is a bare object literal, so it inherits Object.prototype and answers for
|
|
71
|
+
* keys it does not have. `elementType` is whatever word the author wrote after `]`, and the three
|
|
72
|
+
* readers failed three different ways on an inherited one: normalizeElementType is declared
|
|
73
|
+
* `: string` and returned a FUNCTION to be interpolated into a selector key; inferFromElementType
|
|
74
|
+
* CALLED that function with no receiver and crashed the compiler with "Cannot convert undefined or
|
|
75
|
+
* null to object"; and `ALIAS_SPELLINGS[t] ?? []` sailed past its own `??` guard, because a
|
|
76
|
+
* function is neither null nor undefined, and died on `.map`.
|
|
77
|
+
*
|
|
78
|
+
* No real feature file says `[X] valueOf`. The rule is the point: a lookup table must not answer
|
|
79
|
+
* for a key it does not have, and one helper is cheaper to keep right than four call sites.
|
|
80
|
+
*/
|
|
81
|
+
function own(table, key) {
|
|
82
|
+
return Object.prototype.hasOwnProperty.call(table, key) ? table[key] : undefined;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Gherkin element-type spelling → the canonical suffix used in selectors.yaml keys.
|
|
86
|
+
*
|
|
87
|
+
* Module-scope so the table has exactly ONE reader-facing definition and the reverse index below
|
|
88
|
+
* can be DERIVED from it. A second, hand-written reverse table is the failure mode issue #728
|
|
89
|
+
* recorded: a hand-maintained mirror of something the source already states drifts, quietly, for
|
|
90
|
+
* months. Declaration order is meaningful — it decides which alias wins when a selectors.yaml
|
|
91
|
+
* declares two spellings of one canonical type (see ALIAS_SPELLINGS).
|
|
92
|
+
*/
|
|
93
|
+
const ELEMENT_TYPE_ALIASES = {
|
|
94
|
+
// Text-like aliases → "text"
|
|
95
|
+
'title': 'text',
|
|
96
|
+
'label': 'text',
|
|
97
|
+
'caption': 'text',
|
|
98
|
+
// Heading aliases → "heading" (role-based)
|
|
99
|
+
'heading': 'heading',
|
|
100
|
+
'header': 'heading',
|
|
101
|
+
'message': 'text',
|
|
102
|
+
// Table-related aliases
|
|
103
|
+
'column': 'columnheader',
|
|
104
|
+
// List-related aliases
|
|
105
|
+
'list-item': 'listitem',
|
|
106
|
+
// Image aliases
|
|
107
|
+
'logo': 'img',
|
|
108
|
+
'image': 'img',
|
|
109
|
+
'icon': 'img',
|
|
110
|
+
// Button aliases
|
|
111
|
+
'btn': 'button',
|
|
112
|
+
// Field aliases
|
|
113
|
+
'input': 'field',
|
|
114
|
+
'textbox': 'field',
|
|
115
|
+
'textarea': 'field',
|
|
116
|
+
'editor': 'field',
|
|
117
|
+
// Search alias → searchbox role
|
|
118
|
+
'search': 'searchbox',
|
|
119
|
+
// Toggle alias → switch role
|
|
120
|
+
'toggle': 'switch',
|
|
121
|
+
// Alert alias → alertdialog role.
|
|
122
|
+
// UNREACHABLE in practice, kept for the same reason it is not changed: in sungen's grammar
|
|
123
|
+
// `alert` means the BROWSER system dialog, so `see [X] alert` matches a dedicated step pattern
|
|
124
|
+
// and compiles to `page.on('dialog', …)` without ever entering the selector resolver
|
|
125
|
+
// (verified by compiling the step; target-dictionary.mdx documents it as `page.on('dialog')`).
|
|
126
|
+
// This entry only answers a step form that reaches the resolver with the type `alert`, and
|
|
127
|
+
// none does. Removing it would be a behaviour change with no caller to benefit, so it stays.
|
|
128
|
+
'alert': 'alertdialog',
|
|
129
|
+
// Modal/drawer alias → dialog role
|
|
130
|
+
'modal': 'dialog',
|
|
131
|
+
'drawer': 'dialog',
|
|
132
|
+
// Dropdown/select alias -> combobox role
|
|
133
|
+
'dropdown': 'combobox',
|
|
134
|
+
'select': 'combobox',
|
|
135
|
+
// Data aliases
|
|
136
|
+
'item': 'listitem',
|
|
137
|
+
'card': 'article',
|
|
138
|
+
'cell': 'cell',
|
|
139
|
+
'section': 'region',
|
|
140
|
+
// Feedback aliases
|
|
141
|
+
'badge': 'text',
|
|
142
|
+
'tooltip': 'text',
|
|
143
|
+
'tag': 'text',
|
|
144
|
+
// Trigger aliases
|
|
145
|
+
'menuitem': 'menuitem',
|
|
146
|
+
// System aliases
|
|
147
|
+
'progressbar': 'progressbar',
|
|
148
|
+
'spinner': 'status',
|
|
149
|
+
'breadcrumb': 'navigation',
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Canonical type → every alias spelling that normalizes to it, in ELEMENT_TYPE_ALIASES declaration
|
|
153
|
+
* order. Derived, never authored. Identity entries ('heading': 'heading') are excluded: they are
|
|
154
|
+
* already covered by the canonical candidate and would only duplicate a lookup.
|
|
155
|
+
*/
|
|
156
|
+
const ALIAS_SPELLINGS = (() => {
|
|
157
|
+
const out = {};
|
|
158
|
+
for (const [alias, canonical] of Object.entries(ELEMENT_TYPE_ALIASES)) {
|
|
159
|
+
if (alias === canonical)
|
|
160
|
+
continue;
|
|
161
|
+
(out[canonical] ?? (out[canonical] = [])).push(alias);
|
|
162
|
+
}
|
|
163
|
+
return out;
|
|
164
|
+
})();
|
|
66
165
|
class SelectorResolver {
|
|
67
166
|
constructor(selectorsDir, screenName, platform = 'web') {
|
|
68
167
|
this.selectorCache = new Map();
|
|
@@ -255,68 +354,52 @@ class SelectorResolver {
|
|
|
255
354
|
'status': () => ({ strategy: 'role', role: 'status', name: label, value: 'status' }),
|
|
256
355
|
'navigation': () => ({ strategy: 'role', role: 'navigation', name: label, value: 'navigation' }),
|
|
257
356
|
};
|
|
258
|
-
const factory = strategyMap
|
|
357
|
+
const factory = own(strategyMap, normalized);
|
|
259
358
|
return factory ? factory() : null;
|
|
260
359
|
}
|
|
360
|
+
/**
|
|
361
|
+
* Does the compiler have an OPINION about this element type — is it an alias it normalizes, or a
|
|
362
|
+
* type auto-infer can serve?
|
|
363
|
+
*
|
|
364
|
+
* The distinction decides whether the last-resort sweep may run, and it exists because
|
|
365
|
+
* `step.elementType` is not always an element type. The parser takes the first word after `]`
|
|
366
|
+
* (gherkin-parser/index.ts), so `see [Quick Panel] is hidden` arrives here with the "type" `is`
|
|
367
|
+
* and `drag [Item] to [Drop Zone]` with `to`. Nine such function words appear across the shipped
|
|
368
|
+
* features. A word the compiler cannot reason about carries no type information at all, so it must
|
|
369
|
+
* not be treated as a narrowing signal — a step like that has to keep the same open fallback a
|
|
370
|
+
* bare `[Ref]` gets, or a project whose label needs suffixed keys loses every state-clause step.
|
|
371
|
+
*
|
|
372
|
+
* Derived from the two maps rather than listed, so a new alias or strategy is known here the day
|
|
373
|
+
* it is added. tests/docs/element-type-vocabulary-parity.run.ts pins the maps against the parser's
|
|
374
|
+
* own list and the published table.
|
|
375
|
+
*/
|
|
376
|
+
static isKnownElementType(elementType) {
|
|
377
|
+
if (own(ELEMENT_TYPE_ALIASES, elementType) !== undefined)
|
|
378
|
+
return true;
|
|
379
|
+
return SelectorResolver.inferFromElementType(elementType, '') !== null;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Every selectors.yaml key that could legitimately hold the entry for `[label] <elementType>`.
|
|
383
|
+
*
|
|
384
|
+
* Shared by the lookup and by the not-found message, so the error can never advertise a key the
|
|
385
|
+
* resolver did not actually try — the two drifting apart is how #752 stayed invisible: the throw
|
|
386
|
+
* that would have named the missing key was unreachable, and when it did fire it listed two
|
|
387
|
+
* candidates while the resolver had its own idea of which to check.
|
|
388
|
+
*/
|
|
389
|
+
static typedKeyCandidates(key, elementType, normalizedType) {
|
|
390
|
+
return [...new Set([
|
|
391
|
+
`${key}--${normalizedType}`,
|
|
392
|
+
`${key}--${elementType}`,
|
|
393
|
+
...(own(ALIAS_SPELLINGS, normalizedType) ?? []).map((alias) => `${key}--${alias}`),
|
|
394
|
+
])];
|
|
395
|
+
}
|
|
261
396
|
/**
|
|
262
397
|
* Normalize elementType aliases to canonical YAML suffix
|
|
263
398
|
* Gherkin writers may use: title, label, heading, text → all map to "text"
|
|
264
399
|
* Similarly: btn → button, link → link, input/field → field
|
|
265
400
|
*/
|
|
266
401
|
static normalizeElementType(elementType) {
|
|
267
|
-
|
|
268
|
-
// Text-like aliases → "text"
|
|
269
|
-
'title': 'text',
|
|
270
|
-
'label': 'text',
|
|
271
|
-
'caption': 'text',
|
|
272
|
-
// Heading aliases → "heading" (role-based)
|
|
273
|
-
'heading': 'heading',
|
|
274
|
-
'header': 'heading',
|
|
275
|
-
'message': 'text',
|
|
276
|
-
// Table-related aliases
|
|
277
|
-
'column': 'columnheader',
|
|
278
|
-
// List-related aliases
|
|
279
|
-
'list-item': 'listitem',
|
|
280
|
-
// Image aliases
|
|
281
|
-
'logo': 'img',
|
|
282
|
-
'image': 'img',
|
|
283
|
-
'icon': 'img',
|
|
284
|
-
// Button aliases
|
|
285
|
-
'btn': 'button',
|
|
286
|
-
// Field aliases
|
|
287
|
-
'input': 'field',
|
|
288
|
-
'textbox': 'field',
|
|
289
|
-
'textarea': 'field',
|
|
290
|
-
'editor': 'field',
|
|
291
|
-
// Search alias → searchbox role
|
|
292
|
-
'search': 'searchbox',
|
|
293
|
-
// Toggle alias → switch role
|
|
294
|
-
'toggle': 'switch',
|
|
295
|
-
// Alert alias → alertdialog role
|
|
296
|
-
'alert': 'alertdialog',
|
|
297
|
-
// Modal/drawer alias → dialog role
|
|
298
|
-
'modal': 'dialog',
|
|
299
|
-
'drawer': 'dialog',
|
|
300
|
-
// Dropdown/select alias -> combobox role
|
|
301
|
-
'dropdown': 'combobox',
|
|
302
|
-
'select': 'combobox',
|
|
303
|
-
// Data aliases
|
|
304
|
-
'item': 'listitem',
|
|
305
|
-
'card': 'article',
|
|
306
|
-
'cell': 'cell',
|
|
307
|
-
'section': 'region',
|
|
308
|
-
// Feedback aliases
|
|
309
|
-
'badge': 'text',
|
|
310
|
-
'tooltip': 'text',
|
|
311
|
-
'tag': 'text',
|
|
312
|
-
// Trigger aliases
|
|
313
|
-
'menuitem': 'menuitem',
|
|
314
|
-
// System aliases
|
|
315
|
-
'progressbar': 'progressbar',
|
|
316
|
-
'spinner': 'status',
|
|
317
|
-
'breadcrumb': 'navigation',
|
|
318
|
-
};
|
|
319
|
-
return aliasMap[elementType] || elementType;
|
|
402
|
+
return own(ELEMENT_TYPE_ALIASES, elementType) ?? elementType;
|
|
320
403
|
}
|
|
321
404
|
/**
|
|
322
405
|
* Resolve natural language selector
|
|
@@ -333,30 +416,35 @@ class SelectorResolver {
|
|
|
333
416
|
// Try nth-suffixed key first: hay.gui.loi.cam.on--3
|
|
334
417
|
if (nth && nth > 0) {
|
|
335
418
|
const nthKey = `${key}--${nth}`;
|
|
336
|
-
const nthEntry = selectorFile
|
|
419
|
+
const nthEntry = own(selectorFile, nthKey);
|
|
337
420
|
if (nthEntry) {
|
|
338
421
|
return this.resolveFromEntry(nthEntry, displayLabel);
|
|
339
422
|
}
|
|
340
423
|
}
|
|
341
|
-
// Try type-suffixed
|
|
424
|
+
// Try type-suffixed keys: add.campaign--button, add.campaign--text
|
|
425
|
+
//
|
|
426
|
+
// EVERY spelling of the step's type is tried, not just the two the step itself could have been
|
|
427
|
+
// written with (#752). The alias table maps a Gherkin spelling onto a canonical one, but it was
|
|
428
|
+
// only ever applied to the STEP; the file's keys were compared raw. So `confirm--modal` was
|
|
429
|
+
// invisible to `[Confirm] dialog` while `confirm--dialog` resolved for `[Confirm] modal` —
|
|
430
|
+
// the mapping is one-directional and the lookup inherited that. The hole was not specific to
|
|
431
|
+
// modal/drawer: all 30 non-identity aliases had it.
|
|
432
|
+
//
|
|
433
|
+
// Order is deterministic and NOT file order: canonical first (the spelling the compiler thinks
|
|
434
|
+
// in), then whatever the author literally typed, then the remaining aliases in alias-table
|
|
435
|
+
// declaration order. A file declaring both `--modal` and `--drawer` therefore resolves the same
|
|
436
|
+
// way on every machine.
|
|
342
437
|
if (elementType) {
|
|
343
438
|
const normalizedType = SelectorResolver.normalizeElementType(elementType);
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
// If normalized differs from original, also try original as-is
|
|
350
|
-
if (normalizedType !== elementType) {
|
|
351
|
-
const originalKey = `${key}--${elementType}`;
|
|
352
|
-
const originalEntry = selectorFile[originalKey];
|
|
353
|
-
if (originalEntry) {
|
|
354
|
-
return this.resolveFromEntry(originalEntry, displayLabel);
|
|
439
|
+
for (const candidate of SelectorResolver.typedKeyCandidates(key, elementType, normalizedType)) {
|
|
440
|
+
const typedEntry = own(selectorFile, candidate);
|
|
441
|
+
if (typedEntry) {
|
|
442
|
+
return this.resolveFromEntry(typedEntry, displayLabel);
|
|
355
443
|
}
|
|
356
444
|
}
|
|
357
445
|
}
|
|
358
446
|
// Fallback to base key
|
|
359
|
-
const entry = selectorFile
|
|
447
|
+
const entry = own(selectorFile, key);
|
|
360
448
|
if (entry) {
|
|
361
449
|
return this.resolveFromEntry(entry, displayLabel);
|
|
362
450
|
}
|
|
@@ -393,19 +481,28 @@ class SelectorResolver {
|
|
|
393
481
|
return inferred;
|
|
394
482
|
}
|
|
395
483
|
}
|
|
396
|
-
// Last resort:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
484
|
+
// Last resort: any suffixed key matching key--*, for a [Ref] the compiler could not type.
|
|
485
|
+
//
|
|
486
|
+
// Two cases reach here and they are the same case: a bare [Ref] with no word after it, and a
|
|
487
|
+
// [Ref] followed by a word that is not an element type. The parser cannot tell the two apart —
|
|
488
|
+
// it takes the FIRST word after `]`, so `see [Quick Panel] is hidden` arrives typed `is`. In
|
|
489
|
+
// both, nothing is known about what kind of element is wanted, so any suffixed key is as good a
|
|
490
|
+
// guess as the next, and a project whose label needs suffixed keys keeps its state-clause steps.
|
|
491
|
+
//
|
|
492
|
+
// A step the compiler CAN type gets no such guess. The candidate scan above already tried every
|
|
493
|
+
// spelling that normalizes to that type, so whatever is still sitting under `key--` is a
|
|
494
|
+
// DIFFERENT element, and handing it back is the silent-wrong-answer shape of #752 itself.
|
|
495
|
+
// Falling through to the throw is better: it names the keys that were tried, and "add an entry"
|
|
496
|
+
// is an instruction the author can act on.
|
|
497
|
+
if (!elementType || !SelectorResolver.isKnownElementType(elementType)) {
|
|
498
|
+
const suffixedKeys = Object.keys(selectorFile).filter(k => k.startsWith(`${key}--`));
|
|
499
|
+
if (suffixedKeys.length > 0) {
|
|
500
|
+
return this.resolveFromEntry(selectorFile[suffixedKeys[0]], displayLabel);
|
|
407
501
|
}
|
|
408
502
|
}
|
|
503
|
+
const tried = elementType
|
|
504
|
+
? SelectorResolver.typedKeyCandidates(key, elementType, SelectorResolver.normalizeElementType(elementType))
|
|
505
|
+
: [];
|
|
409
506
|
const suffix = tried.length > 0 ? ` (also tried ${tried.join(', ')})` : '';
|
|
410
507
|
throw new Error(`Selector "${label}" (key: ${key}) not found in ${featureName}.yaml${suffix}. ` +
|
|
411
508
|
`Available selectors: ${Object.keys(selectorFile).join(', ')}`);
|
|
@@ -557,6 +654,28 @@ class SelectorResolver {
|
|
|
557
654
|
}
|
|
558
655
|
return out.class || out.attribute ? out : undefined;
|
|
559
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* Report a selectors.yaml problem ONCE per entry+field, not once per step that resolves it.
|
|
659
|
+
*
|
|
660
|
+
* An entry is resolved again for every step that names it, so an unguarded `diagnostics.add`
|
|
661
|
+
* here repeats the same sentence a dozen times for one typo and buries everything else in the
|
|
662
|
+
* channel. `warnedContentNamed` is the existing de-dupe set; `key` namespaces the callers so two
|
|
663
|
+
* diagnostics about one entry cannot silence each other.
|
|
664
|
+
*/
|
|
665
|
+
warnOnce(key, code, message) {
|
|
666
|
+
if (this.warnedContentNamed.has(key))
|
|
667
|
+
return;
|
|
668
|
+
this.warnedContentNamed.add(key);
|
|
669
|
+
this.diagnostics?.add(code, message, { feature: this.featureName });
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Resolve a selectors.yaml entry that is NOT reachable by key — a `columns.<col>.elements.cell`
|
|
673
|
+
* declaration, which lives nested under a table entry. Public for that one caller; everything
|
|
674
|
+
* addressable by name goes through `resolveSelector`.
|
|
675
|
+
*/
|
|
676
|
+
resolveNestedEntry(entry, originalLabel) {
|
|
677
|
+
return this.resolveFromEntry(entry, originalLabel);
|
|
678
|
+
}
|
|
560
679
|
resolveFromEntry(entry, originalLabel) {
|
|
561
680
|
// Default values
|
|
562
681
|
const locator = entry.locator || '';
|
|
@@ -635,6 +754,28 @@ class SelectorResolver {
|
|
|
635
754
|
// accessible name, so it resolves against its own name (or nothing).
|
|
636
755
|
if (entry.anchor)
|
|
637
756
|
v2Fields.anchor = this.resolveFromEntry(entry.anchor, entry.anchor.name ?? '');
|
|
757
|
+
// Gated on the entry KIND, like the value check below: `query:` means nothing on a non-page
|
|
758
|
+
// entry, and both the field and its diagnostic are worded purely in page terms. Today's two
|
|
759
|
+
// consumers re-check `selectorType === 'page'` at the read site (the `anchor:` precedent), so
|
|
760
|
+
// this is belt-and-braces — but a third consumer that forgets the guard would otherwise inherit
|
|
761
|
+
// a field that was never meant for it.
|
|
762
|
+
if (type === 'page' && entry.query !== undefined) {
|
|
763
|
+
const declared = String(entry.query).trim().toLowerCase();
|
|
764
|
+
// Exactly one value is legal today. A typo must NOT read as the permissive form: it would
|
|
765
|
+
// silently turn off the bare-page query assertion (#464) on a page the author meant to keep
|
|
766
|
+
// strict, which is the class of quiet weakening this whole diagnostic channel exists for.
|
|
767
|
+
if (declared === 'any')
|
|
768
|
+
v2Fields.query = 'any';
|
|
769
|
+
else
|
|
770
|
+
this.warnOnce(`w037:${originalLabel}:query`, 'SG-W037', `selector "${originalLabel}": query: ${JSON.stringify(String(entry.query))} is not a query rule — the only value is \`any\` ("the query is not part of this page's identity"). The declaration is ignored, so a bare \`see [${originalLabel}] page\` still requires the URL to carry NO query at all.`);
|
|
771
|
+
}
|
|
772
|
+
// A page `value` is the PATH only — pathToRegexSource strips a `?`/`#` before building the
|
|
773
|
+
// pattern. Silently, until now: an author who hit the bare-page query rule (#464) and reached
|
|
774
|
+
// for the obvious workaround got byte-identical output and no hint why, which is exactly how
|
|
775
|
+
// #748 was misdiagnosed in the field as a regex-escaping bug.
|
|
776
|
+
if (type === 'page' && typeof entry.value === 'string' && /[?#]/.test(entry.value)) {
|
|
777
|
+
this.warnOnce(`w037:${originalLabel}:value`, 'SG-W037', `selector "${originalLabel}": the page value ${JSON.stringify(entry.value)} carries a query/fragment, which is DROPPED — a page value is the path only, and the pattern is matched against \`u.pathname\`, which never holds one. Writing it here changes nothing. To assert the query, declare it on the step (\`see [${originalLabel}] page with {{v}}\`); to say the query is not part of this page's identity, add \`query: any\` to the entry.`);
|
|
778
|
+
}
|
|
638
779
|
// Helper to attach v2 fields and inputMethod
|
|
639
780
|
const withExtras = (resolved) => {
|
|
640
781
|
if (inputMethod)
|
|
@@ -776,9 +917,15 @@ class SelectorResolver {
|
|
|
776
917
|
nth,
|
|
777
918
|
exact,
|
|
778
919
|
});
|
|
779
|
-
//
|
|
780
|
-
//
|
|
781
|
-
//
|
|
920
|
+
// Native strategies — pass through unchanged; the appium adapter's `appium-selector` switch
|
|
921
|
+
// renders the right WDIO selector (`~` / raw xpath / `android=` / `-ios predicate string:` /
|
|
922
|
+
// `id=`). See issue #392.
|
|
923
|
+
//
|
|
924
|
+
// `id` is NOT mobile-only, whatever this comment used to claim: the legacy branch at the
|
|
925
|
+
// bottom of resolveByPriority extracts `#id` out of a web `locator:` and returns
|
|
926
|
+
// `strategy: 'id'`, and the playwright adapter ships an `id` partial to serve it. The two
|
|
927
|
+
// paths disagree on whether `value` carries the hash, which is why the partial reads the
|
|
928
|
+
// selector through `cssIdSelector` rather than off `value` directly.
|
|
782
929
|
case 'accessibility-id':
|
|
783
930
|
case 'xpath':
|
|
784
931
|
case 'android-uiautomator':
|