@sun-asterisk/sungen 3.2.0 → 3.2.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capabilities/context-router.d.ts +11 -2
- package/dist/capabilities/context-router.d.ts.map +1 -1
- package/dist/capabilities/context-router.js +10 -3
- package/dist/capabilities/context-router.js.map +1 -1
- package/dist/capabilities/discover.js +1 -1
- package/dist/capabilities/discover.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +5 -3
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +31 -0
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +25 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +59 -0
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/types.d.ts +38 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +31 -2
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +144 -1
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/appium-adapter.d.ts +54 -0
- package/dist/generators/test-generator/adapters/appium/appium-adapter.d.ts.map +1 -0
- package/dist/generators/test-generator/adapters/appium/appium-adapter.js +52 -0
- package/dist/generators/test-generator/adapters/appium/appium-adapter.js.map +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/after-all.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/after-each.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/before-all.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/before-each.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/imports.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/scenario.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/alert-accept-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/alert-dismiss-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/alert-fill-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/check-action.hbs +10 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/clear-action.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-action.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-element-with-text.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-select-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/dismiss-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/double-click-action.hbs +6 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/drag-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/expand-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/fill-action.hbs +14 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/fill-editor-action.hbs +12 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/frame-enter-action.hbs +6 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/frame-exit-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hide-keyboard-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/keyboard-global-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/press-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/radio-select-action.hbs +4 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +19 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/select-action.hbs +5 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/table-action-in-row.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/uncheck-action.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/unknown-element-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/upload-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/wait-for-page.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/wait-for-role-with-data.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/actions/wait-for-role.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/alert-text-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/attribute-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/clipboard-text-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/column-cell-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/contain-text-assertion.hbs +14 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/count-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/empty-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/enabled-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/focused-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/have-text-assertion.hbs +15 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/have-value-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/is-hidden-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +12 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/list-item-count-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/loading-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/page-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/route-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/selected-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/sorted-assertion.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/table-column-exists.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/table-empty.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/table-match-data.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/table-row-count.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/table-row-exists.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/table-row-not-exists.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-assertion.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/background-action.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/grant-permission-action.hbs +11 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/long-press-action.hbs +5 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/open-notifications-action.hbs +3 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/pinch-zoom-action.hbs +5 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/pull-to-refresh-action.hbs +5 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/rotate-action.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/set-clipboard-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/set-geolocation-action.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/swipe-action.hbs +5 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/tap-top-action.hbs +24 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/navigation/navigation.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/navigation/wait-for-element-with-text.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/navigation/wait-for-element.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/navigation/wait-timeout.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector-expr.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector.hbs +15 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/partials/locator.hbs +8 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/setup/application-running.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/setup/clear-auth.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/setup/clear-browser-state.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/setup/clear-database.hbs +1 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/setup/user-login-todo.hbs +2 -0
- package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +226 -0
- package/dist/generators/test-generator/adapters/index.d.ts +1 -0
- package/dist/generators/test-generator/adapters/index.d.ts.map +1 -1
- package/dist/generators/test-generator/adapters/index.js +9 -1
- package/dist/generators/test-generator/adapters/index.js.map +1 -1
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +3 -2
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/step-mapper.d.ts +1 -0
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +7 -37
- 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 +13 -1
- package/dist/generators/test-generator/template-engine.js.map +1 -1
- package/dist/harness/audit.d.ts +16 -2
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +74 -11
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/capability-plan.d.ts +2 -0
- package/dist/harness/capability-plan.d.ts.map +1 -1
- package/dist/harness/capability-plan.js +4 -1
- package/dist/harness/capability-plan.js.map +1 -1
- package/dist/harness/catalog/drivers.yaml +1 -1
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +13 -4
- package/dist/harness/flow-check.js.map +1 -1
- package/dist/harness/parse.d.ts +2 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +13 -2
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/quality-gates.d.ts +6 -0
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +15 -1
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/sensors.d.ts +27 -0
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +91 -21
- package/dist/harness/sensors.js.map +1 -1
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +9 -0
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-agent-generator.md +44 -0
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +18 -1
- package/dist/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md +184 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-delivery.md +27 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +2 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-mobile-gestures.md +109 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-selector-fix-mobile.md +316 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +2 -0
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +2 -1
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +184 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +27 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +2 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md +109 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +316 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +2 -0
- package/dist/orchestrator/templates/env.appium.example +25 -0
- package/dist/orchestrator/templates/specs-api.d.ts +7 -0
- package/dist/orchestrator/templates/specs-api.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-api.js +13 -2
- package/dist/orchestrator/templates/specs-api.js.map +1 -1
- package/dist/orchestrator/templates/specs-api.ts +13 -2
- package/dist/orchestrator/templates/specs-pw-shape-reporter.ts +92 -0
- package/dist/orchestrator/templates/wdio.conf.ts +295 -0
- package/dist/utils/selector-types.d.ts +1 -1
- package/dist/utils/selector-types.d.ts.map +1 -1
- package/dist/utils/selector-types.js +5 -0
- package/dist/utils/selector-types.js.map +1 -1
- package/package.json +4 -4
- package/src/capabilities/context-router.ts +15 -3
- package/src/capabilities/discover.ts +1 -1
- package/src/cli/commands/audit.ts +5 -3
- package/src/cli/commands/delivery.ts +32 -2
- package/src/exporters/feature-parser.ts +57 -0
- package/src/exporters/types.ts +38 -0
- package/src/exporters/xlsx-exporter.ts +176 -2
- package/src/generators/test-generator/adapters/appium/appium-adapter.ts +57 -0
- package/src/generators/test-generator/adapters/appium/templates/after-all.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/after-each.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/before-all.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/before-each.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/imports.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/scenario.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/alert-accept-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/alert-dismiss-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/alert-fill-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/check-action.hbs +10 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/clear-action.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-action.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-element-with-text.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-select-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/dismiss-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/double-click-action.hbs +6 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/drag-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/expand-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/fill-action.hbs +14 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/fill-editor-action.hbs +12 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/frame-enter-action.hbs +6 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/frame-exit-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/hide-keyboard-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/keyboard-global-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/press-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/radio-select-action.hbs +4 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/scroll-action.hbs +19 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/select-action.hbs +5 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/table-action-in-row.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/toggle-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/uncheck-action.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/unknown-element-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/upload-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/wait-for-page.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/wait-for-role-with-data.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/actions/wait-for-role.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/alert-text-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/attribute-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/checked-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/clipboard-text-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/column-cell-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/contain-text-assertion.hbs +14 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/count-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/disabled-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/empty-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/enabled-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/focused-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/have-text-assertion.hbs +15 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/have-value-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/is-hidden-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +12 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/list-item-count-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/loading-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/not-checked-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/page-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/route-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/selected-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/sorted-assertion.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/table-column-exists.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/table-empty.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/table-match-data.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/table-row-count.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/table-row-exists.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/table-row-not-exists.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-assertion.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/background-action.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/grant-permission-action.hbs +11 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/long-press-action.hbs +5 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/open-notifications-action.hbs +3 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/pinch-zoom-action.hbs +5 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/pull-to-refresh-action.hbs +5 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/rotate-action.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/set-clipboard-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/set-geolocation-action.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/swipe-action.hbs +5 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/gestures/tap-top-action.hbs +24 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/navigation/navigation.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/navigation/wait-for-element-with-text.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/navigation/wait-for-element.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/navigation/wait-timeout.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector-expr.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/partials/appium-selector.hbs +15 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/partials/locator.hbs +8 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/setup/application-running.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/setup/clear-auth.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/setup/clear-browser-state.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/setup/clear-database.hbs +1 -0
- package/src/generators/test-generator/adapters/appium/templates/steps/setup/user-login-todo.hbs +2 -0
- package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +226 -0
- package/src/generators/test-generator/adapters/index.ts +7 -0
- package/src/generators/test-generator/code-generator.ts +3 -2
- package/src/generators/test-generator/step-mapper.ts +8 -5
- package/src/generators/test-generator/template-engine.ts +13 -1
- package/src/harness/audit.ts +84 -14
- package/src/harness/capability-plan.ts +5 -2
- package/src/harness/catalog/drivers.yaml +1 -1
- package/src/harness/flow-check.ts +13 -4
- package/src/harness/parse.ts +15 -2
- package/src/harness/quality-gates.ts +14 -1
- package/src/harness/sensors.ts +110 -22
- package/src/orchestrator/ai-rules-updater.ts +9 -0
- package/src/orchestrator/templates/ai-instructions/claude-agent-generator.md +44 -0
- package/src/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +18 -1
- package/src/orchestrator/templates/ai-instructions/claude-skill-capture-mobile.md +184 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +27 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +2 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-mobile-gestures.md +109 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-selector-fix-mobile.md +316 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +2 -0
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +2 -1
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-capture-mobile.md +184 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +27 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +2 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-mobile-gestures.md +109 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-selector-fix-mobile.md +316 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +2 -0
- package/src/orchestrator/templates/env.appium.example +25 -0
- package/src/orchestrator/templates/specs-api.ts +13 -2
- package/src/orchestrator/templates/specs-pw-shape-reporter.ts +92 -0
- package/src/orchestrator/templates/wdio.conf.ts +295 -0
- package/src/utils/selector-types.ts +5 -0
|
@@ -71,12 +71,29 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
|
|
|
71
71
|
Summarize what you found in requirements and present to the user.
|
|
72
72
|
|
|
73
73
|
4. Follow the `sungen-tc-generation` skill for section identification, viewpoint generation, and output format. **Viewpoint loading discipline:** `sungen-viewpoint` is a **router** — from the page-type (form / list / detail / auth / dashboard …) read **only the matching group file(s)** (e.g. a login screen → group-e-identity; a product list → group-c-data-explore), never all five groups. This keeps the generation context lean. **For flows**, use the "Flow Test Generation" section in the skill. When requirements exist, use the "Requirements-Driven Generation" strategy. **For Tier 1**, apply the **Lightweight Guard** — verify required fields, validation rules, business rules, security checks, and key state transitions all have TCs after generation. **For Tier 2+**, **MUST** apply the full **Mapping Contract** — walk every `spec.md` section top-to-bottom and produce the indicated TCs per Table 1; handle `test-viewpoint.md` per Table 2. Do not silently skip sections.
|
|
74
|
-
5. Generate
|
|
74
|
+
5. Generate `.feature` + `test-data.yaml` following `sungen-gherkin-syntax` and `sungen-tc-generation`. **Partition the work into shards and generate them in parallel** when there are ≥2.
|
|
75
|
+
|
|
76
|
+
**5a. Decide the shards.** A shard is one **coverage unit** sized for parallelism — NOT the 5 coarse viewpoint-router groups (a screen loads only 1–2 of those). Use **either**:
|
|
77
|
+
- one **viewpoint theme** per shard — a `VP-` prefix from the viewpoint overview (`VP-SEC`, `VP-ERROR-EMPTY-STATE`, `VP-CAROUSEL`, …) — preferred when the viewpoint overview is rich (test-2/home had 47 items across many themes); **or**
|
|
78
|
+
- one **`spec.md` section** per shard (the Mapping Contract walk, Table 1) — preferred when generating from spec.
|
|
79
|
+
Each shard owns a disjoint `VP-` prefix ⇒ ids never collide. One shard → skip to 5c (no fan-out gain).
|
|
80
|
+
|
|
81
|
+
**5b. Parallel fan-out (Claude Code).** Spawn one **`sungen-generator`** sub-agent **per shard** (Task tool, `subagent_type: sungen-generator`) — issue all the Task calls **in a single message** so they run concurrently. Pass each: its shard (theme/section) + viewpoint slice, the **`sungen-discovery` report** (Step 3), only the `spec.md` section(s) it maps to, which one `sungen-viewpoint` group file holds its patterns, the unit (screen/flow) + name + tier, and its fragment paths `.sungen/fragments/<name>/<shard>.{feature,test-data.yaml}`. Each writes a **headerless** fragment + a test-data fragment and returns a compact summary. Small fragments also keep every generator under the output-token cap (the reason the single-pass path writes incrementally).
|
|
82
|
+
|
|
83
|
+
**5c. Merge (orchestrator — barrier; only after all generators return).**
|
|
84
|
+
- Write the final `qa/<screens|flows>/<name>/features/<name>.feature`: one `Feature:` header (+ `@flow` for flows), then concatenate the fragments in **stable order** — spec-section order top-to-bottom (or theme order from the viewpoint overview) — so output is coherent and reproducible across runs.
|
|
85
|
+
- **Dedup** cross-shard scenarios with near-identical titles (a generic "navigation works" from two shards): keep the earlier shard's, drop the duplicate, note it. No id renumber needed — prefixes are disjoint by construction.
|
|
86
|
+
- **Union** the test-data fragments into `test-data.yaml`; dedup keys, and **flag** any key two shards define with different values.
|
|
87
|
+
- Delete `.sungen/fragments/<name>/` once merged.
|
|
88
|
+
- Guarantees a **coherent** suite (no dup, valid ids, passes `audit`), not a byte-identical one — generation is AI-authored; the determinism asset lives downstream in the Gherkin→`.spec.ts` compiler.
|
|
89
|
+
|
|
90
|
+
**5d. Sequential fallback.** Use the single-context incremental path (Step 2: tier-by-tier `Write`/`Edit` batches) when: only **one** shard applies, **Copilot / no sub-agents**, or a constrained setup. Same output, just no speedup. **For flows**: `[Screen:Element]` namespace refs, test-data namespaced by phase, `@flow` tag.
|
|
75
91
|
|
|
76
92
|
5.5. **Quality gate & repair (harness — always run, do NOT skip).** Follow the `sungen-harness-audit` skill:
|
|
77
93
|
- Run `sungen audit --screen <name>` (Bash) and read `gateStatus` + `findings` (deterministic, structural).
|
|
78
94
|
- **Independent semantic review.** **Claude Code:** spawn the **`sungen-reviewer`** sub-agent (Task tool, `subagent_type: sungen-reviewer`) — it judges what the gate can't (does each scenario's steps PROVE its title/viewpoint, observable Thens, business-critical assertion depth) and returns `VERDICT` + `ISSUES` with concrete fixes. **Merge its NEEDS-REPAIR issues with the audit findings.** (Copilot / no sub-agents: run the same review inline using the `sungen-reviewer` criteria.)
|
|
79
95
|
- Repair **both** the audit findings and the reviewer issues (budget 3 rounds), then re-audit:
|
|
96
|
+
- **Repair runs single-agent by default** (it edits the one `.feature` — concurrent edits to the same file conflict, and BALANCE/dedup needs whole-suite context). **Exception:** a finding that is purely **additive new coverage** (GATE missing-theme → generate scenarios for an uncovered theme) is just more shards — fan it out as `sungen-generator` sub-agent(s) (new disjoint `VP-` prefix) and merge, exactly like Step 5b. Findings that **edit existing** scenarios (DEPTH/BALANCE/TRACE) stay serial.
|
|
80
97
|
- If the gate FAILs or there are findings, **repair** (budget 3 rounds), then re-audit:
|
|
81
98
|
- **GATE** missing critical theme → generate scenarios for it. If it is **cross-screen** (cart-correctness, product-detail-consistency, filter-result-correctness): **automate it in the flow** (`/sungen:add-flow` if none exists) with observable data assertions (`... with {{value}}`, `see all ... contain {{v}}`) — a single home→target journey runs as one Playwright test. Do **not** write a full `@manual` duplicate of it on the screen (that is a non-running dead copy — `sungen audit` flags it `MANUAL-AUTOMATABLE`), and do **not** fake a shallow single-screen pass. Reserve `@manual` for true judgment / missing-capability, tagged `@manual:Mx`.
|
|
82
99
|
- **DEPTH** → replace `see [X] page/section` on business-critical scenarios with data assertions.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sungen-capture-mobile
|
|
3
|
+
description: 'Capture a live mobile app screen via Appium MCP — locator tree + screenshot for visual context. Auto-loaded by create-test when the screen is @platform:mobile/android/ios.'
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Launch a mobile app on a device/emulator, capture **one locator tree** (`generate_locators`) and **one screenshot**, and save them as visual context for test generation. The mobile analogue of `sungen-capture-live` — same job, Appium MCP instead of Playwright MCP.
|
|
10
|
+
|
|
11
|
+
Use when the target is a native/Flutter/React-Native app (`@platform:android` or `@platform:ios`) running on a connected device or emulator.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- `appium-mcp` connected (see `/mcp`). It runs Appium **embedded** — no separate server needed.
|
|
18
|
+
- A device/emulator booted: `adb devices` shows one for Android; a Simulator for iOS.
|
|
19
|
+
- The app **installed** on the device (`adb install -r <app>.apk` for Android).
|
|
20
|
+
- The screen's `Path:` (in `<screen>/features/*.feature` or `spec.md`) gives the app entry as
|
|
21
|
+
`<appPackage>/<appActivity>` (Android) or bundleId (iOS), e.g. `com.kngroup.media.converter/.MainActivity`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
|
|
27
|
+
### 1. Resolve target app + entry
|
|
28
|
+
|
|
29
|
+
Resolve in this order:
|
|
30
|
+
1. `Path:` line in the feature / `App ID` in `spec.md` → split into `appPackage` + `appActivity`.
|
|
31
|
+
A dual-id Path (`<pkg>/<activity> | <iosBundleId>`) → take the part for the OS you are exploring
|
|
32
|
+
(left of `|` = Android pkg/activity, right = iOS bundle id).
|
|
33
|
+
2. If missing → `AskUserQuestion`: *"What is the appPackage/appActivity (Android) or bundleId (iOS)?"*
|
|
34
|
+
3. **Navigation recipe** — read the feature's `Background:` (the in-app web-path analog). Line 1
|
|
35
|
+
`Given User is on [Home] screen` is the launcher/landing screen the app opens on; each following
|
|
36
|
+
`When/And User tap [...]` (or gesture) is one hop toward the target screen. You will **replay**
|
|
37
|
+
these in step 4.5 so you scan the screen this feature targets — not the launcher. An anchor-only
|
|
38
|
+
Background (no nav steps) ⇒ the target IS the launcher screen ⇒ no navigation needed.
|
|
39
|
+
|
|
40
|
+
### 2. Select device
|
|
41
|
+
|
|
42
|
+
`select_device` with `platform: android` (or `ios`). If exactly one device, it auto-selects.
|
|
43
|
+
If several, list them and ask the user which `deviceUdid`.
|
|
44
|
+
|
|
45
|
+
### 3. Create the session
|
|
46
|
+
|
|
47
|
+
`appium_session_management` `action=create`, `platform=android`, capabilities (JSON string):
|
|
48
|
+
```
|
|
49
|
+
appium:appPackage, appium:appActivity, appium:udid,
|
|
50
|
+
appium:noReset=true, appium:autoGrantPermissions=true, appium:newCommandTimeout=300
|
|
51
|
+
```
|
|
52
|
+
For iOS, call `prepare_ios_simulator` first, then create with `appium:bundleId`.
|
|
53
|
+
|
|
54
|
+
### 4. ⚠️ Wait for the screen to actually render
|
|
55
|
+
|
|
56
|
+
**This is the #1 gotcha for Flutter / RN apps.** Right after launch the app often shows a blank
|
|
57
|
+
splash — and the locator tree will contain **zero usable elements** (just an empty `FrameLayout`).
|
|
58
|
+
Do **not** capture yet. Take a quick `appium_screenshot`; if it's blank/splash, wait and re-check
|
|
59
|
+
until real content is drawn. Only then capture. (A Flutter app on a loading screen looks "invisible"
|
|
60
|
+
to Appium; the same app on a rendered screen exposes its full Semantics tree.)
|
|
61
|
+
|
|
62
|
+
### 4.5. ⚠️ Navigate to the target screen (replay the navigation recipe)
|
|
63
|
+
|
|
64
|
+
**This is what makes capture land on the RIGHT screen** — the mobile equivalent of `page.goto(url)`
|
|
65
|
+
on web. After the launcher screen has rendered, replay the `Background:` nav steps so Appium ends up
|
|
66
|
+
on the screen this feature targets, *then* capture there.
|
|
67
|
+
|
|
68
|
+
For each nav step **after** the `Given User is on [Home] screen` anchor, in order:
|
|
69
|
+
1. `generate_locators` (or `appium_get_page_source`) on the CURRENT screen.
|
|
70
|
+
2. Resolve the step's `[Label]` against the live tree — prefer `accessibility id`, then visible
|
|
71
|
+
`text`/`content-desc`, then an `xpath` on a distinctive substring. Gestures (`scroll to [X]`,
|
|
72
|
+
`swipe …`) follow `sungen-mobile-gestures`.
|
|
73
|
+
3. Perform the tap/gesture, then **wait for the next screen to render** (same blank-splash guard as
|
|
74
|
+
step 4) before the next step.
|
|
75
|
+
|
|
76
|
+
After the LAST step you are on the target screen — capture HERE (steps 5–6).
|
|
77
|
+
|
|
78
|
+
- **Anchor-only Background** (no nav steps) ⇒ the target IS the launcher screen ⇒ skip this step.
|
|
79
|
+
- **A step won't resolve** (its `[Label]` matches no element) ⇒ **STOP. Do not capture the wrong
|
|
80
|
+
screen.** Screenshot where you are and report: *"recipe step N: [Label] not found — fix the
|
|
81
|
+
Background nav path."* Fail loud (run-test would fail at the same step anyway).
|
|
82
|
+
- **No recipe yet** (guided-stub Background, but the target is NOT the launcher) ⇒ drive to the
|
|
83
|
+
screen interactively off the live tree (if unsure which control leads there, `AskUserQuestion`),
|
|
84
|
+
then **report the exact nav steps you took** so create-test/add-screen can write them into the
|
|
85
|
+
Background. Do **not** edit the `.feature` yourself — Gherkin authorship stays with those commands.
|
|
86
|
+
|
|
87
|
+
### 5. Capture the locator tree (primary AI context)
|
|
88
|
+
|
|
89
|
+
Call **`generate_locators`** — this is the mobile equivalent of the web accessibility snapshot. It
|
|
90
|
+
returns priority-ranked locators per interactable element: `accessibility id`, `id`, platform-native
|
|
91
|
+
(`-android uiautomator` / `-ios predicate string`), and `xpath`, plus `content-desc`/`text`,
|
|
92
|
+
`clickable`, `enabled`. This is what `sungen-tc-generation` and `sungen-selector-keys` consume.
|
|
93
|
+
|
|
94
|
+
If the tree is huge, also `appium_get_page_source` (saved to a file) and grep it — never dump the
|
|
95
|
+
full XML inline.
|
|
96
|
+
|
|
97
|
+
### 6. Screenshot
|
|
98
|
+
|
|
99
|
+
`appium_screenshot` → save to:
|
|
100
|
+
```
|
|
101
|
+
qa/screens/<screen>/requirements/ui/mobile-<timestamp>.png
|
|
102
|
+
```
|
|
103
|
+
`<timestamp>` = `YYYYMMDD-HHMM` local (e.g. `mobile-20260605-1645.png`).
|
|
104
|
+
|
|
105
|
+
### 7. Detect discrepancies vs spec
|
|
106
|
+
|
|
107
|
+
If `spec.md` exists, cross-check `generate_locators` labels against spec sections (fields in spec but
|
|
108
|
+
not on screen, and vice-versa). Report; do **not** auto-edit `spec.md`.
|
|
109
|
+
|
|
110
|
+
### 8. End the session
|
|
111
|
+
|
|
112
|
+
`appium_session_management` `action=delete` to free the device. Always clean up.
|
|
113
|
+
|
|
114
|
+
### 9. Report back
|
|
115
|
+
|
|
116
|
+
> Captured mobile screen `<appPackage>`:
|
|
117
|
+
> - Reached via: <N nav steps replayed from the Background recipe, or "launcher screen — no nav">
|
|
118
|
+
> - Locators: <N> interactable elements (M with accessibility-id)
|
|
119
|
+
> - Screenshot: `requirements/ui/mobile-<timestamp>.png`
|
|
120
|
+
> - Discrepancies vs spec: <count, or "none">
|
|
121
|
+
> - Discovered nav steps (only if the recipe was empty): <the taps you took, for create-test/add-screen to write into the Background>
|
|
122
|
+
|
|
123
|
+
Hand back to the calling command.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Cross-platform discovery (`@platform:mobile` — explore one OS, layer the rest)
|
|
128
|
+
|
|
129
|
+
When the screen is **`@platform:mobile`** (write-once-run-both), discover the **shared** cases first,
|
|
130
|
+
then peel off only what is genuinely OS-specific. You do **not** need to explore both OSes up front —
|
|
131
|
+
Flutter/RN expose the same Semantics on each, so one exploration covers most of it.
|
|
132
|
+
|
|
133
|
+
1. **Explore whichever OS has a device up** (Android or iOS — symmetric for Flutter). Capture the tree.
|
|
134
|
+
2. **Classify each component** into THREE buckets (not two):
|
|
135
|
+
- **Shared-exact** → a stable `accessibility id` equal on both OSes (Flutter Semantics → same value on
|
|
136
|
+
Android `content-desc` AND iOS `name`) → flat `type: accessibility-id` key in `<screen>.feature`.
|
|
137
|
+
- **Shared-variant** → SAME step/assertion on both OSes but the LOCATOR differs (composite
|
|
138
|
+
`content-desc` vs `-ios predicate`; partial/dynamic text via `descriptionContains` vs predicate
|
|
139
|
+
`CONTAINS`; a different attribute) → STILL `<screen>.feature`, with `android:`/`ios:` variant keys in
|
|
140
|
+
selectors.yaml. **A native locator alone is NOT a reason to split** — default for composite/partial text.
|
|
141
|
+
- **Sub-feature** → ONLY for genuine SCENARIO divergence: an element on ONE OS only, divergent
|
|
142
|
+
steps/flow, an OS-exclusive gesture/permission/dialog flow, or a case needing a per-platform
|
|
143
|
+
`nth`/`scope` (a variant can't diverge those). → `<screen>-android.feature` / `<screen>-ios.feature`.
|
|
144
|
+
3. **Report the classification** so create-test/run-test scaffolds the right thing:
|
|
145
|
+
- `<screen>.feature` `@platform:mobile` ← shared-exact AND shared-variant (the vast majority)
|
|
146
|
+
- `<screen>-android.feature` `@platform:android` ← ONLY scenario-divergent Android cases
|
|
147
|
+
- `<screen>-ios.feature` `@platform:ios` ← ONLY scenario-divergent iOS cases
|
|
148
|
+
4. **Verifying the other OS needs no second exploration** — just running the shared spec there
|
|
149
|
+
(`MOBILE_PLATFORM=both`) IS the check. Re-capture on the 2nd OS only for components that fail, and
|
|
150
|
+
move those into that OS's sub-feature. (Asking devs to add a Semantics label to an unlabeled element
|
|
151
|
+
converts an OS-specific case back into a shared one — prefer that when feasible.)
|
|
152
|
+
|
|
153
|
+
## Selector-quality notes (carry into selectors.yaml)
|
|
154
|
+
|
|
155
|
+
- **Prefer `accessibility id`** (Android `content-desc` / iOS `accessibilityIdentifier`) — most stable.
|
|
156
|
+
- For **Flutter**, the Semantics label surfaces as `content-desc` ⇒ it usually equals the **visible
|
|
157
|
+
text**, so it is **locale-dependent** ("Good afternoon!", "English"). Keep such values in test-data
|
|
158
|
+
and use `{{variable}}` + locale overlays (see `sungen-locale`).
|
|
159
|
+
- **Composite nodes**: cards may concatenate child text into one `content-desc` with `\n` → prefer an
|
|
160
|
+
xpath `contains(@content-desc,'…')` on a distinctive substring.
|
|
161
|
+
- **Duplicate labels** → use `nth`. **Unlabelled controls** (search fields, icon buttons) → fall back
|
|
162
|
+
to `xpath` / class.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## What this skill does NOT do
|
|
167
|
+
|
|
168
|
+
- Does not run tests or generate `selectors.yaml` (that's `/sungen:run-test` + `sungen-selector-fix-mobile`)
|
|
169
|
+
- Does not generate Gherkin (that's `sungen-tc-generation`) — it may *report* discovered nav steps,
|
|
170
|
+
but writing them into the Background is create-test/add-screen's job
|
|
171
|
+
- Does not handle login/auth state (mobile auth is a separate concern — deep link / test build)
|
|
172
|
+
- Captures **the feature's target screen** per invocation — reached by replaying the Background
|
|
173
|
+
navigation recipe (step 4.5), not just the launcher. For a *different* screen, give it its own
|
|
174
|
+
feature + recipe and re-invoke.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Relationship to other capture skills
|
|
179
|
+
|
|
180
|
+
- `sungen-capture-figma` / `sungen-capture-local` — design/image sources (platform-agnostic)
|
|
181
|
+
- `sungen-capture-live` — web (Playwright MCP)
|
|
182
|
+
- `sungen-capture-mobile` — this skill, mobile (Appium MCP)
|
|
183
|
+
|
|
184
|
+
All write to `requirements/ui/` and report back to the caller.
|
|
@@ -88,6 +88,33 @@ Multi-locale (no `SUNGEN_ENV`): one **`<LOCALE> Auto`** sheet per locale + a sin
|
|
|
88
88
|
|
|
89
89
|
---
|
|
90
90
|
|
|
91
|
+
## API delivery — extra worksheet
|
|
92
|
+
|
|
93
|
+
For **api-kind units** (`qa/api/<area>/`), the `.xlsx` gains a third worksheet **`API detail`** (appended after Auto/Manual). The main BM-2-901-13 Testcases layout is unchanged. The CSV is unchanged (16-column, no extra sheet).
|
|
94
|
+
|
|
95
|
+
### Required sources (API detail sheet only)
|
|
96
|
+
|
|
97
|
+
| Source | Path | Created by |
|
|
98
|
+
|--------|------|------------|
|
|
99
|
+
| Endpoint catalog | `qa/api/<area>/api/apis.yaml` | `sungen add --api` or `sungen api import` |
|
|
100
|
+
| Scenario annotations | `qa/api/<area>/features/<feature>.feature` | `create-test` |
|
|
101
|
+
|
|
102
|
+
### API detail column mapping
|
|
103
|
+
|
|
104
|
+
| Column | Source |
|
|
105
|
+
|--------|--------|
|
|
106
|
+
| Endpoint | `path` from `apis.yaml` catalog entry |
|
|
107
|
+
| Method | `method` from catalog entry (uppercased) |
|
|
108
|
+
| Auth / Datasource | catalog `datasource` + any `@auth:<role>` tag from scenarios calling this endpoint |
|
|
109
|
+
| Request shape | catalog `body` + `params` fields composed as `body: {…}; params: [a, b]` |
|
|
110
|
+
| Expected-status matrix | `@cases:<dataset>` label for data-driven scenarios; catalog `expect.status` as fallback |
|
|
111
|
+
| Flow steps | Ordered `@api:<name>` call chain from multi-call scenarios (e.g. `register → count_users`) |
|
|
112
|
+
| Concurrency invariant | `@concurrent:<N>` + `@query:<oracle>` from concurrent scenarios (e.g. `ok_count=2; @query user_count`) |
|
|
113
|
+
|
|
114
|
+
**Sources are catalog + annotations only** — Field Metadata (FM) is not required for this sheet.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
91
118
|
## Excluded from CSV
|
|
92
119
|
|
|
93
120
|
- `@steps:<name>` **base** scenarios — these are setup-only, inlined into `@extend:...` scenarios at compile time
|
|
@@ -214,6 +214,8 @@ Options: `nth` `exact` `scope` `match` `variant` `frame` `contenteditable` `colu
|
|
|
214
214
|
| `@cases:dataset` | Data-driven: run the scenario once per row of the `dataset` LIST in test-data → one `test()` per row |
|
|
215
215
|
| `@query:name` | Database: run the named query from `database/queries.yaml` (precondition) and bind its rows to `{{name}}`; assert with `expect {{name.count}} …` + path access. Override params `@query:name(p={{v}})`. Repeatable. (Optional Data Driver — see Database verification above) |
|
|
216
216
|
| `@api:name` | API: run the named request from `api/apis.yaml` (precondition) and bind the response to `{{name}}`; assert with `expect {{name.status}} …` + path access (`{{name.body.<path>}}`). Override params `@api:name(p={{v}})`. Repeatable. (Optional API Driver) |
|
|
217
|
+
| `@concurrent:N` | API idempotency: fire the bound `@api` request N times in parallel, then bind aggregates on the `@api` name — `{{name.ok_count}}` (2xx count) and `{{name.status_counts}}` (status→count map). Assert the exactly-once invariant (`expect {{name.ok_count}} is 1`); pair with `@query` as a DB oracle. Tag order = run order: `@api` (mutate) before `@query` (verify). (Optional API Driver) |
|
|
218
|
+
| `@hybrid` | One unit, two capabilities: a signed-in browser session (UI) authorizes the `@api` call — the API request reuses the UI `storageState`. (Optional API + UI Drivers) |
|
|
217
219
|
|
|
218
220
|
### Data-driven scenarios (`@cases`)
|
|
219
221
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sungen-mobile-gestures
|
|
3
|
+
description: 'Mobile gesture patterns (swipe, long-press, scroll-to, pinch, pull-to-refresh) — Gherkin syntax + Appium MCP mapping. Auto-loaded for @platform:mobile/android/ios screens.'
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Document the **mobile-only interactions** that have no web equivalent, so the AI can (a) drive them
|
|
10
|
+
during exploration via Appium MCP and (b) write Gherkin steps for them. These are gestures the web
|
|
11
|
+
patterns (`click`, `hover`, `fill`) don't cover.
|
|
12
|
+
|
|
13
|
+
> Codegen status (Phase 3): the Appium adapter now **compiles** these gesture steps to WebdriverIO:
|
|
14
|
+
> - **`tap` / `taps`** — synonym for `click` (→ `.click()`); **`double-tap`** → double-click.
|
|
15
|
+
> - **`scroll to [X]`** → `.scrollIntoView()` (shared `scroll-action` template).
|
|
16
|
+
> - **`swipe <dir> on [X]`** → `mobile: swipeGesture`.
|
|
17
|
+
> - **`long-press [X] [for N seconds]`** → `mobile: longClickGesture`.
|
|
18
|
+
> - **`rotate to landscape|portrait`** → `driver.setOrientation(...)`.
|
|
19
|
+
> - **`pull-to-refresh on [X]`** → fast `mobile: swipeGesture` (direction down).
|
|
20
|
+
> - **`pinch-zoom in|out on [X]`** → `mobile: pinchOpenGesture` / `pinchCloseGesture`.
|
|
21
|
+
> - **`send app to background for N seconds`** → `driver.background(N)`.
|
|
22
|
+
> - **`open notification panel`** → `driver.openNotifications()`. **Android-only** — XCUITest has no
|
|
23
|
+
> notification-shade automation; on iOS the generated step throws loud. Keep such scenarios `@platform:android`.
|
|
24
|
+
> - **`tap top of [X]`** / **`tap [X] at top`** → tap the element's **visible top edge** (`mobile: clickGesture`
|
|
25
|
+
> at top-centre from the element bounds) instead of its centre — use when the centre is occluded by a
|
|
26
|
+
> floating bottom bar so a normal centre tap would hit the bar.
|
|
27
|
+
>
|
|
28
|
+
> Still exploration-only (no codegen yet): grant/deny permissions, clipboard set/get, dismiss system
|
|
29
|
+
> dialog — author with the `appium_*` tool calls below; templates land in a later phase.
|
|
30
|
+
>
|
|
31
|
+
> 📜 **`scroll to [X]` — two failure modes seen, with the real cause (measured):**
|
|
32
|
+
> 1. *"Default scrollable element '//android.widget.ScrollView' not found"* — wdio's mobile scroll runs
|
|
33
|
+
> `$$('//android.widget.ScrollView')` and throws if 0 match. This is **state-dependent**: that node
|
|
34
|
+
> exists on a list/Home screen but NOT on every screen (tool/tab screens may lack it). If scroll runs
|
|
35
|
+
> while the app is on a screen without one → this error. Not "the screen can't scroll".
|
|
36
|
+
> 2. **`.scrollIntoView()` is a NO-OP when the target is already inside the scroll viewport** — even if it's
|
|
37
|
+
> visually **occluded by a floating bottom nav**. scrollIntoView only scrolls things that are *off-screen*;
|
|
38
|
+
> it has no concept of z-order occlusion (verified: element bounds identical before/after, centre tap
|
|
39
|
+
> still hit the nav). So scroll **cannot** fix an occluded-by-overlay element → use **`tap top of [X]`**
|
|
40
|
+
> (visible-point tap), not scroll.
|
|
41
|
+
>
|
|
42
|
+
> `scroll to [X]` is still useful for genuinely **off-screen** items: it uses Android `UiScrollable`
|
|
43
|
+
> (accessibility-id targets) or a `mobile: scrollGesture` fallback.
|
|
44
|
+
>
|
|
45
|
+
> ⚠️ **Flutter note:** `.scrollIntoView()` looks for a native `android.widget.ScrollView`. Flutter
|
|
46
|
+
> (and some RN) scrollables don't expose one, and a screen whose content fits the viewport isn't
|
|
47
|
+
> scrollable at all — there `scroll to` fails or no-ops. For an element merely **occluded by a floating
|
|
48
|
+
> bottom nav** on a non-scrollable screen, neither scroll nor `element.click()` (taps the occluded
|
|
49
|
+
> centre) works; that needs a visible-point/coordinate tap (not yet supported) → tag such a scenario
|
|
50
|
+
> `@manual` for now.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Gesture catalog
|
|
55
|
+
|
|
56
|
+
All map to the `appium_gesture` MCP tool (action + params). Element-relative gestures pass `elementUUID`
|
|
57
|
+
from `appium_find_element`; screen gestures pass `direction` or coordinates.
|
|
58
|
+
|
|
59
|
+
| Intent | Proposed Gherkin | `appium_gesture` |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| Tap | `User tap [Settings]` | `action=tap, elementUUID` |
|
|
62
|
+
| Double-tap | `User double-tap [Photo]` | `action=double_tap, elementUUID` |
|
|
63
|
+
| Long-press | `User long-press [Item] for 2 seconds` | `action=long_press, elementUUID, duration=2000` |
|
|
64
|
+
| Swipe (dismiss/switch/carousel) | `User swipe left on [Card]` | `action=swipe, elementUUID, direction=left` |
|
|
65
|
+
| Pull-to-refresh | `User pull-to-refresh on [Feed]` | `action=swipe, direction=down, speed=fast` |
|
|
66
|
+
| Scroll a list | `User scroll down on [Feed]` | `action=scroll, direction=down` |
|
|
67
|
+
| Scroll until visible | `User scroll to [Footer]` | `action=scroll_to_element, strategy, selector, direction` |
|
|
68
|
+
| Pinch zoom in/out | `User pinch-zoom in on [Map]` | `action=pinch_zoom, elementUUID, scale` (>1 in, <1 out) |
|
|
69
|
+
| System back | `User go back` | `action=back` |
|
|
70
|
+
| Drag & drop | `User drag [A] onto [B]` | `appium_drag_and_drop` (separate tool) |
|
|
71
|
+
|
|
72
|
+
Other device-level actions (separate MCP tools, future Gherkin):
|
|
73
|
+
- Rotate: `appium_orientation` — `User rotate to landscape`
|
|
74
|
+
- Permission dialog: `appium_mobile_permissions` / `appium_alert` — `User grant [Location] permission`
|
|
75
|
+
- Background/foreground: `appium_app_lifecycle` — `User send app to background for 5 seconds`
|
|
76
|
+
- Clipboard: `appium_mobile_clipboard` — `User paste into [Field]`
|
|
77
|
+
- Notifications: open panel via `appium_mobile_device_control`
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Authoring guidance
|
|
82
|
+
|
|
83
|
+
- **Prefer `scroll_to_element` over blind scrolling.** When a target may be off-screen, use
|
|
84
|
+
`appium_gesture action=scroll_to_element` (same strategy+selector as the find) rather than repeated
|
|
85
|
+
`appium_find_element` — it stops when the element appears or the page stops scrolling.
|
|
86
|
+
- **Direction semantics**: `swipe` = dismiss / switch screen / carousel / pull-to-refresh (use
|
|
87
|
+
`speed=fast`); `scroll` = browse content in a list/feed. Choose by intent, not interchangeably.
|
|
88
|
+
- **Long-press duration**: default 2000ms; pass `duration` for context menus that need a longer hold.
|
|
89
|
+
- **Element vs screen**: pass `elementUUID` to gesture relative to an element; omit it (+ `direction`)
|
|
90
|
+
to gesture on the whole screen.
|
|
91
|
+
- **Gestures in the navigation recipe**: a `Background:` step like `When User scroll to [X]` or
|
|
92
|
+
`And User swipe up on [Feed]` is a valid nav hop — `sungen-capture-mobile` replays it to reach the
|
|
93
|
+
target screen before scanning (see "Background = the navigation recipe" in `sungen-gherkin-syntax`).
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Selectors for gestures
|
|
98
|
+
|
|
99
|
+
Same rules as `sungen-selector-fix-mobile`: `accessibility-id` first, then `id`, platform-native, xpath.
|
|
100
|
+
For `scroll_to_element`, the `strategy`+`selector` you pass are the target you're scrolling toward — keep
|
|
101
|
+
them stable (accessibility-id) so the scroll terminates reliably.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## What this skill does NOT do
|
|
106
|
+
|
|
107
|
+
- Does not implement gesture codegen (templates land in a later phase).
|
|
108
|
+
- Does not replace `sungen-gherkin-syntax` — it supplements it with the mobile-only step vocabulary.
|
|
109
|
+
- Does not cover tap/set-value/assertions (those are the shared Tier-1 patterns already supported).
|