create-appraisejs 0.3.0 → 0.3.1-alpha.0

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 (911) hide show
  1. package/dist/cli.e2e.test.d.ts +2 -0
  2. package/dist/cli.e2e.test.d.ts.map +1 -0
  3. package/dist/cli.e2e.test.js +73 -0
  4. package/dist/cli.e2e.test.js.map +1 -0
  5. package/dist/config.test.d.ts +2 -0
  6. package/dist/config.test.d.ts.map +1 -0
  7. package/dist/config.test.js +65 -0
  8. package/dist/config.test.js.map +1 -0
  9. package/dist/copy-template.test.d.ts +2 -0
  10. package/dist/copy-template.test.d.ts.map +1 -0
  11. package/dist/copy-template.test.js +71 -0
  12. package/dist/copy-template.test.js.map +1 -0
  13. package/dist/download-repo.test.d.ts +2 -0
  14. package/dist/download-repo.test.d.ts.map +1 -0
  15. package/dist/download-repo.test.js +14 -0
  16. package/dist/download-repo.test.js.map +1 -0
  17. package/dist/install.test.d.ts +2 -0
  18. package/dist/install.test.d.ts.map +1 -0
  19. package/dist/install.test.js +119 -0
  20. package/dist/install.test.js.map +1 -0
  21. package/dist/prompts.test.d.ts +2 -0
  22. package/dist/prompts.test.d.ts.map +1 -0
  23. package/dist/prompts.test.js +58 -0
  24. package/dist/prompts.test.js.map +1 -0
  25. package/package.json +3 -6
  26. package/templates/blank/.env.example +2 -2
  27. package/templates/blank/components.json +24 -24
  28. package/templates/blank/cucumber.mjs +16 -16
  29. package/templates/blank/gitignore +6 -0
  30. package/templates/blank/next-env.d.ts +6 -6
  31. package/templates/blank/package-lock.json +2274 -1019
  32. package/templates/blank/package.json +27 -18
  33. package/templates/blank/packages/cucumber-runtime/package.json +13 -13
  34. package/templates/blank/packages/cucumber-runtime/src/cache.util.ts +93 -93
  35. package/templates/blank/packages/cucumber-runtime/src/cli.ts +68 -68
  36. package/templates/blank/packages/cucumber-runtime/src/environment.util.ts +21 -21
  37. package/templates/blank/packages/cucumber-runtime/src/executor.ts +32 -32
  38. package/templates/blank/packages/cucumber-runtime/src/index.ts +17 -17
  39. package/templates/blank/packages/cucumber-runtime/src/locator.util.ts +234 -234
  40. package/templates/blank/packages/cucumber-runtime/src/parameter-types.ts +7 -7
  41. package/templates/blank/packages/cucumber-runtime/src/random-data.util.ts +35 -35
  42. package/templates/blank/packages/cucumber-runtime/src/types.ts +13 -13
  43. package/templates/blank/packages/cucumber-runtime/src/world.ts +44 -44
  44. package/templates/blank/packages/cucumber-runtime/tsconfig.json +11 -11
  45. package/templates/blank/postcss.config.mjs +8 -8
  46. package/templates/blank/prisma/dev.db +0 -0
  47. package/templates/blank/prisma/migrations/20251104113456_add_type_for_template_step_groups/migration.sql +16 -16
  48. package/templates/blank/prisma/migrations/20251104170946_add_tags_to_test_suite_and_test_case/migration.sql +27 -27
  49. package/templates/blank/prisma/migrations/20251112190024_add_cascade_delete_to_test_run_test_case/migration.sql +17 -17
  50. package/templates/blank/prisma/migrations/20251113181100_add_test_run_log/migration.sql +12 -12
  51. package/templates/blank/prisma/migrations/20251119191838_add_tag_type/migration.sql +28 -28
  52. package/templates/blank/prisma/migrations/20251121164059_add_conflict_resolution/migration.sql +12 -12
  53. package/templates/blank/prisma/migrations/20251223183400_add_report_model_to_db_schema/migration.sql +10 -10
  54. package/templates/blank/prisma/migrations/20251223183637_add_report_test_case_entity_for_storing_test_results_for_individual_test_cases/migration.sql +10 -10
  55. package/templates/blank/prisma/migrations/20251224083549_add_comprehensive_report_storage/migration.sql +108 -108
  56. package/templates/blank/prisma/migrations/20251229194422_migrate_duration_to_string/migration.sql +55 -55
  57. package/templates/blank/prisma/migrations/20251230124637_add_unique_constraint_to_test_run_name/migration.sql +27 -27
  58. package/templates/blank/prisma/migrations/20260115094436_add_dashboard_metrics/migration.sql +59 -59
  59. package/templates/blank/prisma/migrations/20260127172022_add_cascade_delete_to_step_parameters/migration.sql +34 -34
  60. package/templates/blank/prisma/migrations/20260313093000_add_report_step_screenshot_path/migration.sql +1 -1
  61. package/templates/blank/prisma/migrations/20260507000000_add_flow_builder_node_grouping/migration.sql +34 -0
  62. package/templates/blank/prisma/schema.prisma +36 -0
  63. package/templates/blank/scripts/lib/jsdoc-parser.test.ts +12 -0
  64. package/templates/blank/scripts/lib/jsdoc-parser.ts +5 -88
  65. package/templates/blank/scripts/lib/step-file-parser.ts +111 -178
  66. package/templates/blank/scripts/lib/template-sync-utils.test.ts +35 -0
  67. package/templates/blank/scripts/run-fallow-commit.mjs +23 -0
  68. package/templates/blank/scripts/setup-env.ts +0 -0
  69. package/templates/blank/scripts/sync-tags.ts +1 -1
  70. package/templates/blank/scripts/sync-test-suites.ts +233 -162
  71. package/templates/blank/src/actions/dashboard/dashboard-actions.ts +0 -7
  72. package/templates/blank/src/actions/locator-picker/locator-picker-actions.test.ts +10 -0
  73. package/templates/blank/src/actions/locator-picker/locator-picker-actions.ts +5 -0
  74. package/templates/blank/src/actions/server-action-boundary.test.ts +794 -0
  75. package/templates/blank/src/actions/test-suite/test-suite-actions.ts +2 -1
  76. package/templates/blank/src/app/(base)/environments/create/page.tsx +28 -28
  77. package/templates/blank/src/app/(base)/environments/environment-form.tsx +16 -23
  78. package/templates/blank/src/app/(base)/environments/page.tsx +2 -2
  79. package/templates/blank/src/app/(base)/layout.tsx +10 -10
  80. package/templates/blank/src/app/(base)/locator-groups/create/page.tsx +1 -1
  81. package/templates/blank/src/app/(base)/locator-groups/locator-group-form.tsx +24 -24
  82. package/templates/blank/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -77
  83. package/templates/blank/src/app/(base)/locator-groups/locator-group-table.tsx +28 -28
  84. package/templates/blank/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -46
  85. package/templates/blank/src/app/(base)/locator-groups/page.tsx +3 -3
  86. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-helpers.ts +34 -333
  87. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-response.test.ts +85 -0
  88. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-response.ts +125 -0
  89. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-state.ts +227 -0
  90. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-types.ts +68 -0
  91. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace.test.tsx +73 -1
  92. package/templates/blank/src/app/(base)/locators/create/create-locator-workspace.tsx +19 -16
  93. package/templates/blank/src/app/(base)/locators/create/page.tsx +4 -8
  94. package/templates/blank/src/app/(base)/locators/create/use-locator-workspace.ts +15 -2
  95. package/templates/blank/src/app/(base)/locators/locator-file-sync.test.ts +45 -0
  96. package/templates/blank/src/app/(base)/locators/locator-file-sync.ts +22 -0
  97. package/templates/blank/src/app/(base)/locators/locator-sync-toast.ts +34 -0
  98. package/templates/blank/src/app/(base)/locators/modify/[id]/page.tsx +1 -1
  99. package/templates/blank/src/app/(base)/locators/page.tsx +3 -5
  100. package/templates/blank/src/app/(base)/locators/picker/page.tsx +6 -0
  101. package/templates/blank/src/app/(base)/locators/sync-locators-button.tsx +12 -53
  102. package/templates/blank/src/app/(base)/modules/modify/[id]/page.tsx +11 -5
  103. package/templates/blank/src/app/(base)/modules/module-form-helpers.ts +12 -0
  104. package/templates/blank/src/app/(base)/modules/module-form.tsx +14 -19
  105. package/templates/blank/src/app/(base)/modules/module-helpers.test.ts +48 -0
  106. package/templates/blank/src/app/(base)/modules/module-helpers.ts +4 -64
  107. package/templates/blank/src/app/(base)/modules/module-parent-helpers.ts +16 -0
  108. package/templates/blank/src/app/(base)/modules/module-row-helpers.ts +32 -0
  109. package/templates/blank/src/app/(base)/modules/module-types.ts +8 -0
  110. package/templates/blank/src/app/(base)/modules/page.tsx +2 -2
  111. package/templates/blank/src/app/(base)/reports/[id]/page.tsx +25 -30
  112. package/templates/blank/src/app/(base)/reports/overview-chart.tsx +49 -49
  113. package/templates/blank/src/app/(base)/reports/page.tsx +5 -48
  114. package/templates/blank/src/app/(base)/reports/report-charts.tsx +17 -0
  115. package/templates/blank/src/app/(base)/reports/report-detail-helpers.ts +27 -54
  116. package/templates/blank/src/app/(base)/reports/report-metric-card.tsx +3 -3
  117. package/templates/blank/src/app/(base)/reports/report-table-columns.tsx +14 -46
  118. package/templates/blank/src/app/(base)/reports/report-table.tsx +5 -55
  119. package/templates/blank/src/app/(base)/reports/report-view-table-columns.tsx +5 -5
  120. package/templates/blank/src/app/(base)/reports/report-view-table.tsx +1 -49
  121. package/templates/blank/src/app/(base)/reports/test-cases/page.tsx +1 -1
  122. package/templates/blank/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +115 -115
  123. package/templates/blank/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -27
  124. package/templates/blank/src/app/(base)/reports/test-suites/page.tsx +2 -2
  125. package/templates/blank/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +79 -79
  126. package/templates/blank/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +27 -27
  127. package/templates/blank/src/app/(base)/reports/view-logs-button.tsx +1 -1
  128. package/templates/blank/src/app/(base)/settings/page.tsx +2 -2
  129. package/templates/blank/src/app/(base)/settings/settings-sync-panel-helpers.tsx +2 -2
  130. package/templates/blank/src/app/(base)/settings/settings-sync-panel.tsx +7 -13
  131. package/templates/blank/src/app/(base)/settings/use-settings-sync.ts +0 -1
  132. package/templates/blank/src/app/(base)/tags/create/page.tsx +1 -1
  133. package/templates/blank/src/app/(base)/tags/modify/[id]/page.tsx +1 -1
  134. package/templates/blank/src/app/(base)/tags/page.tsx +2 -2
  135. package/templates/blank/src/app/(base)/tags/tag-form-helpers.ts +9 -0
  136. package/templates/blank/src/app/(base)/tags/tag-form.test.tsx +43 -1
  137. package/templates/blank/src/app/(base)/tags/tag-form.tsx +42 -23
  138. package/templates/blank/src/app/(base)/tags/tag-table-columns.tsx +63 -63
  139. package/templates/blank/src/app/(base)/tags/tag-table.tsx +29 -29
  140. package/templates/blank/src/app/(base)/template-step-groups/create/page.tsx +28 -28
  141. package/templates/blank/src/app/(base)/template-step-groups/page.tsx +2 -2
  142. package/templates/blank/src/app/(base)/template-step-groups/template-step-group-form.tsx +10 -15
  143. package/templates/blank/src/app/(base)/template-step-groups/template-step-group-table-columns.tsx +1 -5
  144. package/templates/blank/src/app/(base)/template-steps/modify/[id]/page.tsx +13 -7
  145. package/templates/blank/src/app/(base)/template-steps/page.tsx +2 -2
  146. package/templates/blank/src/app/(base)/template-steps/paramChip.tsx +20 -13
  147. package/templates/blank/src/app/(base)/template-steps/template-step-form-helpers.ts +65 -0
  148. package/templates/blank/src/app/(base)/template-steps/template-step-form.tsx +21 -26
  149. package/templates/blank/src/app/(base)/template-steps/template-step-helpers.ts +25 -176
  150. package/templates/blank/src/app/(base)/template-steps/template-step-option-helpers.ts +13 -0
  151. package/templates/blank/src/app/(base)/template-steps/template-step-row-guards.ts +69 -0
  152. package/templates/blank/src/app/(base)/template-steps/template-step-table-columns.tsx +7 -4
  153. package/templates/blank/src/app/(base)/template-steps/template-step-types.ts +31 -0
  154. package/templates/blank/src/app/(base)/template-test-cases/create/page.tsx +12 -19
  155. package/templates/blank/src/app/(base)/template-test-cases/create-template-test-case-page-data.test.ts +78 -0
  156. package/templates/blank/src/app/(base)/template-test-cases/create-template-test-case-page-data.ts +58 -0
  157. package/templates/blank/src/app/(base)/template-test-cases/modify/[id]/page.tsx +67 -8
  158. package/templates/blank/src/app/(base)/template-test-cases/page.tsx +2 -2
  159. package/templates/blank/src/app/(base)/template-test-cases/template-test-case-flow.test.tsx +2 -0
  160. package/templates/blank/src/app/(base)/template-test-cases/template-test-case-flow.tsx +19 -4
  161. package/templates/blank/src/app/(base)/template-test-cases/template-test-case-form.test.tsx +6 -0
  162. package/templates/blank/src/app/(base)/template-test-cases/template-test-case-form.tsx +30 -26
  163. package/templates/blank/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -76
  164. package/templates/blank/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -32
  165. package/templates/blank/src/app/(base)/test-cases/create/page.test.tsx +121 -0
  166. package/templates/blank/src/app/(base)/test-cases/create/page.tsx +27 -5
  167. package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-conversion-helpers.ts +27 -0
  168. package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-helpers.test.ts +2 -0
  169. package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-helpers.ts +14 -171
  170. package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-selection-helpers.ts +74 -0
  171. package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-types.ts +24 -0
  172. package/templates/blank/src/app/(base)/test-cases/create-from-template/generate/[id]/page.test.tsx +19 -0
  173. package/templates/blank/src/app/(base)/test-cases/create-from-template/generate/[id]/page.tsx +2 -93
  174. package/templates/blank/src/app/(base)/test-cases/create-from-template/page.test.tsx +157 -0
  175. package/templates/blank/src/app/(base)/test-cases/create-from-template/page.tsx +113 -10
  176. package/templates/blank/src/app/(base)/test-cases/editable-test-case-builders.ts +35 -0
  177. package/templates/blank/src/app/(base)/test-cases/editable-test-case-guards.ts +42 -0
  178. package/templates/blank/src/app/(base)/test-cases/editable-test-case-helpers.ts +3 -0
  179. package/templates/blank/src/app/(base)/test-cases/editable-test-case-types.ts +14 -0
  180. package/templates/blank/src/app/(base)/test-cases/inline-tag-creation-dialog.tsx +47 -0
  181. package/templates/blank/src/app/(base)/test-cases/inline-test-suite-creation-dialog.tsx +57 -0
  182. package/templates/blank/src/app/(base)/test-cases/modify/[id]/page.tsx +31 -4
  183. package/templates/blank/src/app/(base)/test-cases/page.tsx +3 -3
  184. package/templates/blank/src/app/(base)/test-cases/test-case-flow.test.tsx +24 -0
  185. package/templates/blank/src/app/(base)/test-cases/test-case-flow.tsx +34 -13
  186. package/templates/blank/src/app/(base)/test-cases/test-case-form-reducer.test.ts +59 -0
  187. package/templates/blank/src/app/(base)/test-cases/test-case-form-reducer.ts +203 -0
  188. package/templates/blank/src/app/(base)/test-cases/test-case-form.test.tsx +340 -32
  189. package/templates/blank/src/app/(base)/test-cases/test-case-form.tsx +1325 -166
  190. package/templates/blank/src/app/(base)/test-cases/test-case-resource-rows.ts +9 -0
  191. package/templates/blank/src/app/(base)/test-cases/test-case-route-helpers.test.ts +4 -1
  192. package/templates/blank/src/app/(base)/test-cases/test-case-route-helpers.ts +3 -147
  193. package/templates/blank/src/app/(base)/test-cases/test-case-row-helpers.ts +30 -0
  194. package/templates/blank/src/app/(base)/test-cases/test-case-shared-resource-rows.ts +55 -0
  195. package/templates/blank/src/app/(base)/test-cases/test-case-table.tsx +3 -3
  196. package/templates/blank/src/app/(base)/test-cases/test-case-template-resource-rows.ts +21 -0
  197. package/templates/blank/src/app/(base)/test-runs/create/page.tsx +8 -16
  198. package/templates/blank/src/app/(base)/test-runs/create-test-run-page-data.test.ts +60 -0
  199. package/templates/blank/src/app/(base)/test-runs/create-test-run-page-data.ts +38 -0
  200. package/templates/blank/src/app/(base)/test-runs/page.tsx +2 -2
  201. package/templates/blank/src/app/(base)/test-runs/test-run-form-data-helpers.ts +71 -0
  202. package/templates/blank/src/app/(base)/test-runs/test-run-form-display-helpers.ts +44 -0
  203. package/templates/blank/src/app/(base)/test-runs/test-run-form-helpers.ts +17 -157
  204. package/templates/blank/src/app/(base)/test-runs/test-run-form-selection-helpers.ts +46 -0
  205. package/templates/blank/src/app/(base)/test-runs/test-run-form.tsx +19 -24
  206. package/templates/blank/src/app/(base)/test-runs/test-run-table-columns.tsx +14 -14
  207. package/templates/blank/src/app/(base)/test-runs/test-run-table.tsx +61 -60
  208. package/templates/blank/src/app/(base)/test-suites/editable-test-suite-helpers.ts +17 -0
  209. package/templates/blank/src/app/(base)/test-suites/page.tsx +5 -5
  210. package/templates/blank/src/app/(base)/test-suites/test-suite-form-display-helpers.ts +54 -0
  211. package/templates/blank/src/app/(base)/test-suites/test-suite-form.test.tsx +57 -8
  212. package/templates/blank/src/app/(base)/test-suites/test-suite-form.tsx +38 -21
  213. package/templates/blank/src/app/(base)/test-suites/test-suite-helpers.ts +25 -215
  214. package/templates/blank/src/app/(base)/test-suites/test-suite-row-guards.ts +80 -0
  215. package/templates/blank/src/app/(base)/test-suites/test-suite-table-columns.tsx +1 -1
  216. package/templates/blank/src/app/(base)/test-suites/test-suite-table-helpers.ts +57 -0
  217. package/templates/blank/src/app/(base)/test-suites/test-suite-types.ts +30 -0
  218. package/templates/blank/src/app/(dashboard-components)/app-drawer.tsx +26 -23
  219. package/templates/blank/src/app/(dashboard-components)/data-card-grid.tsx +1 -1
  220. package/templates/blank/src/app/(dashboard-components)/data-card.tsx +30 -26
  221. package/templates/blank/src/app/(dashboard-components)/execution-health-panel.tsx +42 -42
  222. package/templates/blank/src/app/(dashboard-components)/ongoing-test-runs-card.tsx +8 -8
  223. package/templates/blank/src/app/(dashboard-components)/quick-actions-drawer.tsx +66 -42
  224. package/templates/blank/src/app/api/test-runs/[runId]/download/route.ts +160 -103
  225. package/templates/blank/src/app/globals.css +11 -0
  226. package/templates/blank/src/app/layout.tsx +17 -17
  227. package/templates/blank/src/app/page.tsx +10 -5
  228. package/templates/blank/src/assets/icons/empty-tube.tsx +23 -23
  229. package/templates/blank/src/assets/icons/tube-plus.tsx +29 -29
  230. package/templates/blank/src/components/base-node.tsx +5 -8
  231. package/templates/blank/src/components/data-state/empty-state.tsx +1 -1
  232. package/templates/blank/src/components/data-visualization/info-card.tsx +70 -70
  233. package/templates/blank/src/components/data-visualization/info-grid.tsx +22 -22
  234. package/templates/blank/src/components/diagram/add-node-prompt-node.tsx +30 -0
  235. package/templates/blank/src/components/diagram/button-edge.tsx +27 -9
  236. package/templates/blank/src/components/diagram/dynamic-parameter-field-label.tsx +19 -0
  237. package/templates/blank/src/components/diagram/dynamic-parameter-field-shell.tsx +30 -0
  238. package/templates/blank/src/components/diagram/dynamic-parameter-field-types.ts +32 -0
  239. package/templates/blank/src/components/diagram/dynamic-parameter-fields.tsx +140 -0
  240. package/templates/blank/src/components/diagram/dynamic-parameter-locator-field.tsx +288 -0
  241. package/templates/blank/src/components/diagram/dynamic-parameters-helpers.ts +6 -1
  242. package/templates/blank/src/components/diagram/dynamic-parameters.test.tsx +295 -0
  243. package/templates/blank/src/components/diagram/dynamic-parameters.tsx +223 -222
  244. package/templates/blank/src/components/diagram/flow-add-node-prompt-helpers.ts +22 -0
  245. package/templates/blank/src/components/diagram/flow-block-helpers.ts +86 -0
  246. package/templates/blank/src/components/diagram/flow-diagram-block-dialog.tsx +56 -0
  247. package/templates/blank/src/components/diagram/flow-diagram-block-overlays.tsx +65 -0
  248. package/templates/blank/src/components/diagram/flow-diagram-connection-guards.ts +127 -0
  249. package/templates/blank/src/components/diagram/flow-diagram-grouping-hints.tsx +38 -0
  250. package/templates/blank/src/components/diagram/flow-diagram-helpers.test.ts +187 -5
  251. package/templates/blank/src/components/diagram/flow-diagram-helpers.ts +22 -251
  252. package/templates/blank/src/components/diagram/flow-diagram-node-search.tsx +108 -0
  253. package/templates/blank/src/components/diagram/flow-diagram-node-types.tsx +46 -0
  254. package/templates/blank/src/components/diagram/flow-diagram-toolbar.tsx +88 -0
  255. package/templates/blank/src/components/diagram/flow-diagram-types.ts +21 -0
  256. package/templates/blank/src/components/diagram/flow-diagram-view.tsx +179 -0
  257. package/templates/blank/src/components/diagram/flow-diagram.test.tsx +501 -0
  258. package/templates/blank/src/components/diagram/flow-diagram.tsx +72 -226
  259. package/templates/blank/src/components/diagram/flow-node-data-helpers.ts +122 -0
  260. package/templates/blank/src/components/diagram/flow-node-order-helpers.ts +179 -0
  261. package/templates/blank/src/components/diagram/flow-node-search-helpers.ts +24 -0
  262. package/templates/blank/src/components/diagram/node-form-fields-content.tsx +120 -0
  263. package/templates/blank/src/components/diagram/node-form-fields-props.ts +3 -0
  264. package/templates/blank/src/components/diagram/node-form-helpers.ts +15 -8
  265. package/templates/blank/src/components/diagram/node-form-submit.ts +36 -0
  266. package/templates/blank/src/components/diagram/node-form-template-step-selection.test.ts +42 -0
  267. package/templates/blank/src/components/diagram/node-form-template-step-selection.ts +40 -0
  268. package/templates/blank/src/components/diagram/node-form.test.tsx +172 -25
  269. package/templates/blank/src/components/diagram/node-form.tsx +108 -158
  270. package/templates/blank/src/components/diagram/options-header-gherkin-step.tsx +72 -0
  271. package/templates/blank/src/components/diagram/options-header-node.test.tsx +210 -0
  272. package/templates/blank/src/components/diagram/options-header-node.tsx +226 -32
  273. package/templates/blank/src/components/diagram/template-step-combobox.test.tsx +144 -0
  274. package/templates/blank/src/components/diagram/template-step-combobox.tsx +176 -39
  275. package/templates/blank/src/components/diagram/use-flow-diagram-block-grouping.ts +130 -0
  276. package/templates/blank/src/components/diagram/use-flow-diagram-search.ts +114 -0
  277. package/templates/blank/src/components/diagram/use-flow-diagram.ts +384 -0
  278. package/templates/blank/src/components/form/error-message.tsx +7 -7
  279. package/templates/blank/src/components/loading-skeleton/data-table/data-table-skeleton.tsx +1 -1
  280. package/templates/blank/src/components/loading-skeleton/form/button-skeleton.tsx +8 -8
  281. package/templates/blank/src/components/loading-skeleton/form/icon-button-skeleton.tsx +1 -1
  282. package/templates/blank/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -8
  283. package/templates/blank/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -14
  284. package/templates/blank/src/components/logo.tsx +1 -1
  285. package/templates/blank/src/components/navigation/command-badge.tsx +1 -1
  286. package/templates/blank/src/components/navigation/command-chain-input.tsx +5 -10
  287. package/templates/blank/src/components/navigation/entity-search-command.tsx +47 -24
  288. package/templates/blank/src/components/navigation/nav-command-search.tsx +5 -5
  289. package/templates/blank/src/components/navigation/nav-command.tsx +8 -8
  290. package/templates/blank/src/components/navigation/nav-link.tsx +60 -60
  291. package/templates/blank/src/components/navigation/nav-menu-card-deck.tsx +73 -70
  292. package/templates/blank/src/components/reports/test-case-logs-modal.tsx +10 -10
  293. package/templates/blank/src/components/table/table-actions.test.tsx +53 -0
  294. package/templates/blank/src/components/table/table-actions.tsx +14 -10
  295. package/templates/blank/src/components/test-case/test-case-form-helpers.test.ts +1 -0
  296. package/templates/blank/src/components/test-case/test-case-form-helpers.ts +40 -45
  297. package/templates/blank/src/components/test-case/test-case-picker.test.tsx +14 -11
  298. package/templates/blank/src/components/test-case/test-case-picker.tsx +140 -112
  299. package/templates/blank/src/components/test-case/test-scenario-preview.tsx +69 -16
  300. package/templates/blank/src/components/test-run/download-logs-button.tsx +13 -26
  301. package/templates/blank/src/components/test-run/log-viewer-events.ts +7 -0
  302. package/templates/blank/src/components/test-run/log-viewer-helpers.ts +4 -80
  303. package/templates/blank/src/components/test-run/log-viewer-parsing.ts +28 -0
  304. package/templates/blank/src/components/test-run/log-viewer-status.ts +35 -0
  305. package/templates/blank/src/components/test-run/log-viewer-types.ts +7 -0
  306. package/templates/blank/src/components/test-run/log-viewer.tsx +9 -9
  307. package/templates/blank/src/components/test-run/test-run-details-guards.ts +85 -0
  308. package/templates/blank/src/components/test-run/test-run-details-helpers.test.ts +102 -0
  309. package/templates/blank/src/components/test-run/test-run-details-helpers.ts +10 -208
  310. package/templates/blank/src/components/test-run/test-run-details-progress.ts +26 -0
  311. package/templates/blank/src/components/test-run/test-run-details-status.ts +70 -0
  312. package/templates/blank/src/components/test-run/test-run-details-types.ts +21 -0
  313. package/templates/blank/src/components/test-run/test-run-details.test.tsx +1 -6
  314. package/templates/blank/src/components/test-run/test-run-details.tsx +26 -54
  315. package/templates/blank/src/components/test-run/test-run-header.test.tsx +13 -18
  316. package/templates/blank/src/components/test-run/trace-viewer-button-label.tsx +57 -0
  317. package/templates/blank/src/components/test-run/view-report-button.tsx +60 -64
  318. package/templates/blank/src/components/test-suite/test-suite-picker-helpers.test.ts +27 -1
  319. package/templates/blank/src/components/test-suite/test-suite-picker-helpers.ts +80 -1
  320. package/templates/blank/src/components/test-suite/test-suite-picker-suite-row-header.tsx +87 -0
  321. package/templates/blank/src/components/test-suite/test-suite-picker-suite-row.tsx +61 -0
  322. package/templates/blank/src/components/test-suite/test-suite-picker-test-case-list.tsx +95 -0
  323. package/templates/blank/src/components/test-suite/test-suite-picker.tsx +134 -275
  324. package/templates/blank/src/components/typography/page-header-subtitle.tsx +7 -7
  325. package/templates/blank/src/components/typography/page-header.tsx +7 -7
  326. package/templates/blank/src/components/ui/alert.tsx +12 -18
  327. package/templates/blank/src/components/ui/badge.tsx +1 -1
  328. package/templates/blank/src/components/ui/button.tsx +13 -10
  329. package/templates/blank/src/components/ui/calendar.tsx +3 -3
  330. package/templates/blank/src/components/ui/card.tsx +16 -34
  331. package/templates/blank/src/components/ui/chart-utils.ts +43 -0
  332. package/templates/blank/src/components/ui/chart.tsx +217 -304
  333. package/templates/blank/src/components/ui/checkbox.tsx +20 -17
  334. package/templates/blank/src/components/ui/command.tsx +63 -96
  335. package/templates/blank/src/components/ui/data-table-column-header.tsx +3 -3
  336. package/templates/blank/src/components/ui/data-table-pagination.tsx +7 -7
  337. package/templates/blank/src/components/ui/data-table-view-options.tsx +20 -15
  338. package/templates/blank/src/components/ui/data-table.tsx +22 -19
  339. package/templates/blank/src/components/ui/dialog.tsx +45 -63
  340. package/templates/blank/src/components/ui/dropdown-menu.tsx +76 -148
  341. package/templates/blank/src/components/ui/empty.tsx +21 -40
  342. package/templates/blank/src/components/ui/input.tsx +13 -15
  343. package/templates/blank/src/components/ui/kbd.tsx +7 -13
  344. package/templates/blank/src/components/ui/label.tsx +7 -6
  345. package/templates/blank/src/components/ui/multi-select-with-preview.tsx +20 -7
  346. package/templates/blank/src/components/ui/multi-select.tsx +7 -5
  347. package/templates/blank/src/components/ui/picker-browse-shell.tsx +99 -0
  348. package/templates/blank/src/components/ui/popover.tsx +21 -19
  349. package/templates/blank/src/components/ui/progress.tsx +14 -15
  350. package/templates/blank/src/components/ui/radio-group.tsx +14 -25
  351. package/templates/blank/src/components/ui/scroll-area.tsx +32 -29
  352. package/templates/blank/src/components/ui/select.tsx +99 -125
  353. package/templates/blank/src/components/ui/separator.tsx +16 -12
  354. package/templates/blank/src/components/ui/sheet.tsx +92 -0
  355. package/templates/blank/src/components/ui/skeleton.tsx +7 -7
  356. package/templates/blank/src/components/ui/table.tsx +24 -49
  357. package/templates/blank/src/components/ui/tabs.tsx +36 -41
  358. package/templates/blank/src/components/ui/textarea.tsx +11 -15
  359. package/templates/blank/src/components/ui/toast.tsx +56 -62
  360. package/templates/blank/src/components/ui/toaster.tsx +26 -26
  361. package/templates/blank/src/components/ui/tooltip.tsx +23 -20
  362. package/templates/blank/src/components/user-prompt/delete-prompt.tsx +5 -5
  363. package/templates/blank/src/constants/form-opts/diagram/node-form.ts +11 -28
  364. package/templates/blank/src/constants/form-opts/environment-form-opts.ts +1 -1
  365. package/templates/blank/src/constants/form-opts/locator-group-form-opts.ts +1 -7
  366. package/templates/blank/src/constants/form-opts/module-form-opts.ts +1 -1
  367. package/templates/blank/src/constants/form-opts/tag-form-opts.ts +1 -1
  368. package/templates/blank/src/constants/form-opts/template-selection-form-opts.ts +0 -11
  369. package/templates/blank/src/constants/form-opts/template-step-group-form-opts.ts +1 -1
  370. package/templates/blank/src/constants/form-opts/template-test-case-form-opts.ts +3 -33
  371. package/templates/blank/src/constants/form-opts/template-test-step-form-opts.ts +1 -1
  372. package/templates/blank/src/constants/form-opts/test-case-form-opts.ts +3 -35
  373. package/templates/blank/src/constants/form-opts/test-case-step-form-opts.ts +27 -0
  374. package/templates/blank/src/constants/form-opts/test-run-form-opts.ts +1 -1
  375. package/templates/blank/src/constants/form-opts/test-suite-form-opts.ts +1 -1
  376. package/templates/blank/src/hooks/use-toast.ts +1 -1
  377. package/templates/blank/src/lib/automation/automation-path-roots.ts +1 -9
  378. package/templates/blank/src/lib/bidirectional-sync.ts +116 -107
  379. package/templates/blank/src/lib/database-sync.ts +142 -190
  380. package/templates/blank/src/lib/environment-file-utils.ts +3 -115
  381. package/templates/blank/src/lib/executor/local-executor-adapter.ts +1 -1
  382. package/templates/blank/src/lib/form/tanstack-form-action.ts +7 -0
  383. package/templates/blank/src/lib/form/tanstack-form.tsx +18 -0
  384. package/templates/blank/src/lib/gherkin-parser.test.ts +7 -7
  385. package/templates/blank/src/lib/gherkin-parser.ts +132 -145
  386. package/templates/blank/src/lib/gherkin-step-format.ts +80 -0
  387. package/templates/blank/src/lib/jsdoc/template-step-jsdoc.ts +262 -0
  388. package/templates/blank/src/lib/locator-group-file-utils.ts +2 -20
  389. package/templates/blank/src/lib/locator-picker/suggestions.ts +7 -4
  390. package/templates/blank/src/lib/metrics/metric-calculator.test.ts +156 -0
  391. package/templates/blank/src/lib/metrics/metric-calculator.ts +251 -273
  392. package/templates/blank/src/lib/module-hierarchy-builder.ts +1 -10
  393. package/templates/blank/src/lib/path-helpers/feature-path.ts +10 -0
  394. package/templates/blank/src/lib/path-helpers/module-path.ts +0 -50
  395. package/templates/blank/src/lib/process/task-spawner.ts +50 -27
  396. package/templates/blank/src/lib/sync/projected-feature-utils.ts +2 -42
  397. package/templates/blank/src/lib/sync/sync-pending-counts.ts +126 -274
  398. package/templates/blank/src/lib/sync/sync-registry.ts +2 -2
  399. package/templates/blank/src/lib/tag-filters.ts +11 -0
  400. package/templates/blank/src/lib/tag-identifiers.ts +18 -0
  401. package/templates/blank/src/lib/tag-utils.ts +2 -28
  402. package/templates/blank/src/lib/template-automation-paths.ts +34 -0
  403. package/templates/blank/src/lib/template-path-exclusions.ts +34 -0
  404. package/templates/blank/src/lib/template-sync-utils.d.ts +6 -6
  405. package/templates/blank/src/lib/template-sync-utils.ts +2 -65
  406. package/templates/blank/src/lib/test-case-utils.ts +6 -6
  407. package/templates/blank/src/lib/test-run/log-formatter.ts +83 -83
  408. package/templates/blank/src/lib/test-run/matching.test.ts +77 -0
  409. package/templates/blank/src/lib/test-run/matching.ts +2 -2
  410. package/templates/blank/src/lib/test-run/report-parser.test.ts +113 -0
  411. package/templates/blank/src/lib/test-run/report-parser.ts +352 -352
  412. package/templates/blank/src/lib/test-suite-identifier-service.ts +1 -1
  413. package/templates/blank/src/lib/transformers/gherkin-converter.ts +42 -42
  414. package/templates/blank/src/lib/transformers/key-to-icon-transformer.tsx +95 -95
  415. package/templates/blank/src/lib/transformers/template-test-case-converter.ts +13 -64
  416. package/templates/blank/src/lib/utils/node-param-validation.ts +81 -81
  417. package/templates/blank/src/lib/utils/template-step-file-generator.ts +2 -19
  418. package/templates/blank/src/lib/utils/template-step-file-manager-intelligent.ts +1 -355
  419. package/templates/blank/src/lib/utils/template-step-function-bounds.test.ts +48 -0
  420. package/templates/blank/src/lib/utils/template-step-function-bounds.ts +138 -0
  421. package/templates/blank/src/lib/utils.ts +0 -4
  422. package/templates/blank/src/services/locator/locator-service.ts +22 -6
  423. package/templates/blank/src/services/report/report-service.ts +249 -237
  424. package/templates/blank/src/services/tag/tag-service.test.ts +140 -2
  425. package/templates/blank/src/services/tag/tag-service.ts +71 -0
  426. package/templates/blank/src/services/template-test-case/template-test-case-service.ts +34 -2
  427. package/templates/blank/src/services/test-case/test-case-service.test.ts +1 -0
  428. package/templates/blank/src/services/test-case/test-case-service.ts +39 -2
  429. package/templates/blank/src/services/test-run/test-run-service.ts +146 -119
  430. package/templates/blank/src/test/motion-react-vitest-mocks.ts +18 -0
  431. package/templates/blank/src/test/setup-motion-react-mocks.ts +4 -0
  432. package/templates/blank/src/types/diagram/diagram.ts +8 -0
  433. package/templates/blank/src/types/diagram/template-step.ts +5 -2
  434. package/templates/blank/src/types/report.ts +84 -0
  435. package/templates/blank/tsconfig.json +1 -1
  436. package/templates/default/next-env.d.ts +6 -0
  437. package/templates/default/packages/locator-picker-companion/dist/cli.d.ts +1 -0
  438. package/templates/default/packages/locator-picker-companion/dist/cli.js +302 -0
  439. package/templates/default/packages/locator-picker-companion/dist/index.d.ts +3 -0
  440. package/templates/default/packages/locator-picker-companion/dist/index.js +3 -0
  441. package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.d.ts +1 -0
  442. package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.js +615 -0
  443. package/templates/default/packages/locator-picker-companion/dist/launcher.d.ts +11 -0
  444. package/templates/default/packages/locator-picker-companion/dist/launcher.js +59 -0
  445. package/templates/default/packages/locator-picker-companion/dist/selector-generator.d.ts +3 -0
  446. package/templates/default/packages/locator-picker-companion/dist/selector-generator.js +257 -0
  447. package/templates/default/packages/locator-picker-companion/dist/session-file.d.ts +22 -0
  448. package/templates/default/packages/locator-picker-companion/dist/session-file.js +150 -0
  449. package/templates/default/packages/locator-picker-companion/dist/types.d.ts +31 -0
  450. package/templates/default/packages/locator-picker-companion/dist/types.js +1 -0
  451. package/templates/default/prisma/dev.db +0 -0
  452. package/templates/starter/.env.example +2 -2
  453. package/templates/starter/automation/steps/actions/click.step.ts +58 -58
  454. package/templates/starter/automation/steps/actions/hover.step.ts +27 -27
  455. package/templates/starter/automation/steps/actions/navigation.step.ts +70 -70
  456. package/templates/starter/automation/steps/actions/random_data.step.ts +142 -142
  457. package/templates/starter/automation/steps/actions/store.step.ts +1 -80
  458. package/templates/starter/automation/steps/actions/wait.step.ts +2 -105
  459. package/templates/starter/automation/steps/validations/active_state_assertion.step.ts +30 -30
  460. package/templates/starter/automation/steps/validations/navigation_assertion.step.ts +22 -22
  461. package/templates/starter/automation/steps/validations/text_assertion.step.ts +107 -107
  462. package/templates/starter/automation/steps/validations/visibility_assertion.step.ts +26 -26
  463. package/templates/starter/components.json +24 -24
  464. package/templates/starter/cucumber.mjs +16 -16
  465. package/templates/starter/gitignore +6 -0
  466. package/templates/starter/next-env.d.ts +6 -6
  467. package/templates/starter/package-lock.json +2274 -1019
  468. package/templates/starter/package.json +27 -18
  469. package/templates/starter/packages/cucumber-runtime/package.json +13 -13
  470. package/templates/starter/packages/cucumber-runtime/src/cache.util.ts +93 -93
  471. package/templates/starter/packages/cucumber-runtime/src/cli.ts +68 -68
  472. package/templates/starter/packages/cucumber-runtime/src/environment.util.ts +21 -21
  473. package/templates/starter/packages/cucumber-runtime/src/executor.ts +32 -32
  474. package/templates/starter/packages/cucumber-runtime/src/index.ts +17 -17
  475. package/templates/starter/packages/cucumber-runtime/src/locator.util.ts +234 -234
  476. package/templates/starter/packages/cucumber-runtime/src/parameter-types.ts +7 -7
  477. package/templates/starter/packages/cucumber-runtime/src/random-data.util.ts +35 -35
  478. package/templates/starter/packages/cucumber-runtime/src/types.ts +13 -13
  479. package/templates/starter/packages/cucumber-runtime/src/world.ts +44 -44
  480. package/templates/starter/packages/cucumber-runtime/tsconfig.json +11 -11
  481. package/templates/starter/postcss.config.mjs +8 -8
  482. package/templates/starter/prisma/dev.db +0 -0
  483. package/templates/starter/prisma/migrations/20251104113456_add_type_for_template_step_groups/migration.sql +16 -16
  484. package/templates/starter/prisma/migrations/20251104170946_add_tags_to_test_suite_and_test_case/migration.sql +27 -27
  485. package/templates/starter/prisma/migrations/20251112190024_add_cascade_delete_to_test_run_test_case/migration.sql +17 -17
  486. package/templates/starter/prisma/migrations/20251113181100_add_test_run_log/migration.sql +12 -12
  487. package/templates/starter/prisma/migrations/20251119191838_add_tag_type/migration.sql +28 -28
  488. package/templates/starter/prisma/migrations/20251121164059_add_conflict_resolution/migration.sql +12 -12
  489. package/templates/starter/prisma/migrations/20251223183400_add_report_model_to_db_schema/migration.sql +10 -10
  490. package/templates/starter/prisma/migrations/20251223183637_add_report_test_case_entity_for_storing_test_results_for_individual_test_cases/migration.sql +10 -10
  491. package/templates/starter/prisma/migrations/20251224083549_add_comprehensive_report_storage/migration.sql +108 -108
  492. package/templates/starter/prisma/migrations/20251229194422_migrate_duration_to_string/migration.sql +55 -55
  493. package/templates/starter/prisma/migrations/20251230124637_add_unique_constraint_to_test_run_name/migration.sql +27 -27
  494. package/templates/starter/prisma/migrations/20260115094436_add_dashboard_metrics/migration.sql +59 -59
  495. package/templates/starter/prisma/migrations/20260127172022_add_cascade_delete_to_step_parameters/migration.sql +34 -34
  496. package/templates/starter/prisma/migrations/20260313093000_add_report_step_screenshot_path/migration.sql +1 -1
  497. package/templates/starter/prisma/migrations/20260507000000_add_flow_builder_node_grouping/migration.sql +34 -0
  498. package/templates/starter/prisma/schema.prisma +36 -0
  499. package/templates/starter/scripts/lib/jsdoc-parser.test.ts +12 -0
  500. package/templates/starter/scripts/lib/jsdoc-parser.ts +5 -88
  501. package/templates/starter/scripts/lib/step-file-parser.ts +111 -178
  502. package/templates/starter/scripts/lib/template-sync-utils.test.ts +35 -0
  503. package/templates/starter/scripts/run-fallow-commit.mjs +23 -0
  504. package/templates/starter/scripts/setup-env.ts +0 -0
  505. package/templates/starter/scripts/sync-tags.ts +1 -1
  506. package/templates/starter/scripts/sync-test-suites.ts +233 -162
  507. package/templates/starter/src/actions/dashboard/dashboard-actions.ts +0 -7
  508. package/templates/starter/src/actions/locator-picker/locator-picker-actions.test.ts +10 -0
  509. package/templates/starter/src/actions/locator-picker/locator-picker-actions.ts +5 -0
  510. package/templates/starter/src/actions/server-action-boundary.test.ts +794 -0
  511. package/templates/starter/src/actions/test-suite/test-suite-actions.ts +2 -1
  512. package/templates/starter/src/app/(base)/environments/create/page.tsx +28 -28
  513. package/templates/starter/src/app/(base)/environments/environment-form.tsx +16 -23
  514. package/templates/starter/src/app/(base)/environments/page.tsx +2 -2
  515. package/templates/starter/src/app/(base)/layout.tsx +10 -10
  516. package/templates/starter/src/app/(base)/locator-groups/create/page.tsx +1 -1
  517. package/templates/starter/src/app/(base)/locator-groups/locator-group-form.tsx +24 -24
  518. package/templates/starter/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -77
  519. package/templates/starter/src/app/(base)/locator-groups/locator-group-table.tsx +28 -28
  520. package/templates/starter/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -46
  521. package/templates/starter/src/app/(base)/locator-groups/page.tsx +3 -3
  522. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-helpers.ts +34 -333
  523. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-response.test.ts +85 -0
  524. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-response.ts +125 -0
  525. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-state.ts +227 -0
  526. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-types.ts +68 -0
  527. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace.test.tsx +73 -1
  528. package/templates/starter/src/app/(base)/locators/create/create-locator-workspace.tsx +19 -16
  529. package/templates/starter/src/app/(base)/locators/create/page.tsx +4 -8
  530. package/templates/starter/src/app/(base)/locators/create/use-locator-workspace.ts +15 -2
  531. package/templates/starter/src/app/(base)/locators/locator-file-sync.test.ts +45 -0
  532. package/templates/starter/src/app/(base)/locators/locator-file-sync.ts +22 -0
  533. package/templates/starter/src/app/(base)/locators/locator-sync-toast.ts +34 -0
  534. package/templates/starter/src/app/(base)/locators/modify/[id]/page.tsx +1 -1
  535. package/templates/starter/src/app/(base)/locators/page.tsx +3 -5
  536. package/templates/starter/src/app/(base)/locators/picker/page.tsx +6 -0
  537. package/templates/starter/src/app/(base)/locators/sync-locators-button.tsx +12 -53
  538. package/templates/starter/src/app/(base)/modules/modify/[id]/page.tsx +11 -5
  539. package/templates/starter/src/app/(base)/modules/module-form-helpers.ts +12 -0
  540. package/templates/starter/src/app/(base)/modules/module-form.tsx +14 -19
  541. package/templates/starter/src/app/(base)/modules/module-helpers.test.ts +48 -0
  542. package/templates/starter/src/app/(base)/modules/module-helpers.ts +4 -64
  543. package/templates/starter/src/app/(base)/modules/module-parent-helpers.ts +16 -0
  544. package/templates/starter/src/app/(base)/modules/module-row-helpers.ts +32 -0
  545. package/templates/starter/src/app/(base)/modules/module-types.ts +8 -0
  546. package/templates/starter/src/app/(base)/modules/page.tsx +2 -2
  547. package/templates/starter/src/app/(base)/reports/[id]/page.tsx +25 -30
  548. package/templates/starter/src/app/(base)/reports/overview-chart.tsx +49 -49
  549. package/templates/starter/src/app/(base)/reports/page.tsx +5 -48
  550. package/templates/starter/src/app/(base)/reports/report-charts.tsx +17 -0
  551. package/templates/starter/src/app/(base)/reports/report-detail-helpers.ts +27 -54
  552. package/templates/starter/src/app/(base)/reports/report-metric-card.tsx +3 -3
  553. package/templates/starter/src/app/(base)/reports/report-table-columns.tsx +14 -46
  554. package/templates/starter/src/app/(base)/reports/report-table.tsx +5 -55
  555. package/templates/starter/src/app/(base)/reports/report-view-table-columns.tsx +5 -5
  556. package/templates/starter/src/app/(base)/reports/report-view-table.tsx +1 -49
  557. package/templates/starter/src/app/(base)/reports/test-cases/page.tsx +1 -1
  558. package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +115 -115
  559. package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -27
  560. package/templates/starter/src/app/(base)/reports/test-suites/page.tsx +2 -2
  561. package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +79 -79
  562. package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +27 -27
  563. package/templates/starter/src/app/(base)/reports/view-logs-button.tsx +1 -1
  564. package/templates/starter/src/app/(base)/settings/page.tsx +2 -2
  565. package/templates/starter/src/app/(base)/settings/settings-sync-panel-helpers.tsx +2 -2
  566. package/templates/starter/src/app/(base)/settings/settings-sync-panel.tsx +7 -13
  567. package/templates/starter/src/app/(base)/settings/use-settings-sync.ts +0 -1
  568. package/templates/starter/src/app/(base)/tags/create/page.tsx +1 -1
  569. package/templates/starter/src/app/(base)/tags/modify/[id]/page.tsx +1 -1
  570. package/templates/starter/src/app/(base)/tags/page.tsx +2 -2
  571. package/templates/starter/src/app/(base)/tags/tag-form-helpers.ts +9 -0
  572. package/templates/starter/src/app/(base)/tags/tag-form.test.tsx +43 -1
  573. package/templates/starter/src/app/(base)/tags/tag-form.tsx +42 -23
  574. package/templates/starter/src/app/(base)/tags/tag-table-columns.tsx +63 -63
  575. package/templates/starter/src/app/(base)/tags/tag-table.tsx +29 -29
  576. package/templates/starter/src/app/(base)/template-step-groups/create/page.tsx +28 -28
  577. package/templates/starter/src/app/(base)/template-step-groups/page.tsx +2 -2
  578. package/templates/starter/src/app/(base)/template-step-groups/template-step-group-form.tsx +10 -15
  579. package/templates/starter/src/app/(base)/template-step-groups/template-step-group-table-columns.tsx +1 -5
  580. package/templates/starter/src/app/(base)/template-steps/modify/[id]/page.tsx +13 -7
  581. package/templates/starter/src/app/(base)/template-steps/page.tsx +2 -2
  582. package/templates/starter/src/app/(base)/template-steps/paramChip.tsx +20 -13
  583. package/templates/starter/src/app/(base)/template-steps/template-step-form-helpers.ts +65 -0
  584. package/templates/starter/src/app/(base)/template-steps/template-step-form.tsx +21 -26
  585. package/templates/starter/src/app/(base)/template-steps/template-step-helpers.ts +25 -176
  586. package/templates/starter/src/app/(base)/template-steps/template-step-option-helpers.ts +13 -0
  587. package/templates/starter/src/app/(base)/template-steps/template-step-row-guards.ts +69 -0
  588. package/templates/starter/src/app/(base)/template-steps/template-step-table-columns.tsx +7 -4
  589. package/templates/starter/src/app/(base)/template-steps/template-step-types.ts +31 -0
  590. package/templates/starter/src/app/(base)/template-test-cases/create/page.tsx +12 -19
  591. package/templates/starter/src/app/(base)/template-test-cases/create-template-test-case-page-data.test.ts +78 -0
  592. package/templates/starter/src/app/(base)/template-test-cases/create-template-test-case-page-data.ts +58 -0
  593. package/templates/starter/src/app/(base)/template-test-cases/modify/[id]/page.tsx +67 -8
  594. package/templates/starter/src/app/(base)/template-test-cases/page.tsx +2 -2
  595. package/templates/starter/src/app/(base)/template-test-cases/template-test-case-flow.test.tsx +2 -0
  596. package/templates/starter/src/app/(base)/template-test-cases/template-test-case-flow.tsx +19 -4
  597. package/templates/starter/src/app/(base)/template-test-cases/template-test-case-form.test.tsx +6 -0
  598. package/templates/starter/src/app/(base)/template-test-cases/template-test-case-form.tsx +30 -26
  599. package/templates/starter/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -76
  600. package/templates/starter/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -32
  601. package/templates/starter/src/app/(base)/test-cases/create/page.test.tsx +121 -0
  602. package/templates/starter/src/app/(base)/test-cases/create/page.tsx +27 -5
  603. package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-conversion-helpers.ts +27 -0
  604. package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-helpers.test.ts +2 -0
  605. package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-helpers.ts +14 -171
  606. package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-selection-helpers.ts +74 -0
  607. package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-types.ts +24 -0
  608. package/templates/starter/src/app/(base)/test-cases/create-from-template/generate/[id]/page.test.tsx +19 -0
  609. package/templates/starter/src/app/(base)/test-cases/create-from-template/generate/[id]/page.tsx +2 -93
  610. package/templates/starter/src/app/(base)/test-cases/create-from-template/page.test.tsx +157 -0
  611. package/templates/starter/src/app/(base)/test-cases/create-from-template/page.tsx +113 -10
  612. package/templates/starter/src/app/(base)/test-cases/editable-test-case-builders.ts +35 -0
  613. package/templates/starter/src/app/(base)/test-cases/editable-test-case-guards.ts +42 -0
  614. package/templates/starter/src/app/(base)/test-cases/editable-test-case-helpers.ts +3 -0
  615. package/templates/starter/src/app/(base)/test-cases/editable-test-case-types.ts +14 -0
  616. package/templates/starter/src/app/(base)/test-cases/inline-tag-creation-dialog.tsx +47 -0
  617. package/templates/starter/src/app/(base)/test-cases/inline-test-suite-creation-dialog.tsx +57 -0
  618. package/templates/starter/src/app/(base)/test-cases/modify/[id]/page.tsx +31 -4
  619. package/templates/starter/src/app/(base)/test-cases/page.tsx +3 -3
  620. package/templates/starter/src/app/(base)/test-cases/test-case-flow.test.tsx +24 -0
  621. package/templates/starter/src/app/(base)/test-cases/test-case-flow.tsx +34 -13
  622. package/templates/starter/src/app/(base)/test-cases/test-case-form-reducer.test.ts +59 -0
  623. package/templates/starter/src/app/(base)/test-cases/test-case-form-reducer.ts +203 -0
  624. package/templates/starter/src/app/(base)/test-cases/test-case-form.test.tsx +340 -32
  625. package/templates/starter/src/app/(base)/test-cases/test-case-form.tsx +1325 -166
  626. package/templates/starter/src/app/(base)/test-cases/test-case-resource-rows.ts +9 -0
  627. package/templates/starter/src/app/(base)/test-cases/test-case-route-helpers.test.ts +4 -1
  628. package/templates/starter/src/app/(base)/test-cases/test-case-route-helpers.ts +3 -147
  629. package/templates/starter/src/app/(base)/test-cases/test-case-row-helpers.ts +30 -0
  630. package/templates/starter/src/app/(base)/test-cases/test-case-shared-resource-rows.ts +55 -0
  631. package/templates/starter/src/app/(base)/test-cases/test-case-table.tsx +3 -3
  632. package/templates/starter/src/app/(base)/test-cases/test-case-template-resource-rows.ts +21 -0
  633. package/templates/starter/src/app/(base)/test-runs/create/page.tsx +8 -16
  634. package/templates/starter/src/app/(base)/test-runs/create-test-run-page-data.test.ts +60 -0
  635. package/templates/starter/src/app/(base)/test-runs/create-test-run-page-data.ts +38 -0
  636. package/templates/starter/src/app/(base)/test-runs/page.tsx +2 -2
  637. package/templates/starter/src/app/(base)/test-runs/test-run-form-data-helpers.ts +71 -0
  638. package/templates/starter/src/app/(base)/test-runs/test-run-form-display-helpers.ts +44 -0
  639. package/templates/starter/src/app/(base)/test-runs/test-run-form-helpers.ts +17 -157
  640. package/templates/starter/src/app/(base)/test-runs/test-run-form-selection-helpers.ts +46 -0
  641. package/templates/starter/src/app/(base)/test-runs/test-run-form.tsx +19 -24
  642. package/templates/starter/src/app/(base)/test-runs/test-run-table-columns.tsx +14 -14
  643. package/templates/starter/src/app/(base)/test-runs/test-run-table.tsx +61 -60
  644. package/templates/starter/src/app/(base)/test-suites/editable-test-suite-helpers.ts +17 -0
  645. package/templates/starter/src/app/(base)/test-suites/page.tsx +5 -5
  646. package/templates/starter/src/app/(base)/test-suites/test-suite-form-display-helpers.ts +54 -0
  647. package/templates/starter/src/app/(base)/test-suites/test-suite-form.test.tsx +57 -8
  648. package/templates/starter/src/app/(base)/test-suites/test-suite-form.tsx +38 -21
  649. package/templates/starter/src/app/(base)/test-suites/test-suite-helpers.ts +25 -215
  650. package/templates/starter/src/app/(base)/test-suites/test-suite-row-guards.ts +80 -0
  651. package/templates/starter/src/app/(base)/test-suites/test-suite-table-columns.tsx +1 -1
  652. package/templates/starter/src/app/(base)/test-suites/test-suite-table-helpers.ts +57 -0
  653. package/templates/starter/src/app/(base)/test-suites/test-suite-types.ts +30 -0
  654. package/templates/starter/src/app/(dashboard-components)/app-drawer.tsx +26 -23
  655. package/templates/starter/src/app/(dashboard-components)/data-card-grid.tsx +1 -1
  656. package/templates/starter/src/app/(dashboard-components)/data-card.tsx +30 -26
  657. package/templates/starter/src/app/(dashboard-components)/execution-health-panel.tsx +42 -42
  658. package/templates/starter/src/app/(dashboard-components)/ongoing-test-runs-card.tsx +8 -8
  659. package/templates/starter/src/app/(dashboard-components)/quick-actions-drawer.tsx +66 -42
  660. package/templates/starter/src/app/api/test-runs/[runId]/download/route.ts +160 -103
  661. package/templates/starter/src/app/globals.css +11 -0
  662. package/templates/starter/src/app/layout.tsx +17 -17
  663. package/templates/starter/src/app/page.tsx +10 -5
  664. package/templates/starter/src/assets/icons/empty-tube.tsx +23 -23
  665. package/templates/starter/src/assets/icons/tube-plus.tsx +29 -29
  666. package/templates/starter/src/components/base-node.tsx +5 -8
  667. package/templates/starter/src/components/data-state/empty-state.tsx +1 -1
  668. package/templates/starter/src/components/data-visualization/info-card.tsx +70 -70
  669. package/templates/starter/src/components/data-visualization/info-grid.tsx +22 -22
  670. package/templates/starter/src/components/diagram/add-node-prompt-node.tsx +30 -0
  671. package/templates/starter/src/components/diagram/button-edge.tsx +27 -9
  672. package/templates/starter/src/components/diagram/dynamic-parameter-field-label.tsx +19 -0
  673. package/templates/starter/src/components/diagram/dynamic-parameter-field-shell.tsx +30 -0
  674. package/templates/starter/src/components/diagram/dynamic-parameter-field-types.ts +32 -0
  675. package/templates/starter/src/components/diagram/dynamic-parameter-fields.tsx +140 -0
  676. package/templates/starter/src/components/diagram/dynamic-parameter-locator-field.tsx +288 -0
  677. package/templates/starter/src/components/diagram/dynamic-parameters-helpers.ts +6 -1
  678. package/templates/starter/src/components/diagram/dynamic-parameters.test.tsx +295 -0
  679. package/templates/starter/src/components/diagram/dynamic-parameters.tsx +223 -222
  680. package/templates/starter/src/components/diagram/flow-add-node-prompt-helpers.ts +22 -0
  681. package/templates/starter/src/components/diagram/flow-block-helpers.ts +86 -0
  682. package/templates/starter/src/components/diagram/flow-diagram-block-dialog.tsx +56 -0
  683. package/templates/starter/src/components/diagram/flow-diagram-block-overlays.tsx +65 -0
  684. package/templates/starter/src/components/diagram/flow-diagram-connection-guards.ts +127 -0
  685. package/templates/starter/src/components/diagram/flow-diagram-grouping-hints.tsx +38 -0
  686. package/templates/starter/src/components/diagram/flow-diagram-helpers.test.ts +187 -5
  687. package/templates/starter/src/components/diagram/flow-diagram-helpers.ts +22 -251
  688. package/templates/starter/src/components/diagram/flow-diagram-node-search.tsx +108 -0
  689. package/templates/starter/src/components/diagram/flow-diagram-node-types.tsx +46 -0
  690. package/templates/starter/src/components/diagram/flow-diagram-toolbar.tsx +88 -0
  691. package/templates/starter/src/components/diagram/flow-diagram-types.ts +21 -0
  692. package/templates/starter/src/components/diagram/flow-diagram-view.tsx +179 -0
  693. package/templates/starter/src/components/diagram/flow-diagram.test.tsx +501 -0
  694. package/templates/starter/src/components/diagram/flow-diagram.tsx +72 -226
  695. package/templates/starter/src/components/diagram/flow-node-data-helpers.ts +122 -0
  696. package/templates/starter/src/components/diagram/flow-node-order-helpers.ts +179 -0
  697. package/templates/starter/src/components/diagram/flow-node-search-helpers.ts +24 -0
  698. package/templates/starter/src/components/diagram/node-form-fields-content.tsx +120 -0
  699. package/templates/starter/src/components/diagram/node-form-fields-props.ts +3 -0
  700. package/templates/starter/src/components/diagram/node-form-helpers.ts +15 -8
  701. package/templates/starter/src/components/diagram/node-form-submit.ts +36 -0
  702. package/templates/starter/src/components/diagram/node-form-template-step-selection.test.ts +42 -0
  703. package/templates/starter/src/components/diagram/node-form-template-step-selection.ts +40 -0
  704. package/templates/starter/src/components/diagram/node-form.test.tsx +172 -25
  705. package/templates/starter/src/components/diagram/node-form.tsx +108 -158
  706. package/templates/starter/src/components/diagram/options-header-gherkin-step.tsx +72 -0
  707. package/templates/starter/src/components/diagram/options-header-node.test.tsx +210 -0
  708. package/templates/starter/src/components/diagram/options-header-node.tsx +226 -32
  709. package/templates/starter/src/components/diagram/template-step-combobox.test.tsx +144 -0
  710. package/templates/starter/src/components/diagram/template-step-combobox.tsx +176 -39
  711. package/templates/starter/src/components/diagram/use-flow-diagram-block-grouping.ts +130 -0
  712. package/templates/starter/src/components/diagram/use-flow-diagram-search.ts +114 -0
  713. package/templates/starter/src/components/diagram/use-flow-diagram.ts +384 -0
  714. package/templates/starter/src/components/form/error-message.tsx +7 -7
  715. package/templates/starter/src/components/loading-skeleton/data-table/data-table-skeleton.tsx +1 -1
  716. package/templates/starter/src/components/loading-skeleton/form/button-skeleton.tsx +8 -8
  717. package/templates/starter/src/components/loading-skeleton/form/icon-button-skeleton.tsx +1 -1
  718. package/templates/starter/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -8
  719. package/templates/starter/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -14
  720. package/templates/starter/src/components/logo.tsx +1 -1
  721. package/templates/starter/src/components/navigation/command-badge.tsx +1 -1
  722. package/templates/starter/src/components/navigation/command-chain-input.tsx +5 -10
  723. package/templates/starter/src/components/navigation/entity-search-command.tsx +47 -24
  724. package/templates/starter/src/components/navigation/nav-command-search.tsx +5 -5
  725. package/templates/starter/src/components/navigation/nav-command.tsx +8 -8
  726. package/templates/starter/src/components/navigation/nav-link.tsx +60 -60
  727. package/templates/starter/src/components/navigation/nav-menu-card-deck.tsx +73 -70
  728. package/templates/starter/src/components/reports/test-case-logs-modal.tsx +10 -10
  729. package/templates/starter/src/components/table/table-actions.test.tsx +53 -0
  730. package/templates/starter/src/components/table/table-actions.tsx +14 -10
  731. package/templates/starter/src/components/test-case/test-case-form-helpers.test.ts +1 -0
  732. package/templates/starter/src/components/test-case/test-case-form-helpers.ts +40 -45
  733. package/templates/starter/src/components/test-case/test-case-picker.test.tsx +14 -11
  734. package/templates/starter/src/components/test-case/test-case-picker.tsx +140 -112
  735. package/templates/starter/src/components/test-case/test-scenario-preview.tsx +69 -16
  736. package/templates/starter/src/components/test-run/download-logs-button.tsx +13 -26
  737. package/templates/starter/src/components/test-run/log-viewer-events.ts +7 -0
  738. package/templates/starter/src/components/test-run/log-viewer-helpers.ts +4 -80
  739. package/templates/starter/src/components/test-run/log-viewer-parsing.ts +28 -0
  740. package/templates/starter/src/components/test-run/log-viewer-status.ts +35 -0
  741. package/templates/starter/src/components/test-run/log-viewer-types.ts +7 -0
  742. package/templates/starter/src/components/test-run/log-viewer.tsx +9 -9
  743. package/templates/starter/src/components/test-run/test-run-details-guards.ts +85 -0
  744. package/templates/starter/src/components/test-run/test-run-details-helpers.test.ts +102 -0
  745. package/templates/starter/src/components/test-run/test-run-details-helpers.ts +10 -208
  746. package/templates/starter/src/components/test-run/test-run-details-progress.ts +26 -0
  747. package/templates/starter/src/components/test-run/test-run-details-status.ts +70 -0
  748. package/templates/starter/src/components/test-run/test-run-details-types.ts +21 -0
  749. package/templates/starter/src/components/test-run/test-run-details.test.tsx +1 -6
  750. package/templates/starter/src/components/test-run/test-run-details.tsx +26 -54
  751. package/templates/starter/src/components/test-run/test-run-header.test.tsx +13 -18
  752. package/templates/starter/src/components/test-run/trace-viewer-button-label.tsx +57 -0
  753. package/templates/starter/src/components/test-run/view-report-button.tsx +60 -64
  754. package/templates/starter/src/components/test-suite/test-suite-picker-helpers.test.ts +27 -1
  755. package/templates/starter/src/components/test-suite/test-suite-picker-helpers.ts +80 -1
  756. package/templates/starter/src/components/test-suite/test-suite-picker-suite-row-header.tsx +87 -0
  757. package/templates/starter/src/components/test-suite/test-suite-picker-suite-row.tsx +61 -0
  758. package/templates/starter/src/components/test-suite/test-suite-picker-test-case-list.tsx +95 -0
  759. package/templates/starter/src/components/test-suite/test-suite-picker.tsx +134 -275
  760. package/templates/starter/src/components/typography/page-header-subtitle.tsx +7 -7
  761. package/templates/starter/src/components/typography/page-header.tsx +7 -7
  762. package/templates/starter/src/components/ui/alert.tsx +12 -18
  763. package/templates/starter/src/components/ui/badge.tsx +1 -1
  764. package/templates/starter/src/components/ui/button.tsx +13 -10
  765. package/templates/starter/src/components/ui/calendar.tsx +3 -3
  766. package/templates/starter/src/components/ui/card.tsx +16 -34
  767. package/templates/starter/src/components/ui/chart-utils.ts +43 -0
  768. package/templates/starter/src/components/ui/chart.tsx +217 -304
  769. package/templates/starter/src/components/ui/checkbox.tsx +20 -17
  770. package/templates/starter/src/components/ui/command.tsx +63 -96
  771. package/templates/starter/src/components/ui/data-table-column-header.tsx +3 -3
  772. package/templates/starter/src/components/ui/data-table-pagination.tsx +7 -7
  773. package/templates/starter/src/components/ui/data-table-view-options.tsx +20 -15
  774. package/templates/starter/src/components/ui/data-table.tsx +22 -19
  775. package/templates/starter/src/components/ui/dialog.tsx +45 -63
  776. package/templates/starter/src/components/ui/dropdown-menu.tsx +76 -148
  777. package/templates/starter/src/components/ui/empty.tsx +21 -40
  778. package/templates/starter/src/components/ui/input.tsx +13 -15
  779. package/templates/starter/src/components/ui/kbd.tsx +7 -13
  780. package/templates/starter/src/components/ui/label.tsx +7 -6
  781. package/templates/starter/src/components/ui/multi-select-with-preview.tsx +20 -7
  782. package/templates/starter/src/components/ui/multi-select.tsx +7 -5
  783. package/templates/starter/src/components/ui/picker-browse-shell.tsx +99 -0
  784. package/templates/starter/src/components/ui/popover.tsx +21 -19
  785. package/templates/starter/src/components/ui/progress.tsx +14 -15
  786. package/templates/starter/src/components/ui/radio-group.tsx +14 -25
  787. package/templates/starter/src/components/ui/scroll-area.tsx +32 -29
  788. package/templates/starter/src/components/ui/select.tsx +99 -125
  789. package/templates/starter/src/components/ui/separator.tsx +16 -12
  790. package/templates/starter/src/components/ui/sheet.tsx +92 -0
  791. package/templates/starter/src/components/ui/skeleton.tsx +7 -7
  792. package/templates/starter/src/components/ui/table.tsx +24 -49
  793. package/templates/starter/src/components/ui/tabs.tsx +36 -41
  794. package/templates/starter/src/components/ui/textarea.tsx +11 -15
  795. package/templates/starter/src/components/ui/toast.tsx +56 -62
  796. package/templates/starter/src/components/ui/toaster.tsx +26 -26
  797. package/templates/starter/src/components/ui/tooltip.tsx +23 -20
  798. package/templates/starter/src/components/user-prompt/delete-prompt.tsx +5 -5
  799. package/templates/starter/src/constants/form-opts/diagram/node-form.ts +11 -28
  800. package/templates/starter/src/constants/form-opts/environment-form-opts.ts +1 -1
  801. package/templates/starter/src/constants/form-opts/locator-group-form-opts.ts +1 -7
  802. package/templates/starter/src/constants/form-opts/module-form-opts.ts +1 -1
  803. package/templates/starter/src/constants/form-opts/tag-form-opts.ts +1 -1
  804. package/templates/starter/src/constants/form-opts/template-selection-form-opts.ts +0 -11
  805. package/templates/starter/src/constants/form-opts/template-step-group-form-opts.ts +1 -1
  806. package/templates/starter/src/constants/form-opts/template-test-case-form-opts.ts +3 -33
  807. package/templates/starter/src/constants/form-opts/template-test-step-form-opts.ts +1 -1
  808. package/templates/starter/src/constants/form-opts/test-case-form-opts.ts +3 -35
  809. package/templates/starter/src/constants/form-opts/test-case-step-form-opts.ts +27 -0
  810. package/templates/starter/src/constants/form-opts/test-run-form-opts.ts +1 -1
  811. package/templates/starter/src/constants/form-opts/test-suite-form-opts.ts +1 -1
  812. package/templates/starter/src/hooks/use-toast.ts +1 -1
  813. package/templates/starter/src/lib/automation/automation-path-roots.ts +1 -9
  814. package/templates/starter/src/lib/bidirectional-sync.ts +116 -107
  815. package/templates/starter/src/lib/database-sync.ts +142 -190
  816. package/templates/starter/src/lib/environment-file-utils.ts +3 -115
  817. package/templates/starter/src/lib/executor/local-executor-adapter.ts +1 -1
  818. package/templates/starter/src/lib/form/tanstack-form-action.ts +7 -0
  819. package/templates/starter/src/lib/form/tanstack-form.tsx +18 -0
  820. package/templates/starter/src/lib/gherkin-parser.test.ts +7 -7
  821. package/templates/starter/src/lib/gherkin-parser.ts +132 -145
  822. package/templates/starter/src/lib/gherkin-step-format.ts +80 -0
  823. package/templates/starter/src/lib/jsdoc/template-step-jsdoc.ts +262 -0
  824. package/templates/starter/src/lib/locator-group-file-utils.ts +2 -20
  825. package/templates/starter/src/lib/locator-picker/suggestions.ts +7 -4
  826. package/templates/starter/src/lib/metrics/metric-calculator.test.ts +156 -0
  827. package/templates/starter/src/lib/metrics/metric-calculator.ts +251 -273
  828. package/templates/starter/src/lib/module-hierarchy-builder.ts +1 -10
  829. package/templates/starter/src/lib/path-helpers/feature-path.ts +10 -0
  830. package/templates/starter/src/lib/path-helpers/module-path.ts +0 -50
  831. package/templates/starter/src/lib/process/task-spawner.ts +50 -27
  832. package/templates/starter/src/lib/sync/projected-feature-utils.ts +2 -42
  833. package/templates/starter/src/lib/sync/sync-pending-counts.ts +126 -274
  834. package/templates/starter/src/lib/sync/sync-registry.ts +2 -2
  835. package/templates/starter/src/lib/tag-filters.ts +11 -0
  836. package/templates/starter/src/lib/tag-identifiers.ts +18 -0
  837. package/templates/starter/src/lib/tag-utils.ts +2 -28
  838. package/templates/starter/src/lib/template-automation-paths.ts +34 -0
  839. package/templates/starter/src/lib/template-path-exclusions.ts +34 -0
  840. package/templates/starter/src/lib/template-sync-utils.d.ts +6 -6
  841. package/templates/starter/src/lib/template-sync-utils.ts +2 -65
  842. package/templates/starter/src/lib/test-case-utils.ts +6 -6
  843. package/templates/starter/src/lib/test-run/log-formatter.ts +83 -83
  844. package/templates/starter/src/lib/test-run/matching.test.ts +77 -0
  845. package/templates/starter/src/lib/test-run/matching.ts +2 -2
  846. package/templates/starter/src/lib/test-run/report-parser.test.ts +113 -0
  847. package/templates/starter/src/lib/test-run/report-parser.ts +352 -352
  848. package/templates/starter/src/lib/test-suite-identifier-service.ts +1 -1
  849. package/templates/starter/src/lib/transformers/gherkin-converter.ts +42 -42
  850. package/templates/starter/src/lib/transformers/key-to-icon-transformer.tsx +95 -95
  851. package/templates/starter/src/lib/transformers/template-test-case-converter.ts +13 -64
  852. package/templates/starter/src/lib/utils/node-param-validation.ts +81 -81
  853. package/templates/starter/src/lib/utils/template-step-file-generator.ts +2 -19
  854. package/templates/starter/src/lib/utils/template-step-file-manager-intelligent.ts +1 -355
  855. package/templates/starter/src/lib/utils/template-step-function-bounds.test.ts +48 -0
  856. package/templates/starter/src/lib/utils/template-step-function-bounds.ts +138 -0
  857. package/templates/starter/src/lib/utils.ts +0 -4
  858. package/templates/starter/src/services/locator/locator-service.ts +22 -6
  859. package/templates/starter/src/services/report/report-service.ts +249 -237
  860. package/templates/starter/src/services/tag/tag-service.test.ts +140 -2
  861. package/templates/starter/src/services/tag/tag-service.ts +71 -0
  862. package/templates/starter/src/services/template-test-case/template-test-case-service.ts +34 -2
  863. package/templates/starter/src/services/test-case/test-case-service.test.ts +1 -0
  864. package/templates/starter/src/services/test-case/test-case-service.ts +39 -2
  865. package/templates/starter/src/services/test-run/test-run-service.ts +146 -119
  866. package/templates/starter/src/test/motion-react-vitest-mocks.ts +18 -0
  867. package/templates/starter/src/test/setup-motion-react-mocks.ts +4 -0
  868. package/templates/starter/src/types/diagram/diagram.ts +8 -0
  869. package/templates/starter/src/types/diagram/template-step.ts +5 -2
  870. package/templates/starter/src/types/report.ts +84 -0
  871. package/templates/starter/tsconfig.json +1 -1
  872. package/templates/blank/src/app/(base)/test-cases/create-from-template/template-selection-form.test.tsx +0 -87
  873. package/templates/blank/src/app/(base)/test-cases/create-from-template/template-selection-form.tsx +0 -83
  874. package/templates/blank/src/components/chart/pie-chart.tsx +0 -73
  875. package/templates/blank/src/components/data-extraction/locator-inspector.tsx +0 -349
  876. package/templates/blank/src/components/diagram/edit-header-option.tsx +0 -36
  877. package/templates/blank/src/components/kokonutui/smooth-tab.tsx +0 -453
  878. package/templates/blank/src/components/navigation/nav-card.tsx +0 -31
  879. package/templates/blank/src/components/node-header.tsx +0 -159
  880. package/templates/blank/src/components/ui/alert-dialog.tsx +0 -106
  881. package/templates/blank/src/components/ui/avatar.tsx +0 -40
  882. package/templates/blank/src/components/ui/loading.tsx +0 -12
  883. package/templates/blank/src/components/ui/navigation-menu.tsx +0 -120
  884. package/templates/blank/src/lib/template-sync-utils.js +0 -50
  885. package/templates/blank/src/lib/test-run/test-run-executor.ts +0 -13
  886. package/templates/blank/src/lib/utils/template-step-file-manager.ts +0 -166
  887. package/templates/blank/src/services/shared/index.ts +0 -7
  888. package/templates/blank/src/types/executor/browser.type.ts +0 -1
  889. package/templates/blank/src/types/locator/locator.type.ts +0 -11
  890. package/templates/blank/src/types/step/step.type.ts +0 -1
  891. package/templates/blank/src/types/table/data-table.ts +0 -6
  892. package/templates/starter/src/app/(base)/test-cases/create-from-template/template-selection-form.test.tsx +0 -87
  893. package/templates/starter/src/app/(base)/test-cases/create-from-template/template-selection-form.tsx +0 -83
  894. package/templates/starter/src/components/chart/pie-chart.tsx +0 -73
  895. package/templates/starter/src/components/data-extraction/locator-inspector.tsx +0 -349
  896. package/templates/starter/src/components/diagram/edit-header-option.tsx +0 -36
  897. package/templates/starter/src/components/kokonutui/smooth-tab.tsx +0 -453
  898. package/templates/starter/src/components/navigation/nav-card.tsx +0 -31
  899. package/templates/starter/src/components/node-header.tsx +0 -159
  900. package/templates/starter/src/components/ui/alert-dialog.tsx +0 -106
  901. package/templates/starter/src/components/ui/avatar.tsx +0 -40
  902. package/templates/starter/src/components/ui/loading.tsx +0 -12
  903. package/templates/starter/src/components/ui/navigation-menu.tsx +0 -120
  904. package/templates/starter/src/lib/template-sync-utils.js +0 -50
  905. package/templates/starter/src/lib/test-run/test-run-executor.ts +0 -13
  906. package/templates/starter/src/lib/utils/template-step-file-manager.ts +0 -166
  907. package/templates/starter/src/services/shared/index.ts +0 -7
  908. package/templates/starter/src/types/executor/browser.type.ts +0 -1
  909. package/templates/starter/src/types/locator/locator.type.ts +0 -11
  910. package/templates/starter/src/types/step/step.type.ts +0 -1
  911. package/templates/starter/src/types/table/data-table.ts +0 -6
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cli.e2e.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.e2e.test.d.ts","sourceRoot":"","sources":["../src/cli.e2e.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,73 @@
1
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
2
+ import path from 'path';
3
+ import fs from 'fs-extra';
4
+ import os from 'os';
5
+ import { getTemplatePath } from './copy-template.js';
6
+ import { patchPackageJsonScripts } from './install.js';
7
+ describe('CLI E2E', () => {
8
+ let tempDir;
9
+ let destDir;
10
+ beforeEach(async () => {
11
+ tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-e2e-'));
12
+ destDir = path.join(tempDir, 'my-app');
13
+ });
14
+ afterEach(async () => {
15
+ await fs.remove(tempDir).catch(() => { });
16
+ });
17
+ it('scaffolds app when run with non-interactive input (manual run required for full E2E)', async () => {
18
+ const templatePath = getTemplatePath();
19
+ if (!(await fs.pathExists(templatePath))) {
20
+ console.warn('Skipping E2E: template not found (run npm run build first)');
21
+ return;
22
+ }
23
+ await fs.ensureDir(destDir);
24
+ const pkgJsonPath = path.join(destDir, 'package.json');
25
+ const srcPath = path.join(destDir, 'src');
26
+ const { copyTemplate } = await import('./copy-template.js');
27
+ await copyTemplate(destDir);
28
+ expect(await fs.pathExists(pkgJsonPath)).toBe(true);
29
+ expect(await fs.pathExists(srcPath)).toBe(true);
30
+ const pkg = await fs.readJson(pkgJsonPath);
31
+ expect(pkg.name).toBe('appraisejs');
32
+ expect(pkg.scripts?.dev).toBeDefined();
33
+ });
34
+ it('patchPackageJsonScripts rewrites real template scripts for chosen package manager', async () => {
35
+ const templatePath = getTemplatePath();
36
+ if (!(await fs.pathExists(templatePath))) {
37
+ console.warn('Skipping E2E: template not found (run npm run build first)');
38
+ return;
39
+ }
40
+ const { copyTemplate } = await import('./copy-template.js');
41
+ await copyTemplate(destDir);
42
+ const pkgBefore = await fs.readJson(path.join(destDir, 'package.json'));
43
+ expect(pkgBefore.scripts['install-dependencies']).toBe('npm install --legacy-peer-deps');
44
+ expect(pkgBefore.scripts.setup).toMatch(/npm run /);
45
+ await patchPackageJsonScripts(destDir, 'pnpm');
46
+ const pkgAfter = await fs.readJson(path.join(destDir, 'package.json'));
47
+ expect(pkgAfter.scripts['install-dependencies']).toBe('pnpm install');
48
+ expect(pkgAfter.scripts.setup).toBe('pnpm run install-dependencies && pnpm run setup-env && pnpm run migrate-db && pnpm run install-playwright');
49
+ expect(pkgAfter.scripts['appraisejs:setup']).toBe('pnpm run setup');
50
+ expect(pkgAfter.scripts['appraisejs:sync']).toBe('pnpm run sync-all');
51
+ expect(pkgAfter.scripts['setup-env']).toContain('pnpm exec ');
52
+ expect(pkgAfter.scripts['setup-env']).not.toContain('npx ');
53
+ expect(pkgAfter.scripts['sync-all']).toContain('pnpm exec ');
54
+ expect(pkgAfter.scripts['install-playwright']).toContain('pnpm exec ');
55
+ expect(pkgAfter.scripts['install-playwright']).not.toContain('npx ');
56
+ });
57
+ it('patchPackageJsonScripts rewrites npx-using scripts for bun', async () => {
58
+ const templatePath = getTemplatePath();
59
+ if (!(await fs.pathExists(templatePath))) {
60
+ console.warn('Skipping E2E: template not found (run npm run build first)');
61
+ return;
62
+ }
63
+ const { copyTemplate } = await import('./copy-template.js');
64
+ await copyTemplate(destDir);
65
+ await patchPackageJsonScripts(destDir, 'bun');
66
+ const pkgAfter = await fs.readJson(path.join(destDir, 'package.json'));
67
+ expect(pkgAfter.scripts['setup-env']).toContain('bunx ');
68
+ expect(pkgAfter.scripts['sync-all']).toContain('bunx ');
69
+ expect(pkgAfter.scripts['install-playwright']).toContain('bunx ');
70
+ expect(pkgAfter.scripts['setup-env']).not.toContain('npx ');
71
+ });
72
+ });
73
+ //# sourceMappingURL=cli.e2e.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.e2e.test.js","sourceRoot":"","sources":["../src/cli.e2e.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EA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CAAC,CAAC;YAC3E,OAAO;QACT,CAAC;QAED,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAC5D,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;QAE5B,MAAM,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAE9C,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;QACvE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAClE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.test.d.ts","sourceRoot":"","sources":["../src/config.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,65 @@
1
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
2
+ import { getConfig } from './config.js';
3
+ describe('getConfig', () => {
4
+ const originalEnv = process.env;
5
+ beforeEach(() => {
6
+ process.env = { ...originalEnv };
7
+ delete process.env.CREATE_APPRAISE_REPO_URL;
8
+ delete process.env.CREATE_APPRAISE_BRANCH;
9
+ delete process.env.CREATE_APPRAISE_TEMPLATE_SUBPATH;
10
+ delete process.env.CREATE_APPRAISE_USE_BUNDLED;
11
+ });
12
+ afterEach(() => {
13
+ process.env = originalEnv;
14
+ });
15
+ it('returns default repo base, branch, template subpath, and useBundled false when no env set', () => {
16
+ const config = getConfig();
17
+ expect(config.repoBase).toContain('github.com');
18
+ expect(config.repoBase).toContain('appraisejs');
19
+ expect(config.branch).toBe('main');
20
+ expect(config.templateSubpath).toBe('templates/default');
21
+ expect(config.useBundled).toBe(false);
22
+ });
23
+ it('uses CREATE_APPRAISE_REPO_URL when set', () => {
24
+ process.env.CREATE_APPRAISE_REPO_URL = 'https://example.com/repo';
25
+ const config = getConfig();
26
+ expect(config.repoBase).toBe('https://example.com/repo');
27
+ });
28
+ it('normalizes repo base: trims, removes trailing slash and .git', () => {
29
+ process.env.CREATE_APPRAISE_REPO_URL = ' https://example.com/repo/.git/ ';
30
+ const config = getConfig();
31
+ expect(config.repoBase).toBe('https://example.com/repo');
32
+ });
33
+ it('uses CREATE_APPRAISE_BRANCH when set', () => {
34
+ process.env.CREATE_APPRAISE_BRANCH = 'dev';
35
+ const config = getConfig();
36
+ expect(config.branch).toBe('dev');
37
+ });
38
+ it('uses CREATE_APPRAISE_TEMPLATE_SUBPATH when set', () => {
39
+ process.env.CREATE_APPRAISE_TEMPLATE_SUBPATH = 'templates/custom';
40
+ const config = getConfig();
41
+ expect(config.templateSubpath).toBe('templates/custom');
42
+ });
43
+ it('sets useBundled true when CREATE_APPRAISE_USE_BUNDLED is 1', () => {
44
+ process.env.CREATE_APPRAISE_USE_BUNDLED = '1';
45
+ const config = getConfig();
46
+ expect(config.useBundled).toBe(true);
47
+ });
48
+ it('sets useBundled true when CREATE_APPRAISE_USE_BUNDLED is true', () => {
49
+ process.env.CREATE_APPRAISE_USE_BUNDLED = 'true';
50
+ const config = getConfig();
51
+ expect(config.useBundled).toBe(true);
52
+ });
53
+ it('sets useBundled true when CREATE_APPRAISE_USE_BUNDLED is yes', () => {
54
+ process.env.CREATE_APPRAISE_USE_BUNDLED = 'yes';
55
+ const config = getConfig();
56
+ expect(config.useBundled).toBe(true);
57
+ });
58
+ it('sets useBundled false when CREATE_APPRAISE_USE_BUNDLED is empty or 0', () => {
59
+ process.env.CREATE_APPRAISE_USE_BUNDLED = '';
60
+ expect(getConfig().useBundled).toBe(false);
61
+ process.env.CREATE_APPRAISE_USE_BUNDLED = '0';
62
+ expect(getConfig().useBundled).toBe(false);
63
+ });
64
+ });
65
+ //# sourceMappingURL=config.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.test.js","sourceRoot":"","sources":["../src/config.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;IAEhC,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,WAAW,EAAE,CAAC;QACjC,OAAO,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAC5C,OAAO,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;QAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;QACpD,OAAO,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,GAAG,GAAG,WAAW,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2FAA2F,EAAE,GAAG,EAAE;QACnG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC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template.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-template.test.d.ts","sourceRoot":"","sources":["../src/copy-template.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,71 @@
1
+ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
2
+ import path from 'path';
3
+ import fs from 'fs-extra';
4
+ import os from 'os';
5
+ import { copyTemplate, getTemplatePath } from './copy-template.js';
6
+ describe('copy-template', () => {
7
+ let tempDir;
8
+ let destDir;
9
+ beforeEach(async () => {
10
+ tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-test-'));
11
+ destDir = path.join(tempDir, 'output');
12
+ });
13
+ afterEach(async () => {
14
+ await fs.remove(tempDir).catch(() => { });
15
+ });
16
+ describe('getTemplatePath', () => {
17
+ it('returns a path ending with templates/default', () => {
18
+ const templatePath = getTemplatePath();
19
+ expect(templatePath).toMatch(/[\\/]templates[\\/]default$/);
20
+ });
21
+ });
22
+ describe('copyTemplate', () => {
23
+ it('copies template files and excludes node_modules, .env, and lockfiles', async () => {
24
+ const fixtureDir = path.join(tempDir, 'fixture');
25
+ await fs.ensureDir(path.join(fixtureDir, 'src', 'app'));
26
+ await fs.ensureDir(path.join(fixtureDir, 'node_modules', 'pkg'));
27
+ await fs.writeJson(path.join(fixtureDir, 'package.json'), { name: 'test' });
28
+ await fs.writeFile(path.join(fixtureDir, '.env'), 'SECRET=1');
29
+ await fs.writeFile(path.join(fixtureDir, 'package-lock.json'), '{}');
30
+ await fs.writeFile(path.join(fixtureDir, 'src', 'app', 'page.tsx'), 'export default function Page() {}');
31
+ const { getCollectedFilesForTest } = await import('./copy-template.js');
32
+ const files = getCollectedFilesForTest(fixtureDir);
33
+ expect(files).toContain('package.json');
34
+ expect(files.some((f) => f.includes('node_modules'))).toBe(false);
35
+ expect(files.some((f) => f.includes('.env'))).toBe(false);
36
+ expect(files.some((f) => f.includes('package-lock'))).toBe(false);
37
+ const srcFiles = files.filter((f) => f.includes('src'));
38
+ expect(srcFiles.length).toBeGreaterThan(0);
39
+ await copyTemplate(destDir, undefined, fixtureDir);
40
+ expect(await fs.pathExists(path.join(destDir, 'package.json'))).toBe(true);
41
+ expect(await fs.pathExists(path.join(destDir, 'src'))).toBe(true);
42
+ expect(await fs.pathExists(path.join(destDir, 'src', 'app', 'page.tsx'))).toBe(true);
43
+ const hasNodeModules = await fs.pathExists(path.join(destDir, 'node_modules'));
44
+ const hasEnv = await fs.pathExists(path.join(destDir, '.env'));
45
+ const hasLock = await fs.pathExists(path.join(destDir, 'package-lock.json'));
46
+ expect(hasNodeModules).toBe(false);
47
+ expect(hasEnv).toBe(false);
48
+ expect(hasLock).toBe(false);
49
+ });
50
+ it('copies package-lock.json when packageManager is npm', async () => {
51
+ const fixtureDir = path.join(tempDir, 'fixture');
52
+ await fs.ensureDir(path.join(fixtureDir, 'src'));
53
+ await fs.writeJson(path.join(fixtureDir, 'package.json'), { name: 'test' });
54
+ await fs.writeFile(path.join(fixtureDir, 'package-lock.json'), '{"lockfileVersion": 3}');
55
+ await fs.writeFile(path.join(fixtureDir, 'src', 'index.ts'), '// empty');
56
+ await copyTemplate(destDir, undefined, fixtureDir, 'npm');
57
+ expect(await fs.pathExists(path.join(destDir, 'package-lock.json'))).toBe(true);
58
+ expect(await fs.readFile(path.join(destDir, 'package-lock.json'), 'utf-8')).toBe('{"lockfileVersion": 3}');
59
+ });
60
+ it('does not copy package-lock.json when packageManager is not npm', async () => {
61
+ const fixtureDir = path.join(tempDir, 'fixture');
62
+ await fs.ensureDir(path.join(fixtureDir, 'src'));
63
+ await fs.writeJson(path.join(fixtureDir, 'package.json'), { name: 'test' });
64
+ await fs.writeFile(path.join(fixtureDir, 'package-lock.json'), '{}');
65
+ await fs.writeFile(path.join(fixtureDir, 'src', 'index.ts'), '// empty');
66
+ await copyTemplate(destDir, undefined, fixtureDir, 'yarn');
67
+ expect(await fs.pathExists(path.join(destDir, 'package-lock.json'))).toBe(false);
68
+ });
69
+ });
70
+ });
71
+ //#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AmB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAC9E,wBAAwB,CACzB,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gEAAgE,EAAE,KAAK,IAAI,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACjD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;YACjD,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YAC5E,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAAE,IAAI,CAAC,CAAC;YACrE,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;YAEzE,MAAM,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;YAE3D,MAAM,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=download-repo.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-repo.test.d.ts","sourceRoot":"","sources":["../src/download-repo.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { describe, it, expect, vi, afterEach } from 'vitest';
2
+ import { downloadRepo } from './download-repo.js';
3
+ describe('downloadRepo', () => {
4
+ const originalFetch = globalThis.fetch;
5
+ afterEach(() => {
6
+ vi.restoreAllMocks();
7
+ globalThis.fetch = originalFetch;
8
+ });
9
+ it('throws with message including both attempts and CREATE_APPRAISE_USE_BUNDLED when both tarball and clone fail', async () => {
10
+ globalThis.fetch = vi.fn().mockResolvedValue({ ok: false, status: 404, statusText: 'Not Found' });
11
+ await expect(downloadRepo('https://github.com/invalid/repo', 'main', 'templates/default')).rejects.toThrow(/CREATE_APPRAISE_USE_BUNDLED/);
12
+ }, 15000);
13
+ });
14
+ //# sourceMappingURL=download-repo.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-repo.test.js","sourceRoot":"","sources":["../src/download-repo.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC;IAEvC,SAAS,CAAC,GAAG,EAAE;QACb,EAAE,CAAC,eAAe,EAAE,CAAC;QACrB,UAAU,CAAC,KAAK,GAAG,aAAa,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8GAA8G,EAAE,KAAK,IAAI,EAAE;QAC5H,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC;QAElG,MAAM,MAAM,CACV,YAAY,CAAC,iCAAiC,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAC7E,CAAC,OAAO,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IACnD,CAAC,EAAE,KAAK,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=install.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.test.d.ts","sourceRoot":"","sources":["../src/install.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,119 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import os from 'os';
4
+ import { describe, it, expect } from 'vitest';
5
+ import { getInstallCommand, patchPackageJsonScripts } from './install.js';
6
+ const TEMPLATE_SCRIPTS = {
7
+ 'install-dependencies': 'npm install --legacy-peer-deps',
8
+ setup: 'npm run install-dependencies && npm run setup-env && npm run migrate-db && npm run install-playwright',
9
+ 'appraisejs:setup': 'npm run setup',
10
+ 'appraisejs:sync': 'npm run sync-all',
11
+ 'setup-env': 'npx tsx scripts/setup-env.ts',
12
+ 'migrate-db': 'npx prisma migrate dev',
13
+ 'install-playwright': 'npx playwright install && npx playwright install-deps',
14
+ 'sync-all': 'npx tsx scripts/sync-all.ts',
15
+ };
16
+ async function patchAndRead(dir, pm) {
17
+ await fs.writeJson(path.join(dir, 'package.json'), { name: 'appraisejs', scripts: { ...TEMPLATE_SCRIPTS } });
18
+ await patchPackageJsonScripts(dir, pm);
19
+ return fs.readJson(path.join(dir, 'package.json'));
20
+ }
21
+ describe('patchPackageJsonScripts', () => {
22
+ it('rewrites package.json scripts to use pnpm instead of npm', async () => {
23
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-patch-'));
24
+ try {
25
+ const pkg = await patchAndRead(dir, 'pnpm');
26
+ expect(pkg.scripts['install-dependencies']).toBe('pnpm install');
27
+ expect(pkg.scripts.setup).toBe('pnpm run install-dependencies && pnpm run setup-env && pnpm run migrate-db && pnpm run install-playwright');
28
+ expect(pkg.scripts['appraisejs:setup']).toBe('pnpm run setup');
29
+ expect(pkg.scripts['appraisejs:sync']).toBe('pnpm run sync-all');
30
+ expect(pkg.scripts['setup-env']).toBe('pnpm exec tsx scripts/setup-env.ts');
31
+ expect(pkg.scripts['migrate-db']).toBe('pnpm exec prisma migrate dev');
32
+ expect(pkg.scripts['install-playwright']).toBe('pnpm exec playwright install && pnpm exec playwright install-deps');
33
+ expect(pkg.scripts['sync-all']).toBe('pnpm exec tsx scripts/sync-all.ts');
34
+ expect(pkg.scripts['setup-env']).not.toContain('npx ');
35
+ }
36
+ finally {
37
+ await fs.remove(dir).catch(() => { });
38
+ }
39
+ });
40
+ it('rewrites scripts for npm (keeps legacy-peer-deps and npx)', async () => {
41
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-patch-npm-'));
42
+ try {
43
+ const pkg = await patchAndRead(dir, 'npm');
44
+ expect(pkg.scripts['install-dependencies']).toBe('npm install --legacy-peer-deps');
45
+ expect(pkg.scripts.setup).toContain('npm run install-dependencies');
46
+ expect(pkg.scripts.setup).not.toContain('pnpm run');
47
+ expect(pkg.scripts['setup-env']).toContain('npx ');
48
+ expect(pkg.scripts['setup-env']).toBe('npx tsx scripts/setup-env.ts');
49
+ expect(pkg.scripts['sync-all']).toBe('npx tsx scripts/sync-all.ts');
50
+ }
51
+ finally {
52
+ await fs.remove(dir).catch(() => { });
53
+ }
54
+ });
55
+ it('rewrites scripts for yarn', async () => {
56
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-patch-yarn-'));
57
+ try {
58
+ const pkg = await patchAndRead(dir, 'yarn');
59
+ expect(pkg.scripts['install-dependencies']).toBe('yarn install');
60
+ expect(pkg.scripts.setup).toBe('yarn run install-dependencies && yarn run setup-env && yarn run migrate-db && yarn run install-playwright');
61
+ expect(pkg.scripts['appraisejs:setup']).toBe('yarn run setup');
62
+ expect(pkg.scripts['setup-env']).toBe('yarn run tsx scripts/setup-env.ts');
63
+ expect(pkg.scripts['install-playwright']).toBe('yarn run playwright install && yarn run playwright install-deps');
64
+ expect(pkg.scripts['sync-all']).not.toContain('npx ');
65
+ }
66
+ finally {
67
+ await fs.remove(dir).catch(() => { });
68
+ }
69
+ });
70
+ it('rewrites scripts for bun', async () => {
71
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-patch-bun-'));
72
+ try {
73
+ const pkg = await patchAndRead(dir, 'bun');
74
+ expect(pkg.scripts['install-dependencies']).toBe('bun install');
75
+ expect(pkg.scripts.setup).toContain('bun run install-dependencies');
76
+ expect(pkg.scripts['appraisejs:sync']).toBe('bun run sync-all');
77
+ expect(pkg.scripts['setup-env']).toBe('bunx tsx scripts/setup-env.ts');
78
+ expect(pkg.scripts['migrate-db']).toBe('bunx prisma migrate dev');
79
+ expect(pkg.scripts['sync-all']).toContain('bunx ');
80
+ expect(pkg.scripts['sync-all']).not.toContain('npx ');
81
+ }
82
+ finally {
83
+ await fs.remove(dir).catch(() => { });
84
+ }
85
+ });
86
+ it('no-ops when package.json does not exist', async () => {
87
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'create-appraisejs-noop-'));
88
+ try {
89
+ await patchPackageJsonScripts(dir, 'yarn');
90
+ await expect(fs.pathExists(path.join(dir, 'package.json'))).resolves.toBe(false);
91
+ }
92
+ finally {
93
+ await fs.remove(dir).catch(() => { });
94
+ }
95
+ });
96
+ });
97
+ describe('getInstallCommand', () => {
98
+ it('returns npm run setup for npm', () => {
99
+ const result = getInstallCommand('npm');
100
+ expect(result).toEqual({ command: 'npm', args: ['run', 'setup'] });
101
+ expect(`${result.command} ${result.args.join(' ')}`).toBe('npm run setup');
102
+ });
103
+ it('returns pnpm run setup for pnpm', () => {
104
+ const result = getInstallCommand('pnpm');
105
+ expect(result).toEqual({ command: 'pnpm', args: ['run', 'setup'] });
106
+ expect(`${result.command} ${result.args.join(' ')}`).toBe('pnpm run setup');
107
+ });
108
+ it('returns yarn run setup for yarn', () => {
109
+ const result = getInstallCommand('yarn');
110
+ expect(result).toEqual({ command: 'yarn', args: ['run', 'setup'] });
111
+ expect(`${result.command} ${result.args.join(' ')}`).toBe('yarn run setup');
112
+ });
113
+ it('returns bun run setup for bun', () => {
114
+ const result = getInstallCommand('bun');
115
+ expect(result).toEqual({ command: 'bun', args: ['run', 'setup'] });
116
+ expect(`${result.command} ${result.args.join(' ')}`).toBe('bun run setup');
117
+ });
118
+ });
119
+ //# sourceMappingURL=install.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.test.js","sourceRoot":"","sources":["../src/install.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,gBAAgB,GAAG;IACvB,sBAAsB,EAAE,gCAAgC;IACxD,KAAK,EACH,uGAAuG;IACzG,kBAAkB,EAAE,eAAe;IACnC,iBAAiB,EAAE,kBAAkB;IACrC,WAAW,EAAE,8BAA8B;IAC3C,YAAY,EAAE,wBAAwB;IACtC,oBAAoB,EAAE,uDAAuD;IAC7E,UAAU,EAAE,6BAA6B;CAC1C,CAAC;AAEF,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,EAAmC;IAC1E,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,GAAG,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC7G,MAAM,uBAAuB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACvC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,0DAA0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,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QACpE,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;QACnE,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=prompts.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.test.d.ts","sourceRoot":"","sources":["../src/prompts.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
2
+ import path from 'path';
3
+ import fs from 'fs';
4
+ import os from 'os';
5
+ import { runPrompts } from './prompts.js';
6
+ vi.mock('@inquirer/prompts', () => ({
7
+ input: vi.fn(),
8
+ select: vi.fn(),
9
+ confirm: vi.fn(),
10
+ }));
11
+ async function getMocks() {
12
+ const { input, select, confirm } = await import('@inquirer/prompts');
13
+ return { input: input, select: select, confirm: confirm };
14
+ }
15
+ describe('runPrompts', () => {
16
+ let cwd;
17
+ let tempDir;
18
+ beforeEach(() => {
19
+ cwd = process.cwd();
20
+ tempDir = path.join(os.tmpdir(), `create-appraisejs-prompts-${Date.now()}`);
21
+ });
22
+ afterEach(async () => {
23
+ if (tempDir && fs.existsSync(tempDir)) {
24
+ fs.rmSync(tempDir, { recursive: true, force: true });
25
+ }
26
+ vi.clearAllMocks();
27
+ });
28
+ it('returns directory, packageManager, and runInstall from mocked prompts', async () => {
29
+ fs.mkdirSync(tempDir, { recursive: true });
30
+ const { input, select, confirm } = await getMocks();
31
+ input.mockResolvedValue(tempDir);
32
+ select.mockResolvedValue('pnpm');
33
+ confirm.mockResolvedValue(false);
34
+ const result = await runPrompts(cwd);
35
+ expect(result.directory).toBe(path.resolve(cwd, tempDir));
36
+ expect(result.packageManager).toBe('pnpm');
37
+ expect(result.runInstall).toBe(false);
38
+ });
39
+ it('throws when target directory exists and is non-empty', async () => {
40
+ fs.mkdirSync(tempDir, { recursive: true });
41
+ fs.writeFileSync(path.join(tempDir, 'file.txt'), 'x');
42
+ const { input } = await getMocks();
43
+ input.mockResolvedValue(tempDir);
44
+ await expect(runPrompts(cwd)).rejects.toThrow(/Directory must be empty/);
45
+ });
46
+ it('accepts when target directory does not exist', async () => {
47
+ const newPath = path.join(tempDir, 'new-app');
48
+ const { input, select, confirm } = await getMocks();
49
+ input.mockResolvedValue(newPath);
50
+ select.mockResolvedValue('npm');
51
+ confirm.mockResolvedValue(true);
52
+ const result = await runPrompts(cwd);
53
+ expect(result.directory).toBe(path.resolve(cwd, newPath));
54
+ expect(result.packageManager).toBe('npm');
55
+ expect(result.runInstall).toBe(true);
56
+ });
57
+ });
58
+ //# sourceMappingURL=prompts.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.test.js","sourceRoot":"","sources":["../src/prompts.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MA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AC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC9C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,EAAE,CAAC;QACpD,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAEhC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,CAAC;QAErC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;QAC1D,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-appraisejs",
3
- "version": "0.3.0",
3
+ "version": "0.3.1-alpha.0",
4
4
  "description": "Scaffold a new AppraiseJS app in your directory",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Hasnat Jamil",
@@ -66,15 +66,12 @@
66
66
  "@types/cli-progress": "^3.11.6",
67
67
  "@types/cross-spawn": "^6.0.6",
68
68
  "@types/fs-extra": "^11.0.4",
69
- "@types/node": "^20.17.16",
69
+ "@types/node": "^20.19.0",
70
70
  "tsx": "^4.20.4",
71
71
  "typescript": "^5.7.3",
72
- "vitest": "^2.1.8"
72
+ "vitest": "^4.1.4"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=18"
76
- },
77
- "overrides": {
78
- "esbuild": "^0.25.0"
79
76
  }
80
77
  }
@@ -1,2 +1,2 @@
1
- # Database configuration for local development
2
- DATABASE_URL="file:./dev.db"
1
+ # Database configuration for local development
2
+ DATABASE_URL="file:./dev.db"
@@ -1,24 +1,24 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": true,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "tailwind.config.ts",
8
- "css": "src/app/globals.css",
9
- "baseColor": "slate",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "iconLibrary": "lucide",
14
- "aliases": {
15
- "components": "@/components",
16
- "utils": "@/lib/utils",
17
- "ui": "@/components/ui",
18
- "lib": "@/lib",
19
- "hooks": "@/hooks"
20
- },
21
- "registries": {
22
- "@kokonutui": "https://kokonutui.com/r/{name}.json"
23
- }
24
- }
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "tailwind.config.ts",
8
+ "css": "src/app/globals.css",
9
+ "baseColor": "slate",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {
22
+ "@kokonutui": "https://kokonutui.com/r/{name}.json"
23
+ }
24
+ }
@@ -1,16 +1,16 @@
1
- // eslint-disable-next-line import/no-anonymous-default-export
2
- export default {
3
- paths: ['automation/features/**/*.feature'],
4
- import: [
5
- 'packages/cucumber-runtime/src/parameter-types.ts',
6
- 'automation/steps/**/*.ts',
7
- 'packages/cucumber-runtime/src/hooks.ts',
8
- 'packages/cucumber-runtime/src/world.ts',
9
- ],
10
- loader: ['ts-node/esm'],
11
- format: [
12
- 'pretty',
13
- process.env.REPORT_FORMAT ?? `json:${process.env.REPORT_PATH ?? 'automation/reports/cucumber.json'}`,
14
- ],
15
- publishQuiet: true,
16
- }
1
+ // eslint-disable-next-line import/no-anonymous-default-export
2
+ export default {
3
+ paths: ['automation/features/**/*.feature'],
4
+ import: [
5
+ 'packages/cucumber-runtime/src/parameter-types.ts',
6
+ 'automation/steps/**/*.ts',
7
+ 'packages/cucumber-runtime/src/hooks.ts',
8
+ 'packages/cucumber-runtime/src/world.ts',
9
+ ],
10
+ loader: ['ts-node/esm'],
11
+ format: [
12
+ 'pretty',
13
+ process.env.REPORT_FORMAT ?? `json:${process.env.REPORT_PATH ?? 'automation/reports/cucumber.json'}`,
14
+ ],
15
+ publishQuiet: true,
16
+ }