@sun-asterisk/sungen 3.2.28 → 3.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. package/dist/capabilities/discover.d.ts +29 -0
  2. package/dist/capabilities/discover.d.ts.map +1 -1
  3. package/dist/capabilities/discover.js +144 -10
  4. package/dist/capabilities/discover.js.map +1 -1
  5. package/dist/capabilities/registry.d.ts +18 -0
  6. package/dist/capabilities/registry.d.ts.map +1 -1
  7. package/dist/capabilities/registry.js +25 -0
  8. package/dist/capabilities/registry.js.map +1 -1
  9. package/dist/cli/commands/audit.d.ts.map +1 -1
  10. package/dist/cli/commands/audit.js +9 -0
  11. package/dist/cli/commands/audit.js.map +1 -1
  12. package/dist/cli/commands/capability.js +1 -1
  13. package/dist/cli/commands/capability.js.map +1 -1
  14. package/dist/cli/commands/delivery.d.ts.map +1 -1
  15. package/dist/cli/commands/delivery.js +2 -1
  16. package/dist/cli/commands/delivery.js.map +1 -1
  17. package/dist/cli/commands/generate.d.ts.map +1 -1
  18. package/dist/cli/commands/generate.js +6 -2
  19. package/dist/cli/commands/generate.js.map +1 -1
  20. package/dist/cli/commands/inspect.js +1 -1
  21. package/dist/cli/commands/inspect.js.map +1 -1
  22. package/dist/cli/commands/results-merge.d.ts.map +1 -1
  23. package/dist/cli/commands/results-merge.js +9 -2
  24. package/dist/cli/commands/results-merge.js.map +1 -1
  25. package/dist/cli/commands/results-sanitize.d.ts +24 -0
  26. package/dist/cli/commands/results-sanitize.d.ts.map +1 -0
  27. package/dist/cli/commands/results-sanitize.js +126 -0
  28. package/dist/cli/commands/results-sanitize.js.map +1 -0
  29. package/dist/cli/commands/script-check.d.ts.map +1 -1
  30. package/dist/cli/commands/script-check.js +3 -1
  31. package/dist/cli/commands/script-check.js.map +1 -1
  32. package/dist/cli/commands/update.d.ts.map +1 -1
  33. package/dist/cli/commands/update.js +3 -0
  34. package/dist/cli/commands/update.js.map +1 -1
  35. package/dist/dashboard/templates/index.html +1 -1
  36. package/dist/exporters/api-testcase-formatter.d.ts +3 -6
  37. package/dist/exporters/api-testcase-formatter.d.ts.map +1 -1
  38. package/dist/exporters/api-testcase-formatter.js +7 -10
  39. package/dist/exporters/api-testcase-formatter.js.map +1 -1
  40. package/dist/exporters/feature-parser.d.ts +1 -1
  41. package/dist/exporters/feature-parser.js +1 -1
  42. package/dist/exporters/matrix/build.d.ts.map +1 -1
  43. package/dist/exporters/matrix/build.js +18 -3
  44. package/dist/exporters/matrix/build.js.map +1 -1
  45. package/dist/exporters/matrix/item-labels.d.ts +35 -0
  46. package/dist/exporters/matrix/item-labels.d.ts.map +1 -0
  47. package/dist/exporters/matrix/item-labels.js +90 -0
  48. package/dist/exporters/matrix/item-labels.js.map +1 -0
  49. package/dist/exporters/matrix/render-coverage-sheet.d.ts +14 -0
  50. package/dist/exporters/matrix/render-coverage-sheet.d.ts.map +1 -0
  51. package/dist/exporters/matrix/render-coverage-sheet.js +162 -0
  52. package/dist/exporters/matrix/render-coverage-sheet.js.map +1 -0
  53. package/dist/exporters/matrix/render-csv.d.ts.map +1 -1
  54. package/dist/exporters/matrix/render-csv.js +3 -1
  55. package/dist/exporters/matrix/render-csv.js.map +1 -1
  56. package/dist/exporters/matrix/render-overview-sheet.d.ts +20 -0
  57. package/dist/exporters/matrix/render-overview-sheet.d.ts.map +1 -0
  58. package/dist/exporters/matrix/render-overview-sheet.js +32 -0
  59. package/dist/exporters/matrix/render-overview-sheet.js.map +1 -0
  60. package/dist/exporters/matrix/render-testcase-sheet.d.ts +30 -0
  61. package/dist/exporters/matrix/render-testcase-sheet.d.ts.map +1 -0
  62. package/dist/exporters/matrix/render-testcase-sheet.js +156 -0
  63. package/dist/exporters/matrix/render-testcase-sheet.js.map +1 -0
  64. package/dist/exporters/matrix/render-xlsx.d.ts +41 -31
  65. package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
  66. package/dist/exporters/matrix/render-xlsx.js +72 -425
  67. package/dist/exporters/matrix/render-xlsx.js.map +1 -1
  68. package/dist/exporters/matrix/result-totals.d.ts +23 -0
  69. package/dist/exporters/matrix/result-totals.d.ts.map +1 -0
  70. package/dist/exporters/matrix/result-totals.js +21 -0
  71. package/dist/exporters/matrix/result-totals.js.map +1 -0
  72. package/dist/exporters/matrix/testcase-summary-band.d.ts +30 -0
  73. package/dist/exporters/matrix/testcase-summary-band.d.ts.map +1 -0
  74. package/dist/exporters/matrix/testcase-summary-band.js +71 -0
  75. package/dist/exporters/matrix/testcase-summary-band.js.map +1 -0
  76. package/dist/exporters/matrix/wording.d.ts.map +1 -1
  77. package/dist/exporters/matrix/wording.js +13 -0
  78. package/dist/exporters/matrix/wording.js.map +1 -1
  79. package/dist/exporters/matrix/xlsx-cells.d.ts +38 -0
  80. package/dist/exporters/matrix/xlsx-cells.d.ts.map +1 -0
  81. package/dist/exporters/matrix/xlsx-cells.js +52 -0
  82. package/dist/exporters/matrix/xlsx-cells.js.map +1 -0
  83. package/dist/exporters/qa-env-secret-denylist.js +2 -2
  84. package/dist/exporters/qa-env-secret-denylist.js.map +1 -1
  85. package/dist/exporters/report-path-sanitizer.d.ts +38 -0
  86. package/dist/exporters/report-path-sanitizer.d.ts.map +1 -0
  87. package/dist/exporters/report-path-sanitizer.js +137 -0
  88. package/dist/exporters/report-path-sanitizer.js.map +1 -0
  89. package/dist/exporters/result-variants.d.ts.map +1 -1
  90. package/dist/exporters/result-variants.js +2 -1
  91. package/dist/exporters/result-variants.js.map +1 -1
  92. package/dist/exporters/sensitive-key.d.ts +31 -0
  93. package/dist/exporters/sensitive-key.d.ts.map +1 -0
  94. package/dist/exporters/sensitive-key.js +50 -0
  95. package/dist/exporters/sensitive-key.js.map +1 -0
  96. package/dist/exporters/test-data-resolver.d.ts +4 -1
  97. package/dist/exporters/test-data-resolver.d.ts.map +1 -1
  98. package/dist/exporters/test-data-resolver.js +12 -2
  99. package/dist/exporters/test-data-resolver.js.map +1 -1
  100. package/dist/exporters/xlsx-report-builder.d.ts +12 -1
  101. package/dist/exporters/xlsx-report-builder.d.ts.map +1 -1
  102. package/dist/exporters/xlsx-report-builder.js +10 -2
  103. package/dist/exporters/xlsx-report-builder.js.map +1 -1
  104. package/dist/generators/gherkin-parser/index.d.ts +10 -0
  105. package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
  106. package/dist/generators/gherkin-parser/index.js +20 -12
  107. package/dist/generators/gherkin-parser/index.js.map +1 -1
  108. package/dist/generators/gherkin-parser/parent-scope-clause.d.ts +54 -0
  109. package/dist/generators/gherkin-parser/parent-scope-clause.d.ts.map +1 -0
  110. package/dist/generators/gherkin-parser/parent-scope-clause.js +109 -0
  111. package/dist/generators/gherkin-parser/parent-scope-clause.js.map +1 -0
  112. package/dist/generators/test-generator/adapters/adapter-interface.d.ts +23 -18
  113. package/dist/generators/test-generator/adapters/adapter-interface.d.ts.map +1 -1
  114. package/dist/generators/test-generator/adapters/appium/appium-adapter.d.ts +4 -19
  115. package/dist/generators/test-generator/adapters/appium/appium-adapter.d.ts.map +1 -1
  116. package/dist/generators/test-generator/adapters/appium/appium-adapter.js.map +1 -1
  117. package/dist/generators/test-generator/adapters/appium/os-support.d.ts +53 -0
  118. package/dist/generators/test-generator/adapters/appium/os-support.d.ts.map +1 -0
  119. package/dist/generators/test-generator/adapters/appium/os-support.js +200 -0
  120. package/dist/generators/test-generator/adapters/appium/os-support.js.map +1 -0
  121. package/dist/generators/test-generator/adapters/appium/templates/after-all.hbs +18 -0
  122. package/dist/generators/test-generator/adapters/appium/templates/after-each.hbs +18 -0
  123. package/dist/generators/test-generator/adapters/appium/templates/before-all.hbs +18 -0
  124. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/alert-fill-action.hbs +9 -2
  125. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +24 -1
  126. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-at-position-action.hbs +1 -0
  127. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/click-element-with-text.hbs +1 -1
  128. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/double-click-action.hbs +7 -0
  129. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/frame-enter-action.hbs +3 -6
  130. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-action.hbs +6 -2
  131. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +4 -3
  132. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/table-paginate-action.hbs +3 -0
  133. package/dist/generators/test-generator/adapters/appium/templates/steps/actions/unknown-element-action.hbs +9 -0
  134. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/have-value-assertion.hbs +34 -1
  135. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +14 -6
  136. package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/visible-assertion.hbs +1 -1
  137. package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/go-back-action.hbs +21 -0
  138. package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/long-press-action.hbs +4 -0
  139. package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/pinch-zoom-action.hbs +4 -0
  140. package/dist/generators/test-generator/adapters/appium/templates/steps/gestures/set-geolocation-action.hbs +16 -0
  141. package/dist/generators/test-generator/adapters/appium/templates/steps/partials/locator.hbs +9 -1
  142. package/dist/generators/test-generator/adapters/appium/templates/test-file.hbs +62 -23
  143. package/dist/generators/test-generator/adapters/index.d.ts +1 -1
  144. package/dist/generators/test-generator/adapters/index.d.ts.map +1 -1
  145. package/dist/generators/test-generator/adapters/playwright/playwright-adapter.d.ts +4 -19
  146. package/dist/generators/test-generator/adapters/playwright/playwright-adapter.d.ts.map +1 -1
  147. package/dist/generators/test-generator/adapters/playwright/playwright-adapter.js.map +1 -1
  148. package/dist/generators/test-generator/adapters/playwright/templates/after-all.hbs +19 -1
  149. package/dist/generators/test-generator/adapters/playwright/templates/after-each.hbs +18 -0
  150. package/dist/generators/test-generator/adapters/playwright/templates/before-all.hbs +19 -1
  151. package/dist/generators/test-generator/adapters/playwright/templates/imports.hbs +3 -0
  152. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/check-action.hbs +6 -1
  153. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/click-at-position-action.hbs +23 -0
  154. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/expand-action.hbs +8 -8
  155. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/fill-editor-action.hbs +7 -2
  156. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row-nth.hbs +7 -2
  157. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row.hbs +7 -2
  158. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/table-paginate-action.hbs +5 -0
  159. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/uncheck-action.hbs +3 -1
  160. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/unknown-element-action.hbs +1 -1
  161. package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/wait-for-page.hbs +18 -1
  162. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-assertion.hbs +32 -4
  163. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -2
  164. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/checked-assertion.hbs +5 -1
  165. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/column-cell-assertion.hbs +13 -2
  166. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -1
  167. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +2 -2
  168. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-variable-assertion.hbs +1 -1
  169. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/have-text-assertion.hbs +1 -1
  170. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +2 -2
  171. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-variable-assertion.hbs +1 -1
  172. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/not-checked-assertion.hbs +2 -1
  173. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/selected-assertion.hbs +21 -3
  174. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/state-with-filter-assertion.hbs +20 -2
  175. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-empty.hbs +4 -1
  176. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-match-data.hbs +4 -1
  177. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-count.hbs +4 -1
  178. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-exists.hbs +12 -4
  179. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-not-exists.hbs +14 -2
  180. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +3 -3
  181. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-value-assertion.hbs +1 -1
  182. package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-variable-assertion.hbs +1 -1
  183. package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/checked-opts.hbs +8 -0
  184. package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-base.hbs +8 -8
  185. package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-nth.hbs +1 -1
  186. package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/id.hbs +1 -1
  187. package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/testid.hbs +1 -1
  188. package/dist/generators/test-generator/adapters/playwright/templates/steps/partials/locator.hbs +8 -8
  189. package/dist/generators/test-generator/adapters/playwright/templates/test-file.hbs +10 -8
  190. package/dist/generators/test-generator/code-generator.d.ts +37 -0
  191. package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
  192. package/dist/generators/test-generator/code-generator.js +165 -40
  193. package/dist/generators/test-generator/code-generator.js.map +1 -1
  194. package/dist/generators/test-generator/diagnostics.d.ts +116 -6
  195. package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
  196. package/dist/generators/test-generator/diagnostics.js +115 -5
  197. package/dist/generators/test-generator/diagnostics.js.map +1 -1
  198. package/dist/generators/test-generator/patterns/index.d.ts +57 -11
  199. package/dist/generators/test-generator/patterns/index.d.ts.map +1 -1
  200. package/dist/generators/test-generator/patterns/index.js +163 -21
  201. package/dist/generators/test-generator/patterns/index.js.map +1 -1
  202. package/dist/generators/test-generator/patterns/types.d.ts +8 -0
  203. package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
  204. package/dist/generators/test-generator/patterns/with-parent-scope.d.ts +18 -0
  205. package/dist/generators/test-generator/patterns/with-parent-scope.d.ts.map +1 -0
  206. package/dist/generators/test-generator/patterns/with-parent-scope.js +40 -0
  207. package/dist/generators/test-generator/patterns/with-parent-scope.js.map +1 -0
  208. package/dist/generators/test-generator/step-mapper.d.ts +103 -10
  209. package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
  210. package/dist/generators/test-generator/step-mapper.js +266 -45
  211. package/dist/generators/test-generator/step-mapper.js.map +1 -1
  212. package/dist/generators/test-generator/template-engine.d.ts +4 -19
  213. package/dist/generators/test-generator/template-engine.d.ts.map +1 -1
  214. package/dist/generators/test-generator/template-engine.js +17 -12
  215. package/dist/generators/test-generator/template-engine.js.map +1 -1
  216. package/dist/generators/test-generator/utils/data-resolver.d.ts +7 -0
  217. package/dist/generators/test-generator/utils/data-resolver.d.ts.map +1 -1
  218. package/dist/generators/test-generator/utils/data-resolver.js +19 -2
  219. package/dist/generators/test-generator/utils/data-resolver.js.map +1 -1
  220. package/dist/generators/test-generator/utils/dialog-scope-identity.d.ts +41 -0
  221. package/dist/generators/test-generator/utils/dialog-scope-identity.d.ts.map +1 -0
  222. package/dist/generators/test-generator/utils/dialog-scope-identity.js +61 -0
  223. package/dist/generators/test-generator/utils/dialog-scope-identity.js.map +1 -0
  224. package/dist/generators/test-generator/utils/escape-js-string.d.ts +17 -0
  225. package/dist/generators/test-generator/utils/escape-js-string.d.ts.map +1 -0
  226. package/dist/generators/test-generator/utils/escape-js-string.js +29 -0
  227. package/dist/generators/test-generator/utils/escape-js-string.js.map +1 -0
  228. package/dist/generators/test-generator/utils/nearest-match.d.ts +24 -0
  229. package/dist/generators/test-generator/utils/nearest-match.d.ts.map +1 -0
  230. package/dist/generators/test-generator/utils/nearest-match.js +56 -0
  231. package/dist/generators/test-generator/utils/nearest-match.js.map +1 -0
  232. package/dist/generators/test-generator/utils/selector-entry-fields.d.ts +58 -0
  233. package/dist/generators/test-generator/utils/selector-entry-fields.d.ts.map +1 -0
  234. package/dist/generators/test-generator/utils/selector-entry-fields.js +119 -0
  235. package/dist/generators/test-generator/utils/selector-entry-fields.js.map +1 -0
  236. package/dist/generators/test-generator/utils/selector-entry-walk.d.ts +25 -0
  237. package/dist/generators/test-generator/utils/selector-entry-walk.d.ts.map +1 -0
  238. package/dist/generators/test-generator/utils/selector-entry-walk.js +54 -0
  239. package/dist/generators/test-generator/utils/selector-entry-walk.js.map +1 -0
  240. package/dist/generators/test-generator/utils/selector-nth-validation.d.ts +59 -0
  241. package/dist/generators/test-generator/utils/selector-nth-validation.d.ts.map +1 -0
  242. package/dist/generators/test-generator/utils/selector-nth-validation.js +91 -0
  243. package/dist/generators/test-generator/utils/selector-nth-validation.js.map +1 -0
  244. package/dist/generators/test-generator/utils/selector-resolver.d.ts +53 -2
  245. package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
  246. package/dist/generators/test-generator/utils/selector-resolver.js +273 -27
  247. package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
  248. package/dist/generators/test-generator/utils/selector-type-validation.d.ts +51 -0
  249. package/dist/generators/test-generator/utils/selector-type-validation.d.ts.map +1 -0
  250. package/dist/generators/test-generator/utils/selector-type-validation.js +77 -0
  251. package/dist/generators/test-generator/utils/selector-type-validation.js.map +1 -0
  252. package/dist/harness/audit.d.ts +3 -1
  253. package/dist/harness/audit.d.ts.map +1 -1
  254. package/dist/harness/audit.js +51 -28
  255. package/dist/harness/audit.js.map +1 -1
  256. package/dist/harness/capability-plan.d.ts +4 -0
  257. package/dist/harness/capability-plan.d.ts.map +1 -1
  258. package/dist/harness/capability-plan.js +32 -2
  259. package/dist/harness/capability-plan.js.map +1 -1
  260. package/dist/harness/catalog/drivers.yaml +1 -1
  261. package/dist/harness/catalog/universal-viewpoints.yaml +145 -0
  262. package/dist/harness/data-driven-lint.d.ts.map +1 -1
  263. package/dist/harness/data-driven-lint.js +217 -33
  264. package/dist/harness/data-driven-lint.js.map +1 -1
  265. package/dist/harness/parse.d.ts +6 -0
  266. package/dist/harness/parse.d.ts.map +1 -1
  267. package/dist/harness/parse.js +1 -1
  268. package/dist/harness/parse.js.map +1 -1
  269. package/dist/harness/repair.d.ts.map +1 -1
  270. package/dist/harness/repair.js +8 -1
  271. package/dist/harness/repair.js.map +1 -1
  272. package/dist/harness/script-check.d.ts +2 -2
  273. package/dist/harness/script-check.d.ts.map +1 -1
  274. package/dist/harness/script-check.js +186 -25
  275. package/dist/harness/script-check.js.map +1 -1
  276. package/dist/harness/sensors.d.ts +48 -0
  277. package/dist/harness/sensors.d.ts.map +1 -1
  278. package/dist/harness/sensors.js +26 -1
  279. package/dist/harness/sensors.js.map +1 -1
  280. package/dist/harness/viewpoint-ledger.d.ts +10 -0
  281. package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
  282. package/dist/harness/viewpoint-ledger.js +23 -2
  283. package/dist/harness/viewpoint-ledger.js.map +1 -1
  284. package/dist/index.d.ts +2 -0
  285. package/dist/index.d.ts.map +1 -1
  286. package/dist/index.js +10 -1
  287. package/dist/index.js.map +1 -1
  288. package/dist/orchestrator/project-initializer.d.ts +6 -0
  289. package/dist/orchestrator/project-initializer.d.ts.map +1 -1
  290. package/dist/orchestrator/project-initializer.js +16 -0
  291. package/dist/orchestrator/project-initializer.js.map +1 -1
  292. package/dist/orchestrator/report-sanitize-reporter-install.d.ts +24 -0
  293. package/dist/orchestrator/report-sanitize-reporter-install.d.ts.map +1 -0
  294. package/dist/orchestrator/report-sanitize-reporter-install.js +161 -0
  295. package/dist/orchestrator/report-sanitize-reporter-install.js.map +1 -0
  296. package/dist/orchestrator/templates/ai-src/commands/delivery.md +4 -3
  297. package/dist/orchestrator/templates/ai-src/commands/run-test.md +9 -1
  298. package/dist/orchestrator/templates/ai-src/skills/sungen-api-coverage-model/SKILL.md +10 -0
  299. package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -5
  300. package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +62 -3
  301. package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +126 -11
  302. package/dist/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +16 -1
  303. package/dist/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +12 -0
  304. package/dist/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +19 -5
  305. package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +88 -2
  306. package/dist/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +62 -5
  307. package/dist/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md +13 -0
  308. package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +59 -10
  309. package/dist/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-f-mobile-native.md +419 -0
  310. package/dist/orchestrator/templates/playwright.config.ts +7 -0
  311. package/dist/orchestrator/templates/readme.md +1 -1
  312. package/dist/orchestrator/templates/specs-checked-state.d.ts +83 -0
  313. package/dist/orchestrator/templates/specs-checked-state.d.ts.map +1 -0
  314. package/dist/orchestrator/templates/specs-checked-state.js +261 -0
  315. package/dist/orchestrator/templates/specs-checked-state.js.map +1 -0
  316. package/dist/orchestrator/templates/specs-checked-state.ts +324 -0
  317. package/dist/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
  318. package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.d.ts +36 -0
  319. package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.d.ts.map +1 -0
  320. package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.js +155 -0
  321. package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.js.map +1 -0
  322. package/dist/orchestrator/templates/specs-report-path-sanitize-reporter.ts +142 -0
  323. package/dist/orchestrator/templates/specs-url-assert.d.ts +50 -25
  324. package/dist/orchestrator/templates/specs-url-assert.d.ts.map +1 -1
  325. package/dist/orchestrator/templates/specs-url-assert.js +65 -24
  326. package/dist/orchestrator/templates/specs-url-assert.js.map +1 -1
  327. package/dist/orchestrator/templates/specs-url-assert.ts +101 -28
  328. package/dist/orchestrator/templates/wdio.conf.ts +105 -1
  329. package/dist/utils/selector-types.d.ts +43 -1
  330. package/dist/utils/selector-types.d.ts.map +1 -1
  331. package/dist/utils/selector-types.js +51 -7
  332. package/dist/utils/selector-types.js.map +1 -1
  333. package/package.json +3 -3
  334. package/src/capabilities/discover.ts +146 -10
  335. package/src/capabilities/registry.ts +30 -0
  336. package/src/cli/commands/audit.ts +9 -0
  337. package/src/cli/commands/capability.ts +1 -1
  338. package/src/cli/commands/delivery.ts +2 -1
  339. package/src/cli/commands/generate.ts +5 -2
  340. package/src/cli/commands/inspect.ts +1 -1
  341. package/src/cli/commands/results-merge.ts +9 -2
  342. package/src/cli/commands/results-sanitize.ts +98 -0
  343. package/src/cli/commands/script-check.ts +3 -1
  344. package/src/cli/commands/update.ts +3 -0
  345. package/src/dashboard/templates/index.html +1 -1
  346. package/src/exporters/api-testcase-formatter.ts +5 -7
  347. package/src/exporters/feature-parser.ts +1 -1
  348. package/src/exporters/matrix/build.ts +17 -3
  349. package/src/exporters/matrix/item-labels.ts +78 -0
  350. package/src/exporters/matrix/render-coverage-sheet.ts +170 -0
  351. package/src/exporters/matrix/render-csv.ts +3 -1
  352. package/src/exporters/matrix/render-overview-sheet.ts +51 -0
  353. package/src/exporters/matrix/render-testcase-sheet.ts +178 -0
  354. package/src/exporters/matrix/render-xlsx.ts +67 -448
  355. package/src/exporters/matrix/result-totals.ts +37 -0
  356. package/src/exporters/matrix/testcase-summary-band.ts +74 -0
  357. package/src/exporters/matrix/wording.ts +13 -0
  358. package/src/exporters/matrix/xlsx-cells.ts +56 -0
  359. package/src/exporters/qa-env-secret-denylist.ts +1 -1
  360. package/src/exporters/report-path-sanitizer.ts +144 -0
  361. package/src/exporters/result-variants.ts +2 -1
  362. package/src/exporters/sensitive-key.ts +48 -0
  363. package/src/exporters/test-data-resolver.ts +12 -2
  364. package/src/exporters/xlsx-report-builder.ts +16 -2
  365. package/src/generators/gherkin-parser/index.ts +22 -11
  366. package/src/generators/gherkin-parser/parent-scope-clause.ts +130 -0
  367. package/src/generators/test-generator/adapters/adapter-interface.ts +25 -3
  368. package/src/generators/test-generator/adapters/appium/appium-adapter.ts +4 -4
  369. package/src/generators/test-generator/adapters/appium/os-support.ts +176 -0
  370. package/src/generators/test-generator/adapters/appium/templates/after-all.hbs +18 -0
  371. package/src/generators/test-generator/adapters/appium/templates/after-each.hbs +18 -0
  372. package/src/generators/test-generator/adapters/appium/templates/before-all.hbs +18 -0
  373. package/src/generators/test-generator/adapters/appium/templates/steps/actions/alert-fill-action.hbs +9 -2
  374. package/src/generators/test-generator/adapters/appium/templates/steps/actions/capture-variable.hbs +24 -1
  375. package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-at-position-action.hbs +1 -0
  376. package/src/generators/test-generator/adapters/appium/templates/steps/actions/click-element-with-text.hbs +1 -1
  377. package/src/generators/test-generator/adapters/appium/templates/steps/actions/double-click-action.hbs +7 -0
  378. package/src/generators/test-generator/adapters/appium/templates/steps/actions/frame-enter-action.hbs +3 -6
  379. package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-action.hbs +6 -2
  380. package/src/generators/test-generator/adapters/appium/templates/steps/actions/hover-element-with-text.hbs +4 -3
  381. package/src/generators/test-generator/adapters/appium/templates/steps/actions/table-paginate-action.hbs +3 -0
  382. package/src/generators/test-generator/adapters/appium/templates/steps/actions/unknown-element-action.hbs +9 -0
  383. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/have-value-assertion.hbs +34 -1
  384. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/label-value-assertion.hbs +14 -6
  385. package/src/generators/test-generator/adapters/appium/templates/steps/assertions/visible-assertion.hbs +1 -1
  386. package/src/generators/test-generator/adapters/appium/templates/steps/gestures/go-back-action.hbs +21 -0
  387. package/src/generators/test-generator/adapters/appium/templates/steps/gestures/long-press-action.hbs +4 -0
  388. package/src/generators/test-generator/adapters/appium/templates/steps/gestures/pinch-zoom-action.hbs +4 -0
  389. package/src/generators/test-generator/adapters/appium/templates/steps/gestures/set-geolocation-action.hbs +16 -0
  390. package/src/generators/test-generator/adapters/appium/templates/steps/partials/locator.hbs +9 -1
  391. package/src/generators/test-generator/adapters/appium/templates/test-file.hbs +62 -23
  392. package/src/generators/test-generator/adapters/index.ts +1 -1
  393. package/src/generators/test-generator/adapters/playwright/playwright-adapter.ts +4 -4
  394. package/src/generators/test-generator/adapters/playwright/templates/after-all.hbs +19 -1
  395. package/src/generators/test-generator/adapters/playwright/templates/after-each.hbs +18 -0
  396. package/src/generators/test-generator/adapters/playwright/templates/before-all.hbs +19 -1
  397. package/src/generators/test-generator/adapters/playwright/templates/imports.hbs +3 -0
  398. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/check-action.hbs +6 -1
  399. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/click-at-position-action.hbs +23 -0
  400. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/expand-action.hbs +8 -8
  401. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/fill-editor-action.hbs +7 -2
  402. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row-nth.hbs +7 -2
  403. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/table-action-in-row.hbs +7 -2
  404. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/table-paginate-action.hbs +5 -0
  405. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/uncheck-action.hbs +3 -1
  406. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/unknown-element-action.hbs +1 -1
  407. package/src/generators/test-generator/adapters/playwright/templates/steps/actions/wait-for-page.hbs +18 -1
  408. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-assertion.hbs +32 -4
  409. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/all-contain-element.hbs +5 -2
  410. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/checked-assertion.hbs +5 -1
  411. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/column-cell-assertion.hbs +13 -2
  412. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -1
  413. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-role-variable-assertion.hbs +2 -2
  414. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/disabled-with-variable-assertion.hbs +1 -1
  415. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/have-text-assertion.hbs +1 -1
  416. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-role-variable-assertion.hbs +2 -2
  417. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/hidden-with-variable-assertion.hbs +1 -1
  418. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/not-checked-assertion.hbs +2 -1
  419. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/selected-assertion.hbs +21 -3
  420. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/state-with-filter-assertion.hbs +20 -2
  421. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-empty.hbs +4 -1
  422. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-match-data.hbs +4 -1
  423. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-count.hbs +4 -1
  424. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-exists.hbs +12 -4
  425. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/table-row-not-exists.hbs +14 -2
  426. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-role-variable-assertion.hbs +3 -3
  427. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-value-assertion.hbs +1 -1
  428. package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/visible-with-variable-assertion.hbs +1 -1
  429. package/src/generators/test-generator/adapters/playwright/templates/steps/partials/checked-opts.hbs +8 -0
  430. package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-base.hbs +8 -8
  431. package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-nth.hbs +1 -1
  432. package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/id.hbs +1 -1
  433. package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator-strategies/testid.hbs +1 -1
  434. package/src/generators/test-generator/adapters/playwright/templates/steps/partials/locator.hbs +8 -8
  435. package/src/generators/test-generator/adapters/playwright/templates/test-file.hbs +10 -8
  436. package/src/generators/test-generator/code-generator.ts +181 -46
  437. package/src/generators/test-generator/diagnostics.ts +117 -6
  438. package/src/generators/test-generator/patterns/index.ts +175 -24
  439. package/src/generators/test-generator/patterns/types.ts +8 -0
  440. package/src/generators/test-generator/patterns/with-parent-scope.ts +41 -0
  441. package/src/generators/test-generator/step-mapper.ts +277 -43
  442. package/src/generators/test-generator/template-engine.ts +21 -21
  443. package/src/generators/test-generator/utils/data-resolver.ts +23 -2
  444. package/src/generators/test-generator/utils/dialog-scope-identity.ts +71 -0
  445. package/src/generators/test-generator/utils/escape-js-string.ts +24 -0
  446. package/src/generators/test-generator/utils/nearest-match.ts +55 -0
  447. package/src/generators/test-generator/utils/selector-entry-fields.ts +131 -0
  448. package/src/generators/test-generator/utils/selector-entry-walk.ts +58 -0
  449. package/src/generators/test-generator/utils/selector-nth-validation.ts +99 -0
  450. package/src/generators/test-generator/utils/selector-resolver.ts +333 -28
  451. package/src/generators/test-generator/utils/selector-type-validation.ts +87 -0
  452. package/src/harness/audit.ts +55 -30
  453. package/src/harness/capability-plan.ts +33 -1
  454. package/src/harness/catalog/drivers.yaml +1 -1
  455. package/src/harness/catalog/universal-viewpoints.yaml +145 -0
  456. package/src/harness/data-driven-lint.ts +192 -32
  457. package/src/harness/parse.ts +7 -1
  458. package/src/harness/repair.ts +8 -1
  459. package/src/harness/script-check.ts +186 -21
  460. package/src/harness/sensors.ts +75 -1
  461. package/src/harness/viewpoint-ledger.ts +26 -5
  462. package/src/index.ts +7 -0
  463. package/src/orchestrator/project-initializer.ts +17 -0
  464. package/src/orchestrator/report-sanitize-reporter-install.ts +109 -0
  465. package/src/orchestrator/templates/ai-src/commands/delivery.md +4 -3
  466. package/src/orchestrator/templates/ai-src/commands/run-test.md +9 -1
  467. package/src/orchestrator/templates/ai-src/skills/sungen-api-coverage-model/SKILL.md +10 -0
  468. package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +14 -5
  469. package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +62 -3
  470. package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +126 -11
  471. package/src/orchestrator/templates/ai-src/skills/sungen-mobile-gestures/SKILL.md +16 -1
  472. package/src/orchestrator/templates/ai-src/skills/sungen-selector-fix/SKILL.md +12 -0
  473. package/src/orchestrator/templates/ai-src/skills/sungen-selector-keys/SKILL.md +19 -5
  474. package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +88 -2
  475. package/src/orchestrator/templates/ai-src/skills/sungen-tc-review/SKILL.md +62 -5
  476. package/src/orchestrator/templates/ai-src/skills/sungen-test-design-techniques/SKILL.md +13 -0
  477. package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/SKILL.md +59 -10
  478. package/src/orchestrator/templates/ai-src/skills/sungen-viewpoint/group-f-mobile-native.md +419 -0
  479. package/src/orchestrator/templates/playwright.config.ts +7 -0
  480. package/src/orchestrator/templates/readme.md +1 -1
  481. package/src/orchestrator/templates/specs-checked-state.ts +324 -0
  482. package/src/orchestrator/templates/specs-pw-shape-reporter.ts +0 -0
  483. package/src/orchestrator/templates/specs-report-path-sanitize-reporter.ts +142 -0
  484. package/src/orchestrator/templates/specs-url-assert.ts +101 -28
  485. package/src/orchestrator/templates/wdio.conf.ts +105 -1
  486. package/src/utils/selector-types.ts +54 -5
@@ -22,6 +22,9 @@ const mask_refs_for_matching_1 = require("../utils/mask-refs-for-matching");
22
22
  Object.defineProperty(exports, "maskRefsForMatching", { enumerable: true, get: function () { return mask_refs_for_matching_1.maskRefsForMatching; } });
23
23
  const unsupported_step_code_1 = require("./unsupported-step-code");
24
24
  Object.defineProperty(exports, "unsupportedStepCode", { enumerable: true, get: function () { return unsupported_step_code_1.unsupportedStepCode; } });
25
+ const os_support_1 = require("../adapters/appium/os-support");
26
+ const with_parent_scope_1 = require("./with-parent-scope");
27
+ const escape_js_string_1 = require("../utils/escape-js-string");
25
28
  /**
26
29
  * Gesture forms that OWN the word "tap" — each has its own pattern keyed on it (`mobile-double-tap`
27
30
  * at priority 17, `tap-top-of-element` at 18) and means MORE than a click. They are the one
@@ -41,12 +44,18 @@ const TAP_GESTURE_FORMS = /\bdouble[-\s]?tap|\btap(?:s)?\b[^.]*\b(?:top of|at th
41
44
  * The rewrite is ADDITIVE — `tap` becomes `tap click`, it does not become `click`. Two reasons, and
42
45
  * the first one cost a full golden run to learn:
43
46
  *
44
- * 1. `@sungen/driver-mobile` is registered on WEB projects too (same non-opt-in bundling as
45
- * driver-ui). Substituting the verb re-keys `mobile-tap` onto "click", where its priority 15
46
- * outranks the generic `click-element` (10) — so it captured every plain click on every WEB
47
- * feature and relabelled it a tap. 8 golden fixtures caught it. Adding a verb instead of
48
- * swapping one means text with no "tap" in it is returned untouched, so web output cannot
49
- * change here BY CONSTRUCTION rather than by our vigilance.
47
+ * 1. `@sungen/driver-mobile` can be registered on a WEB project. (It is NOT bundled — an earlier
48
+ * version of this comment said it was, which was never true: it is not in `BUNDLED_DRIVERS`
49
+ * and not a core dependency. Discovery simply loaded whatever it could resolve, which in this
50
+ * monorepo is everything; discovery now gates an opt-in platform driver by the project
51
+ * `platform:`, so this reaches web only when both drivers are present and no platform is
52
+ * declared.) Substituting the verb re-keys `mobile-tap` onto "click", where its
53
+ * priority 15 outranks the generic `click-element` (10) — so it captured every plain click on
54
+ * every WEB feature and relabelled it a tap. 8 golden fixtures caught it. Adding a verb instead
55
+ * of swapping one means text with no "tap" in it is returned untouched, so web output cannot
56
+ * change here BY CONSTRUCTION rather than by our vigilance. `platforms:` does not remove the
57
+ * need for that: `mobile-tap` resolves to `click-action`, which both adapters ship, so it is
58
+ * one of the two mobile patterns that must stay UNDECLARED.
50
59
  * 2. Both vocabularies then see their own verb, and ordinary PRIORITY decides the winner —
51
60
  * no matcher has to learn about the other. `tap … and accept alert` reaches
52
61
  * `click-with-alert` (21); `tap … in [T] table row 2` reaches `table-action-in-row-nth` (19);
@@ -131,6 +140,10 @@ class PatternRegistry {
131
140
  // Matching mirrors findPattern exactly: refs masked FIRST (so `[Tap Water]` is not a
132
141
  // verb), then `tap` → `click` normalisation for the mobile vocabulary.
133
142
  const matchStep = { ...step, text: normalizeVerbs((0, mask_refs_for_matching_1.maskRefsForMatching)(step.text)) };
143
+ // The step's parent scope, resolved ONCE for the whole search. Not per candidate pattern: a
144
+ // resolver may decline and hand the step to the next one, and re-resolving here would report
145
+ // the mobile by-content refusal (SG-W028) once per attempt instead of once per step.
146
+ const parentScope = PatternRegistry.resolveParentLocator(step, context);
134
147
  for (const pattern of this.patterns) {
135
148
  if (!this.matchesPattern(matchStep, pattern.matcher))
136
149
  continue;
@@ -140,12 +153,27 @@ class PatternRegistry {
140
153
  const platformMiss = PatternRegistry.platformMiss(pattern, context, step);
141
154
  if (platformMiss)
142
155
  return platformMiss;
156
+ // Shared by BOTH code paths below. The injection used to live inside the resolver branch, so
157
+ // a `generator` pattern discarded a perfectly parsed scope: `see [Tag] header with {{label}}
158
+ // in [Job Card] section` routes to `see-with-variable` (a generator) and asserted against the
159
+ // whole page (#667). Scope that is parsed and then dropped widens the step just as silently
160
+ // as scope that never parsed at all.
161
+ // `table-*` patterns opt out by name — they resolve the container from the step text
162
+ // themselves and would otherwise scope it twice.
163
+ const parentLocator = pattern.name.startsWith('table-') ? undefined : parentScope;
164
+ const scoped = parentLocator ? (0, with_parent_scope_1.withParentScope)(context, parentLocator) : context;
143
165
  try {
144
166
  // Prefer resolver (framework-agnostic) over generator (legacy)
145
167
  if (pattern.resolver) {
146
- const resolved = pattern.resolver(step, context);
168
+ const resolved = pattern.resolver(step, scoped);
147
169
  if (!resolved)
148
170
  continue; // resolver declined — fall through
171
+ // iOS gate — AFTER the resolver, because it needs the template the step actually reached.
172
+ // The sibling of platformMiss above: that one refuses a pattern off-platform, this one
173
+ // refuses a template the declared OS cannot serve.
174
+ const iosMiss = PatternRegistry.iosUnsupported(resolved.templateName, context, step);
175
+ if (iosMiss)
176
+ return iosMiss;
149
177
  // State-clause gate. Deliberately AFTER the resolver, not before it: a resolver may return
150
178
  // null to say "not mine after all", and the search then continues to a lower-priority
151
179
  // pattern that may well be the one that asserts the state. Gating earlier judged a pattern
@@ -157,14 +185,16 @@ class PatternRegistry {
157
185
  if (resolverStateMiss)
158
186
  return resolverStateMiss;
159
187
  // Auto-inject parent scoping if step has parentRef
160
- // Skip for table-* patterns — they resolve the table name internally from step text
161
- if (step.parentRef && step.parentType && !pattern.name.startsWith('table-')) {
162
- resolved.data.parentLocator = PatternRegistry.resolveParentLocator(step.parentRef, step.parentType, context);
163
- }
188
+ if (parentLocator)
189
+ resolved.data.parentLocator = parentLocator;
164
190
  const code = context.templateEngine.renderStep(resolved.templateName, resolved.data);
191
+ // The compiler's post-map guards need to know WHICH form won and what it resolved to (e.g.
192
+ // a refusal a resolver recorded in its data) — without re-matching.
165
193
  return {
166
194
  code,
167
195
  comment: resolved.comment,
196
+ pattern: pattern.name,
197
+ templateData: resolved.data,
168
198
  };
169
199
  }
170
200
  if (pattern.generator) {
@@ -172,7 +202,9 @@ class PatternRegistry {
172
202
  const generatorStateMiss = PatternRegistry.stateMiss(pattern, context, step);
173
203
  if (generatorStateMiss)
174
204
  return generatorStateMiss;
175
- return pattern.generator(step, context);
205
+ // A generator returning nothing still falls through to the no-pattern path.
206
+ const generated = pattern.generator(step, scoped);
207
+ return generated ? { ...generated, pattern: pattern.name } : null;
176
208
  }
177
209
  return null;
178
210
  }
@@ -190,6 +222,41 @@ class PatternRegistry {
190
222
  /**
191
223
  * SG-W020 — the matched pattern declares `platforms` and the active one is not among them.
192
224
  */
225
+ /**
226
+ * SG-E025 — the feature says `@platform:ios`, and the template it reached does not work there.
227
+ *
228
+ * Derived from the template body (`osSupportOfTemplate`), never from a list, so it cannot drift
229
+ * from the adapter the way a hand-kept table would. Two states are refused, for different
230
+ * reasons: `refuses` would throw deep inside a device run instead of at compile time, and `noop`
231
+ * would not fail at all — the step would run, do nothing, and the scenario would pass.
232
+ *
233
+ * Only an EXPLICIT `@platform:ios` is gated. `@platform:mobile` picks its OS from
234
+ * MOBILE_PLATFORM at run time, so gating it would mean guessing; the per-OS matrix columns are
235
+ * what cover that case, and they are the primary deliverable of this axis.
236
+ */
237
+ static iosUnsupported(templateName, context, step) {
238
+ if (context.featurePlatform !== 'ios')
239
+ return null;
240
+ if ((context.platform ?? 'web') !== 'mobile')
241
+ return null;
242
+ const pair = (0, os_support_1.osSupportOfTemplate)(templateName);
243
+ // No appium template of that name is a different failure, already reported by template
244
+ // resolution — a second message here would give one cause two names.
245
+ if (!pair || pair.ios === 'yes' || pair.ios === 'inherit')
246
+ return null;
247
+ const why = pair.ios === 'noop'
248
+ ? 'does nothing on iOS — it is guarded out with no error, so the step would run and the scenario would PASS having done nothing'
249
+ : 'throws on iOS — the template refuses there, so the failure would surface deep inside a device run instead of here';
250
+ const reason = `step "${step.text}" compiles to \`${templateName}\`, which ${why}. ` +
251
+ `This feature declares @platform:ios. Either drop to @platform:android (the OS that serves this step), ` +
252
+ `move the step out of the iOS feature, or tag the scenario @manual:M10 (device/OS capability). ` +
253
+ `See the Android/iOS columns in docs/spec/step-support-matrix.md.`;
254
+ context.diagnostics?.add('SG-E025', reason, { feature: context.featureName, step: step.text });
255
+ return {
256
+ code: (0, unsupported_step_code_1.unsupportedStepCode)(reason),
257
+ comment: `iOS-unsupported step in an @platform:ios feature — see SG-E025`,
258
+ };
259
+ }
193
260
  static platformMiss(pattern, context, step) {
194
261
  const platform = context.platform ?? 'web';
195
262
  if (!pattern.platforms || pattern.platforms.includes(platform))
@@ -234,7 +301,8 @@ class PatternRegistry {
234
301
  `("${pattern.name}") does not assert that state — the clause would be SILENTLY DROPPED and the ` +
235
302
  `step would check something other than what it reads as. Use a step form that owns the state ` +
236
303
  `(e.g. "User see [Ref] <type> is ${state}" on the element itself), or drop the clause if the ` +
237
- `bare assertion is what you meant. If sungen cannot express the check, tag the scenario @manual.`;
304
+ `bare assertion is what you meant. If sungen cannot express the check, tag the scenario @manual.` +
305
+ PatternRegistry.stateMissSkewHint(pattern, state);
238
306
  context.diagnostics?.add('SG-E021', reason, {
239
307
  feature: context.featureName,
240
308
  step: step.text,
@@ -244,6 +312,21 @@ class PatternRegistry {
244
312
  comment: `"is ${state}" not asserted by "${pattern.name}" — see SG-E021`,
245
313
  };
246
314
  }
315
+ /**
316
+ * The one SG-E021 that is NOT the author's to fix. A pattern NAMED for the state (`is-hidden`,
317
+ * `should-be-disabled`) that declares no `states` at all is not under-annotated — it is a driver
318
+ * built before the field existed, loaded against a core that requires it (a stale project copy of
319
+ * @sungen/driver-ui). The generic message then tells the author to use the exact form they wrote,
320
+ * which cost a QA team a day of Gherkin rewrites that could never work. Name the real cause.
321
+ */
322
+ static stateMissSkewHint(pattern, state) {
323
+ const namesTheState = pattern.name.includes(state.replace(/\s+/g, '-'));
324
+ if (pattern.states !== undefined || !namesTheState)
325
+ return '';
326
+ return (` NOTE: "${pattern.name}" is named for this very state yet declares no states at all — that is a ` +
327
+ `@sungen/driver-* package older than sungen itself, not a Gherkin problem. Run \`sungen update\` in the ` +
328
+ `project so the drivers match the sungen version, then generate again.`);
329
+ }
247
330
  /**
248
331
  * SG-E020 — the pattern is in-platform but the active adapter ships no template for it. A gap in
249
332
  * the adapter, not in the authored Gherkin: name every coordinate a reader needs to act on it.
@@ -263,14 +346,22 @@ class PatternRegistry {
263
346
  };
264
347
  }
265
348
  /**
266
- * Resolve parent scoping to a Playwright locator string.
267
- * Tries YAML lookup first, falls back to auto-infer from parentType.
349
+ * Resolve a step's `in [Parent] <type> [with <value>]` scope to a locator string, or `undefined`
350
+ * when the step carries no scope.
268
351
  *
269
- * Parent type → Playwright role:
270
- * table → 'table', list → 'list', section → 'region',
271
- * dialog → 'dialog', form → 'form'
352
+ * Tries YAML lookup first, falls back to auto-inferring a role from the container type with the
353
+ * reference as the accessible name. A reference written as `{{var}}` is resolved through
354
+ * test-data before it reaches that name — containers are routinely labelled with the text under
355
+ * test, and a literal `{{var}}` in the name matches nothing.
272
356
  */
273
- static resolveParentLocator(parentRef, parentType, context) {
357
+ static resolveParentLocator(step, context) {
358
+ const { parentRef, parentType } = step;
359
+ if (!parentRef || !parentType)
360
+ return undefined;
361
+ const base = PatternRegistry.parentContainerLocator(parentRef, parentType, context);
362
+ return PatternRegistry.filterParentByValue(base, step, context);
363
+ }
364
+ static parentContainerLocator(parentRef, parentType, context) {
274
365
  // Try resolving from selectors YAML
275
366
  try {
276
367
  const resolved = context.selectorResolver.resolveSelector(parentRef, context.featureName, parentType, 0);
@@ -282,13 +373,64 @@ class PatternRegistry {
282
373
  const roleMap = {
283
374
  table: 'table',
284
375
  list: 'list',
376
+ 'list-item': 'listitem',
377
+ listitem: 'listitem',
378
+ item: 'listitem',
379
+ row: 'row',
285
380
  section: 'region',
381
+ container: 'region',
382
+ panel: 'region',
383
+ card: 'region',
384
+ group: 'group',
286
385
  dialog: 'dialog',
386
+ modal: 'dialog',
387
+ drawer: 'dialog',
388
+ overlay: 'dialog',
287
389
  form: 'form',
390
+ tab: 'tabpanel',
391
+ menu: 'menu',
288
392
  };
289
393
  const role = roleMap[parentType] || parentType;
290
- const escapedName = parentRef.replace(/'/g, "\\'");
291
- return `page.getByRole('${role}', { name: '${escapedName}' })`;
394
+ const name = (0, escape_js_string_1.escapeSingleQuoted)(PatternRegistry.resolveInlineData(parentRef, context));
395
+ return `page.getByRole('${role}', { name: '${name}' })`;
396
+ }
397
+ /**
398
+ * Narrow the container to the ONE whose content matches the step's parent value — the
399
+ * `with {{job_title}}` tail of `see [Tag] header with {{label}} in [Job Card] card with
400
+ * {{job_title}}`. Without it a list of identical cards leaves the assertion matching whichever
401
+ * one Playwright reaches first.
402
+ *
403
+ * Web-only, and refused rather than approximated elsewhere: the Appium partial chains a parent
404
+ * with `$()`, which has no content filter, so emitting one would be invalid code and pretending
405
+ * the scope applied would be the very silence this whole fix exists to end (SG-W028).
406
+ */
407
+ static filterParentByValue(base, step, context) {
408
+ const raw = step.parentValueRef
409
+ ? PatternRegistry.resolveInlineData(`{{${step.parentValueRef}}}`, context)
410
+ : step.parentValueText;
411
+ if (raw === undefined)
412
+ return base;
413
+ if (context.platform === 'mobile') {
414
+ context.diagnostics?.add('SG-W028', `scoping a container BY CONTENT ("in [${step.parentRef}] ${step.parentType} with …") is web-only — the mobile adapter chains a parent element, which has no content filter, so this step would search every ${step.parentType} on the screen. Give the container an accessibility id that identifies it and scope by that instead, or assert on the element the value belongs to`, { feature: context.featureName, step: step.text });
415
+ return base;
416
+ }
417
+ return `${base}.filter({ hasText: '${(0, escape_js_string_1.escapeSingleQuoted)(raw)}' })`;
418
+ }
419
+ /**
420
+ * Resolve a `{{var}}` written where literal text is expected, leaving anything else untouched.
421
+ * An unknown variable stays as written rather than throwing — the locator is then wrong in a way
422
+ * the author can read, which beats losing the whole step.
423
+ */
424
+ static resolveInlineData(text, context) {
425
+ const match = text.match(/^\{\{([a-z0-9\-._]+)\}\}$/i);
426
+ if (!match)
427
+ return text;
428
+ try {
429
+ return context.dataResolver.resolveData(match[1], context.featureName);
430
+ }
431
+ catch {
432
+ return text;
433
+ }
292
434
  }
293
435
  /**
294
436
  * Check if step matches a pattern matcher
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuDA,wCAGC;AAvDD,6DAAoE;AACpE,6DAAiF;AACjF,4EAAsE;AAM7D,oGANA,4CAAmB,OAMA;AAL5B,mEAA8D;AAKhC,oGALrB,2CAAmB,OAKqB;AAEjD;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,uEAAuE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,kDAAkD,CAAC;AAE9E;;GAEG;AACH,MAAa,eAAe;IAG1B;QAFQ,aAAQ,GAAkB,EAAE,CAAC;QAGnC,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,uFAAuF;QACvF,0FAA0F;QAC1F,4FAA4F;QAC5F,IAAA,0CAA+B,GAAE,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,6BAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC;QAErD,kCAAkC;QAClC,IAAI,CAAC,QAAQ,CAAC,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CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,mBAAmB,IAAI,eAAe,WAAW,MAAM,CAAC;IACjE,CAAC;IAED;;OAEG;IACK,cAAc,CAAC,IAAgB,EAAE,OAA+B;QACtE,IAAI,OAAO,YAAY,MAAM,EAAE,CAAC;YAC9B,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC9B,CAAC;CACF;AAvQD,0CAuQC;AAED,qGAAqG;AACrG,kFAAkF;AAClF,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgEA,wCAGC;AAhED,6DAAoE;AACpE,6DAAiF;AACjF,4EAAsE;AAS7D,oGATA,4CAAmB,OASA;AAR5B,mEAA8D;AAQhC,oGARrB,2CAAmB,OAQqB;AAPjD,8DAAoE;AACpE,2DAAsD;AACtD,gEAA+D;AAO/D;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,uEAAuE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,kDAAkD,C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
67
  effectiveKeyword?: string;
68
68
  /** The platform the ACTIVE adapter compiles for. Absent = 'web' (back-compat default). */
69
69
  platform?: Platform;
70
+ /**
71
+ * The OS the FEATURE declares via `@platform:<mobile|android|ios>` — distinct from `platform`
72
+ * above, which is the adapter. Only `ios` is actionable at compile time: it is the single case
73
+ * where the compiler knows which mobile OS will run, so it can refuse a step that does nothing
74
+ * (or throws) there. `mobile` means both OSes and is deliberately NOT gated — the real OS is
75
+ * chosen at run time by MOBILE_PLATFORM, so a compile-time verdict would be a guess.
76
+ */
77
+ featurePlatform?: 'mobile' | 'android' | 'ios';
70
78
  /** The adapter's own name ('playwright' | 'appium' | …) — quoted verbatim in SG-E020/SG-W020. */
71
79
  adapterName?: string;
72
80
  /** Compile-diagnostics channel, so the pattern layer can report instead of throwing. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACtF;AAED;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,OAAO,GACP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ternContext } from './types';
2
+ /**
3
+ * Return a `PatternContext` in which every selector the pattern resolves comes back already scoped
4
+ * to `parentLocator`.
5
+ *
6
+ * Why a wrapped context rather than one assignment. A `resolver` pattern hands its template data
7
+ * back to the registry, which can stamp `parentLocator` on it; a `generator` pattern renders its own
8
+ * code and never exposes that object, so the registry had no seam and the scope was simply lost
9
+ * (#667). The seam both kinds share is where they ASK for a selector — `selectorResolver` and
10
+ * `renderLocator` — so the scope is attached there instead, and every locator partial (Playwright
11
+ * and Appium alike) already knows what to do with a `parentLocator` field.
12
+ *
13
+ * Only the target's own scope is stamped; anything a pattern resolves that ALREADY carries a
14
+ * `parentLocator` is left alone, so a pattern that builds its own container chain (table rows) keeps
15
+ * winning over the generic one.
16
+ */
17
+ export declare function withParentScope(context: PatternContext, parentLocator: string): PatternContext;
18
+ //# sourceMappingURL=with-parent-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-parent-scope.d.ts","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/with-parent-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,GAAG,cAAc,CAuB9F"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withParentScope = withParentScope;
4
+ /**
5
+ * Return a `PatternContext` in which every selector the pattern resolves comes back already scoped
6
+ * to `parentLocator`.
7
+ *
8
+ * Why a wrapped context rather than one assignment. A `resolver` pattern hands its template data
9
+ * back to the registry, which can stamp `parentLocator` on it; a `generator` pattern renders its own
10
+ * code and never exposes that object, so the registry had no seam and the scope was simply lost
11
+ * (#667). The seam both kinds share is where they ASK for a selector — `selectorResolver` and
12
+ * `renderLocator` — so the scope is attached there instead, and every locator partial (Playwright
13
+ * and Appium alike) already knows what to do with a `parentLocator` field.
14
+ *
15
+ * Only the target's own scope is stamped; anything a pattern resolves that ALREADY carries a
16
+ * `parentLocator` is left alone, so a pattern that builds its own container chain (table rows) keeps
17
+ * winning over the generic one.
18
+ */
19
+ function withParentScope(context, parentLocator) {
20
+ const scope = (resolved) => resolved && typeof resolved === 'object' && !resolved.parentLocator
21
+ ? { ...resolved, parentLocator }
22
+ : resolved;
23
+ // A Proxy rather than a copy: SelectorResolver carries more than the one method patterns call,
24
+ // and a hand-written stand-in would silently drop whatever it forgot.
25
+ const selectorResolver = new Proxy(context.selectorResolver, {
26
+ get(target, prop, receiver) {
27
+ if (prop === 'resolveSelector') {
28
+ return (...args) => scope(target.resolveSelector(...args));
29
+ }
30
+ const value = Reflect.get(target, prop, receiver);
31
+ return typeof value === 'function' ? value.bind(target) : value;
32
+ },
33
+ });
34
+ return {
35
+ ...context,
36
+ selectorResolver,
37
+ renderLocator: (resolved) => context.renderLocator(scope(resolved)),
38
+ };
39
+ }
40
+ //# sourceMappingURL=with-parent-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-parent-scope.js","sourceRoot":"","sources":["../../../../src/generators/test-generator/patterns/with-parent-scope.ts"],"names":[],"mappings":";;AAiBA,0CAuBC;AAtCD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,eAAe,CAAC,OAAuB,EAAE,aAAqB;IAC5E,MAAM,KAAK,GAAG,CAAI,QAAW,EAAK,EAAE,CAClC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAE,QAAgB,CAAC,aAAa;QAC1E,CAAC,CAAC,EAAE,GAAI,QAAgB,EAAE,aAAa,EAAE;QACzC,CAAC,CAAC,QAAQ,CAAC;IAEf,+FAA+F;IAC/F,sEAAsE;IACtE,MAAM,gBAAgB,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE;QAC3D,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;YACxB,IAAI,IAAI,KAAK,iBAAiB,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,KAAK,CAAE,MAAc,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YACjF,CAAC;YACD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClD,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAClE,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,OAAO;QACV,gBAAgB;QAChB,aAAa,EAAE,CAAC,QAAa,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;KACzE,CAAC;AACJ,CAAC"}
@@ -4,6 +4,8 @@ export interface MappedStep {
4
4
  code: string;
5
5
  comment?: string;
6
6
  imports?: string[];
7
+ pattern?: string;
8
+ templateData?: Record<string, any>;
7
9
  }
8
10
  /**
9
11
  * StepMapper - Orchestrates step-to-code conversion using pattern registry
@@ -18,6 +20,8 @@ export declare class StepMapper {
18
20
  private dataResolver;
19
21
  private baseURL;
20
22
  private featureName?;
23
+ /** The feature's declared `@platform:` OS, for the compile-time iOS gate (SG-E025). */
24
+ private featurePlatform?;
21
25
  private screenName?;
22
26
  private featurePath?;
23
27
  private currentScenarioSteps?;
@@ -58,7 +62,7 @@ export declare class StepMapper {
58
62
  /**
59
63
  * Set feature context for data and selector resolution
60
64
  */
61
- setFeatureContext(featureName: string, featurePath?: string): void;
65
+ setFeatureContext(featureName: string, featurePath?: string, featurePlatform?: 'mobile' | 'android' | 'ios'): void;
62
66
  /**
63
67
  * Update screen context (used in --all mode to set per-feature screen name)
64
68
  */
@@ -79,6 +83,13 @@ export declare class StepMapper {
79
83
  * only at runtime in the dataset rows. Scenario-scoped (cleared by setScenarioContext).
80
84
  */
81
85
  registerCaptured(name: string): void;
86
+ /**
87
+ * Register the head of a variable bound by the feature's `@beforeAll` hook. Feature-scoped: it
88
+ * survives setScenarioContext() so every scenario can read `{{head.*}}` as a runtime get().
89
+ */
90
+ registerFeatureCaptured(head: string): void;
91
+ /** Drop feature-scoped captured vars — call once per feature, before its hooks and scenarios map. */
92
+ clearFeatureCaptured(): void;
82
93
  /**
83
94
  * Map a Gherkin step to Playwright code
84
95
  * Uses pattern registry first, falls back to AI if enabled
@@ -100,18 +111,25 @@ export declare class StepMapper {
100
111
  */
101
112
  private renderDialogRoot;
102
113
  /**
103
- * SG-W013 — a page assertion whose path came from a fallback rather than from a `type: page`
104
- * selector entry. Both resolvers degrade quietly when `[Ref]` does not resolve: `see [X] page`
105
- * falls back to the feature's own path, `is on [X] page` to `/<ref>/`. Before the assertion was
106
- * anchored that produced a test which always PASSED; anchored, it produces one that can never
107
- * pass. Neither is the assertion the author wrote, and nothing said so.
114
+ * The selectors.yaml entry behind a dialog reference, normalized the way the `locator` partial
115
+ * needs it. Shared by `renderDialogRoot` (which turns it into the root expression) and the
116
+ * scope-entry path (which keys off it to recognize the root again later — issue #692).
117
+ */
118
+ private resolveDialogEntry;
119
+ /**
120
+ * SG-W013 — a page STEP whose path came from a fallback rather than from a `type: page`
121
+ * selector entry. Every resolver degrades quietly when `[Ref]` does not resolve: `see [X] page`
122
+ * and `wait for [X] page` fall back to the feature's own path, `is on [X] page` to `/<ref>/`.
123
+ * Before the match was anchored that produced a test which always PASSED; anchored, it produces
124
+ * one that can never pass — an assertion that always fails, or, since #677 anchored the wait
125
+ * too, a wait that can only time out. None is the step the author wrote, and nothing said so.
108
126
  *
109
- * Detected here rather than in the resolver on purpose: `MappedStep` carries only
110
- * `{code, comment, imports}`, and the resolvers live in the driver packages while the collector
111
- * lives in core. Re-asking the SAME resolver the step-mapper already owns costs three lines and
127
+ * Detected here rather than in the resolver on purpose: the resolvers live in the driver packages
128
+ * while the collector lives in core (the mapped step now also names its pattern and carries the
129
+ * resolver's data, but the fallback itself is only visible by re-resolving the selector). Re-asking the SAME resolver the step-mapper already owns costs three lines and
112
130
  * duplicates no logic — the alternative is widening the adapter contract for every driver.
113
131
  */
114
- private checkPageAssertionFallback;
132
+ private checkPageStepFallback;
115
133
  /**
116
134
  * SG-W014 — `[X] page with {{v}}` where the value carries neither a query nor a fragment, so the
117
135
  * query half of the assertion has nothing to check and the step asserts the PATH only.
@@ -146,7 +164,35 @@ export declare class StepMapper {
146
164
  * Deliberately narrow — it fires only on the bare-visibility shape, so a pattern that genuinely
147
165
  * consumed the clause (`is-hidden`, `contains`, `matches-format`, the state family) is untouched.
148
166
  */
167
+ /**
168
+ * SG-E027 (#711) — the step names an entry whose `type:` is not a selector type, so the resolver
169
+ * fell to its placeholder default and this step compiled to `getByPlaceholder('<the value>')`:
170
+ * a locator that cannot match, which would fail much later as a timeout naming placeholder text
171
+ * the author never wrote. Compile it to a `throw` instead — the same reasoning as SG-E023 above,
172
+ * that a step which reads as a check and can only ever fail obscurely is worse than one that
173
+ * fails loudly and says why.
174
+ *
175
+ * The DIAGNOSTIC is not added here. `SelectorResolver.loadNewSelectorFile` already reported this
176
+ * entry once for the whole file; re-reporting per step would print the same line twenty times for
177
+ * one typo. This method only replaces the code, so the compile-time message and the runtime
178
+ * failure stay one fact reported once.
179
+ *
180
+ * A resolve throw means the key is missing entirely — a different defect that the resolver's own
181
+ * error already owns — and an auto-inferred selector stamps no `selectorType`, so both skip.
182
+ */
183
+ private checkUnknownSelectorType;
149
184
  private checkAssertionClauseSwallowed;
185
+ /**
186
+ * A click step that names a POSITION (`at position "top-left"`, `at offset x=…, y=…`) must compile
187
+ * through the positioned-click form with a position it understood. Anything else — a typo in the
188
+ * keyword, a value the grammar rejects, or a combination another click form claims first (`try to
189
+ * click … at position`, `… at offset … and accept [OK] alert`, `… with {{v}} … at position`) —
190
+ * would otherwise click the element's CENTRE and pass, which for a backdrop-dismiss test is the
191
+ * one outcome that proves nothing. Owned by the compiler rather than the driver so it holds no
192
+ * matter which pattern wins.
193
+ */
194
+ private static readonly CLICK_POSITION_HINT;
195
+ private checkClickPositionDropped;
150
196
  private checkDataRefConsumed;
151
197
  /**
152
198
  * Generate column assertion scoped to the current row.
@@ -168,6 +214,43 @@ export declare class StepMapper {
168
214
  /**
169
215
  * Create pattern context for generators
170
216
  */
217
+ /**
218
+ * Whether a mapped step emits anything that actually RUNS.
219
+ *
220
+ * Comments are stripped — block comments as well as line ones, because a template written with
221
+ * `/* … *\/` would otherwise read as executable code and silence the no-op diagnostics exactly
222
+ * when they were needed. Keyed on the emitted CODE rather than on a template name (MappedStep
223
+ * does not carry one), so any future template that degrades to a comment is caught without being
224
+ * enumerated anywhere.
225
+ *
226
+ * Shared by the SG-W022 / SG-W023 / SG-W026 checks — the three of them ask the same question, and
227
+ * three copies of this would drift.
228
+ */
229
+ private emitsExecutableCode;
230
+ /**
231
+ * SG-W026 — a mobile ACTIVE-NAVIGATION step that emitted no executable code, so a promised screen
232
+ * change never happens.
233
+ *
234
+ * `When User open [Settings] page` compiles to the one-line `navigation` template: a comment
235
+ * noting the app was already launched by the wdio capabilities. The step reads as "go to Settings"
236
+ * and goes nowhere. Pair it with `Then User see [X] page` — itself a no-op, reported as SG-W022 —
237
+ * and the whole scenario passes without ever touching the app.
238
+ *
239
+ * This completes a class that was handled in halves: `route-assertion` already throws loudly and
240
+ * `page-assertion` already reports W022; `navigation` alone was silent.
241
+ *
242
+ * Scoped to the ACTIVE forms. `is on [X] page` and its mobile `screen` twin are mobile's
243
+ * app-LAUNCH anchor, whose empty output is correct and documented as such where IS_ON_TYPES is
244
+ * defined — warning there would cry wolf on every valid mobile feature, and a diagnostic that
245
+ * cries wolf gets filtered out, taking the real ones with it. The exclusion is matched on
246
+ * `is on` FIRST, before the open/navigate test, because "the user is on the page they opened"
247
+ * phrasings contain both.
248
+ *
249
+ * Deliberately NOT a `throw`, for the same reason as SG-W023: an unfulfilled navigation weakens
250
+ * the scenario rather than inverting an assertion, and throwing would break every mobile suite
251
+ * already carrying one of these steps. `generate --strict` is the opt-in that makes it fail.
252
+ */
253
+ private checkNavigationNoOpOnMobile;
171
254
  /**
172
255
  * SG-W023 — a mobile SETUP step that emitted no executable code, so a declared precondition is
173
256
  * never actually established.
@@ -204,6 +287,16 @@ export declare class StepMapper {
204
287
  * the `see` form: the `is on` twin is mobile's app-launch directive, whose empty output is right.
205
288
  */
206
289
  private checkPageAssertionNoOpOnMobile;
290
+ /**
291
+ * SG-W028 — a trailing `in [X] <word>` scope clause whose `<word>` is not a container type.
292
+ *
293
+ * The clause is dropped, and everything downstream takes the FIRST `[ref]` and the FIRST
294
+ * `{{data}}` it finds, so the sentence compiles clean while the assertion silently widens to the
295
+ * whole screen (#667). Unlike an unrecognized STEP, which at least raises SG-W001, a partially
296
+ * understood step used to say nothing at all — and a check that runs against more than it names
297
+ * passes for the wrong reason in exactly the list-of-identical-cards case it was written for.
298
+ */
299
+ private warnScopeClauseDiscarded;
207
300
  /**
208
301
  * SG-W021 — dialog scope is a no-op on the Appium adapter.
209
302
  *
@@ -1 +1 @@
1
- {"version":3,"file":"step-mapper.d.ts","sourceRoot":"","sources":["../../../src/generators/test-generator/step-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAKrD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO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