testeiya 0.2.1 → 0.3.10

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 (402) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +284 -171
  3. package/dist/prompt/context.js +79 -0
  4. package/dist/prompt/context.js.map +1 -0
  5. package/dist/prompt/index.js +60 -0
  6. package/dist/prompt/index.js.map +1 -0
  7. package/dist/prompt/print.js +30 -0
  8. package/dist/prompt/print.js.map +1 -0
  9. package/dist/prompt/project-info.js +2 -0
  10. package/dist/prompt/project-info.js.map +1 -0
  11. package/{src/prompt/system-prompt.ts → dist/prompt/system-prompt.js} +38 -25
  12. package/dist/prompt/system-prompt.js.map +1 -0
  13. package/dist/prompt/testomatio.js +264 -0
  14. package/dist/prompt/testomatio.js.map +1 -0
  15. package/dist/prompt/tools.js +57 -0
  16. package/dist/prompt/tools.js.map +1 -0
  17. package/dist/prompt/vocab.js +8 -0
  18. package/dist/prompt/vocab.js.map +1 -0
  19. package/dist/src/args.js +172 -0
  20. package/dist/src/args.js.map +1 -0
  21. package/dist/src/cli.js +97 -0
  22. package/dist/src/cli.js.map +1 -0
  23. package/dist/src/doctor.js +186 -0
  24. package/dist/src/doctor.js.map +1 -0
  25. package/dist/src/env.js +93 -0
  26. package/dist/src/env.js.map +1 -0
  27. package/dist/src/mcp-extension.js +9 -0
  28. package/dist/src/mcp-extension.js.map +1 -0
  29. package/dist/src/mcp.js +139 -0
  30. package/dist/src/mcp.js.map +1 -0
  31. package/dist/src/model.js +71 -0
  32. package/dist/src/model.js.map +1 -0
  33. package/dist/src/models.js +38 -0
  34. package/dist/src/models.js.map +1 -0
  35. package/dist/src/output.js +185 -0
  36. package/dist/src/output.js.map +1 -0
  37. package/dist/src/result.js +41 -0
  38. package/dist/src/result.js.map +1 -0
  39. package/dist/src/run.js +291 -0
  40. package/dist/src/run.js.map +1 -0
  41. package/dist/src/session.js +92 -0
  42. package/dist/src/session.js.map +1 -0
  43. package/dist/src/sessions.js +61 -0
  44. package/dist/src/sessions.js.map +1 -0
  45. package/dist/vendor/mcp.js +14801 -0
  46. package/mcp-tools.json +2967 -0
  47. package/package.json +34 -43
  48. package/prompt/context.ts +101 -0
  49. package/prompt/index.ts +102 -0
  50. package/prompt/print.ts +32 -0
  51. package/prompt/project-info.ts +30 -0
  52. package/prompt/system-prompt.ts +187 -0
  53. package/{src/prompt → prompt}/testomatio.ts +120 -9
  54. package/prompt/tools.ts +57 -0
  55. package/prompt/vocab.ts +7 -0
  56. package/skills/codeceptjs/ci-fix-tests/SKILL.md +7 -8
  57. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +47 -64
  58. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +56 -47
  59. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +144 -106
  60. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +50 -57
  61. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +88 -196
  62. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +4 -5
  63. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +25 -36
  64. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +23 -36
  65. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +23 -36
  66. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +23 -35
  67. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +50 -53
  68. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +87 -191
  69. package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/SKILL.md +1 -1
  70. package/{skills.lock.json → skills/skills.lock.json} +43 -36
  71. package/skills/skills.yaml +34 -0
  72. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +49 -61
  73. package/skills/testomatio/explorbot/explorbot-fundamentals/references/no-install.md +36 -0
  74. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +20 -7
  75. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +41 -289
  76. package/skills/testomatio/qa-process/qa-explain-behavior/SKILL.md +111 -0
  77. package/skills/testomatio/qa-process/qa-explain-behavior/references/answer-shapes.md +116 -0
  78. package/skills/testomatio/qa-process/qa-explain-behavior/references/examples.md +157 -0
  79. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/SKILL.md +91 -0
  80. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/references/output-format.md +71 -0
  81. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +227 -0
  82. package/skills/testomatio/test-automation/qa-data-seeder/SKILL.md +83 -0
  83. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +5 -3
  84. package/skills/testomatio/test-automation/setup-change-aware-pr-testing/SKILL.md +190 -0
  85. package/skills/testomatio/test-automation/setup-ci-automation/SKILL.md +76 -0
  86. package/skills/testomatio/test-management/qa-split-testing-levels-pyramid/SKILL.md +55 -0
  87. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/SKILL.md +220 -0
  88. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/references/qa-sprint-report.md +126 -0
  89. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +1 -1
  90. package/skills/testomatio/test-management/qa-thinking/SKILL.md +25 -25
  91. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +14 -1
  92. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +8 -0
  93. package/assets/testeiya-logo-dark.svg +0 -16
  94. package/assets/testeiya-logo.svg +0 -15
  95. package/models.catalog.json +0 -6963
  96. package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
  97. package/skills/playwright-best-practices-skill/README.md +0 -147
  98. package/skills/testeiya/README.md +0 -29
  99. package/skills/testeiya/answer-formatting/SKILL.md +0 -30
  100. package/skills/testeiya/check-cucumber/SKILL.md +0 -200
  101. package/skills/testeiya/check-tests/SKILL.md +0 -260
  102. package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
  103. package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
  104. package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
  105. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
  106. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
  107. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
  108. package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
  109. package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
  110. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
  111. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
  112. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
  113. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
  114. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
  115. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
  116. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
  117. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
  118. package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
  119. package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
  120. package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
  121. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
  122. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
  123. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
  124. package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
  125. package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
  126. package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
  127. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
  128. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
  129. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
  130. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
  131. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
  132. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
  133. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
  134. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
  135. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
  136. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
  137. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
  138. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
  139. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
  140. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
  141. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
  142. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
  143. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
  144. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
  145. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
  146. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
  147. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
  148. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
  149. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
  150. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
  151. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
  152. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
  153. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
  154. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
  155. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
  156. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
  157. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
  158. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
  159. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
  160. package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
  161. package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
  162. package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
  163. package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
  164. package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
  165. package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
  166. package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
  167. package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
  168. package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
  169. package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
  170. package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
  171. package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
  172. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
  173. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
  174. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
  175. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
  176. package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
  177. package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
  178. package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
  179. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
  180. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
  181. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
  182. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
  183. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
  184. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
  185. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
  186. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
  187. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
  188. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
  189. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
  190. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
  191. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
  192. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
  193. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
  194. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
  195. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
  196. package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
  197. package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
  198. package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
  199. package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
  200. package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
  201. package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
  202. package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
  203. package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
  204. package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
  205. package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
  206. package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
  207. package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
  208. package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
  209. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
  210. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
  211. package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
  212. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
  213. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
  214. package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
  215. package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
  216. package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
  217. package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
  218. package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
  219. package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
  220. package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
  221. package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
  222. package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
  223. package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
  224. package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
  225. package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
  226. package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
  227. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
  228. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
  229. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
  230. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
  231. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
  232. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
  233. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
  234. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
  235. package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
  236. package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
  237. package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
  238. package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
  239. package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
  240. package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
  241. package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
  242. package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
  243. package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
  244. package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
  245. package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
  246. package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
  247. package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
  248. package/skills.yaml +0 -21
  249. package/src/ai-debug.ts +0 -188
  250. package/src/api/agent-get.ts +0 -22
  251. package/src/api/agent-start.ts +0 -384
  252. package/src/api/client-log.ts +0 -29
  253. package/src/api/context.ts +0 -332
  254. package/src/api/debug-layout.ts +0 -47
  255. package/src/api/debug-report.ts +0 -29
  256. package/src/api/debug-snapshot.ts +0 -30
  257. package/src/api/debug-stream.ts +0 -52
  258. package/src/api/files-delete.ts +0 -184
  259. package/src/api/files-read.ts +0 -41
  260. package/src/api/files-rename.ts +0 -99
  261. package/src/api/files-tree.ts +0 -292
  262. package/src/api/files-write.ts +0 -41
  263. package/src/api/mcp.ts +0 -603
  264. package/src/api/memory.ts +0 -69
  265. package/src/api/open-external.ts +0 -39
  266. package/src/api/playwright-cli.ts +0 -606
  267. package/src/api/providers.ts +0 -457
  268. package/src/api/read-env-token.ts +0 -33
  269. package/src/api/sessions.ts +0 -79
  270. package/src/api/settings.ts +0 -120
  271. package/src/api/skills.ts +0 -58
  272. package/src/api/testomatio-attachment.ts +0 -89
  273. package/src/api/testomatio-auth.ts +0 -284
  274. package/src/api/testomatio-proxy.ts +0 -197
  275. package/src/api/testomatio-run-stats.ts +0 -81
  276. package/src/api/testomatio-target.ts +0 -225
  277. package/src/api/testomatio-transcription.ts +0 -82
  278. package/src/api/workspace-search.ts +0 -96
  279. package/src/api/workspace-sync.ts +0 -151
  280. package/src/api/workspace.ts +0 -165
  281. package/src/app-server.ts +0 -556
  282. package/src/bridge.ts +0 -251
  283. package/src/check-tests.ts +0 -156
  284. package/src/cli.ts +0 -17
  285. package/src/commands.ts +0 -244
  286. package/src/config.ts +0 -183
  287. package/src/connection.ts +0 -658
  288. package/src/context-store.ts +0 -265
  289. package/src/debug-bus.ts +0 -405
  290. package/src/extensions/tool-gate.ts +0 -220
  291. package/src/extensions/webui/ask-channel.ts +0 -52
  292. package/src/extensions/webui/index.ts +0 -184
  293. package/src/extensions/webui/tools/ask-question.ts +0 -88
  294. package/src/extensions/webui/tools/query-result.ts +0 -79
  295. package/src/extensions/webui/tools/render-chart.ts +0 -53
  296. package/src/extensions/webui/tools/render-item.ts +0 -61
  297. package/src/extensions/webui/tools/render-list.ts +0 -170
  298. package/src/extensions/webui/tools/render-result.ts +0 -85
  299. package/src/extensions/webui/tools/render-tree.ts +0 -71
  300. package/src/extensions/webui/tools/ui-widget.ts +0 -54
  301. package/src/extensions/webui/tools/widget-result.ts +0 -13
  302. package/src/extensions/webui/widget-channel.ts +0 -50
  303. package/src/file-log.ts +0 -196
  304. package/src/git-tracked.ts +0 -68
  305. package/src/gitignore.ts +0 -53
  306. package/src/json-store.ts +0 -43
  307. package/src/load-env.ts +0 -70
  308. package/src/loader-style.ts +0 -96
  309. package/src/main.ts +0 -140
  310. package/src/mcp-catalog.ts +0 -96
  311. package/src/models-catalog.ts +0 -72
  312. package/src/permissions.ts +0 -120
  313. package/src/project-dir.ts +0 -189
  314. package/src/project-info.ts +0 -108
  315. package/src/prompt/app-ui.ts +0 -59
  316. package/src/prompt/browser.ts +0 -27
  317. package/src/prompt/index.ts +0 -62
  318. package/src/prompt/tools.ts +0 -27
  319. package/src/server-info.ts +0 -62
  320. package/src/session-factory.ts +0 -442
  321. package/src/session-store.ts +0 -115
  322. package/src/shell-env.ts +0 -45
  323. package/src/skills.ts +0 -163
  324. package/src/sync-snapshot.ts +0 -140
  325. package/src/telemetry.ts +0 -239
  326. package/src/testomatio-auth.ts +0 -299
  327. package/src/testomatio.ts +0 -98
  328. package/src/theme.ts +0 -30
  329. package/src/user-env.ts +0 -94
  330. package/src/welcome.ts +0 -194
  331. package/src/workspace/safe-path.ts +0 -85
  332. package/src/workspace/test-md.ts +0 -70
  333. package/src/workspace-model.ts +0 -440
  334. package/testeiya.config.json +0 -14
  335. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication-flows.md +0 -0
  336. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication.md +0 -0
  337. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/clock-mocking.md +0 -0
  338. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/mobile-testing.md +0 -0
  339. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-context.md +0 -0
  340. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-user.md +0 -0
  341. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/network-advanced.md +0 -0
  342. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/third-party.md +0 -0
  343. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/pom-vs-fixtures.md +0 -0
  344. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/test-architecture.md +0 -0
  345. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/when-to-mock.md +0 -0
  346. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/browser-apis.md +0 -0
  347. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/iframes.md +0 -0
  348. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/service-workers.md +0 -0
  349. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/websockets.md +0 -0
  350. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/annotations.md +0 -0
  351. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/assertions-waiting.md +0 -0
  352. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/configuration.md +0 -0
  353. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/fixtures-hooks.md +0 -0
  354. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/global-setup.md +0 -0
  355. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/locators.md +0 -0
  356. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/page-object-model.md +0 -0
  357. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/projects-dependencies.md +0 -0
  358. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-data.md +0 -0
  359. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-suite-structure.md +0 -0
  360. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-tags.md +0 -0
  361. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/console-errors.md +0 -0
  362. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/debugging.md +0 -0
  363. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/error-testing.md +0 -0
  364. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/flaky-tests.md +0 -0
  365. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/angular.md +0 -0
  366. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/nextjs.md +0 -0
  367. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/react.md +0 -0
  368. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/vue.md +0 -0
  369. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/ci-cd.md +0 -0
  370. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/docker.md +0 -0
  371. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/github-actions.md +0 -0
  372. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/gitlab.md +0 -0
  373. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/other-providers.md +0 -0
  374. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/parallel-sharding.md +0 -0
  375. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/performance.md +0 -0
  376. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/reporting.md +0 -0
  377. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/test-coverage.md +0 -0
  378. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/accessibility.md +0 -0
  379. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/api-testing.md +0 -0
  380. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/browser-extensions.md +0 -0
  381. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/canvas-webgl.md +0 -0
  382. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/component-testing.md +0 -0
  383. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/drag-drop.md +0 -0
  384. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/electron.md +0 -0
  385. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-operations.md +0 -0
  386. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-upload-download.md +0 -0
  387. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/forms-validation.md +0 -0
  388. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/graphql-testing.md +0 -0
  389. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/i18n.md +0 -0
  390. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/performance-testing.md +0 -0
  391. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/security-testing.md +0 -0
  392. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/visual-regression.md +0 -0
  393. /package/skills/{playwright-cli → playwright/playwright-cli}/SKILL.md +0 -0
  394. /package/skills/{playwright-cli → playwright/playwright-cli}/references/element-attributes.md +0 -0
  395. /package/skills/{playwright-cli → playwright/playwright-cli}/references/playwright-tests.md +0 -0
  396. /package/skills/{playwright-cli → playwright/playwright-cli}/references/request-mocking.md +0 -0
  397. /package/skills/{playwright-cli → playwright/playwright-cli}/references/running-code.md +0 -0
  398. /package/skills/{playwright-cli → playwright/playwright-cli}/references/session-management.md +0 -0
  399. /package/skills/{playwright-cli → playwright/playwright-cli}/references/storage-state.md +0 -0
  400. /package/skills/{playwright-cli → playwright/playwright-cli}/references/test-generation.md +0 -0
  401. /package/skills/{playwright-cli → playwright/playwright-cli}/references/tracing.md +0 -0
  402. /package/skills/{playwright-cli → playwright/playwright-cli}/references/video-recording.md +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migrate-cypress-to-codeceptjs
3
- description: "Port a Cypress test suite to CodeceptJS 4. Trigger when the project contains `cypress.config.{js,ts,mjs}`, a `cypress/` directory (`cypress/e2e/**/*.cy.{js,ts}`, `cypress/support/{commands,e2e}.{js,ts}`, `cypress/fixtures/`, `cypress/plugins/`, `cypress/component/`), `cypress` in `devDependencies`, or test code that calls `cy.*` (`cy.visit`, `cy.get`, `cy.contains`, `cy.session`, `cy.intercept`, `cy.request`, `cy.task`, `cy.fixture`, `cy.origin`, `cy.mount`), `Cypress.Commands.add(...)`, or `Cypress.env(...)`. Walks the port end-to-end: inventory shared logic (custom commands, ad-hoc page-object modules, shared selectors, fixtures, hooks), install CodeceptJS with the Playwright helper alongside Cypress, port the config, split `Cypress.Commands.add` into two custom helpers — `WebExtra` for browser-driven commands (Playwright `page` / `browserContext`) and `ApiExtras` for HTTP commands (REST / GraphQL helper, never `browserContext.request.*`) — port page-object-style modules to real page objects without inventing wrapper or assertion methods, convert spec files (handing off to `writing-codeceptjs-tests`), replace `cy.session` with the `auth` plugin, swap `cy.fixture` / `cy.request` / `cy.task` / `cy.intercept` for ES imports / REST helper / `ApiExtras` / `I.mockRoute`, then decommission Cypress."
3
+ description: "Port a Cypress test suite to CodeceptJS 4. Trigger when the project contains `cypress.config.{js,ts,mjs}`, a `cypress/` directory (`cypress/e2e/`, `cypress/support/{commands,e2e}.*`, `cypress/fixtures/`), `cypress` in `devDependencies`, or test code calling `cy.*` (`cy.visit`, `cy.get`, `cy.contains`, `cy.session`, `cy.intercept`, `cy.request`, `cy.task`, `cy.fixture`, `cy.origin`, `cy.mount`), `Cypress.Commands.add(...)`, or `Cypress.env(...)`."
4
4
  ---
5
5
 
6
6
  # Migrate Cypress → CodeceptJS 4
@@ -11,7 +11,7 @@ Cypress and CodeceptJS share a goal — browser end-to-end testing — but diffe
11
11
  2. **Helpers, not a bundled browser.** `I.*` dispatches to a configured helper. Cypress is single-browser by design; CodeceptJS lets you pick **Playwright** (recommended for Cypress migrators — Chromium parity plus cross-browser), Puppeteer, or WebDriver, and the test code stays the same.
12
12
  3. **First-class abstractions.** Page objects, multi-user `session(...)`, the `auth` plugin, and custom helpers are built in. Cypress projects accumulate ad-hoc versions of these; the migration consolidates them onto the framework's idioms.
13
13
 
14
- Authoritative references: `node_modules/codeceptjs/docs/basics.md`, `locators.md`, `playwright.md`, `custom-helpers.md`, `pageobjects.md`.
14
+ Authoritative reference: `node_modules/codeceptjs/docs/` (basics, locators, playwright, custom-helpers, pageobjects).
15
15
 
16
16
  ## When to trigger
17
17
 
@@ -211,32 +211,30 @@ for (const row of await I.grabWebElements('.row')) {
211
211
  }
212
212
  ```
213
213
 
214
- **Dry-run as you go.** After each batch of converted specs, run:
214
+ **Per batch**: `npx codeceptjs dry-run --steps -c <config>` loads every Scenario, resolves every `I.*` call, no browser. Surfaces typos, missing imports, page objects not under `include`, and nonexistent verbs in seconds. Fix before anything real.
215
215
 
216
- ```bash
217
- npx codeceptjs dry-run --steps -c <config>
218
- ```
219
-
220
- It loads every scenario, resolves every `I.*` call against the configured helpers, and prints the step list — all without launching a browser. Typos, missing imports, page objects not registered under `include`, and `I.*` verbs that don't exist on `WebExtra` / `ApiExtras` all surface here in seconds. Fix anything that fails before running a real test.
216
+ Then run the batch: `npx codeceptjs run --steps -c <config>`.
221
217
 
222
- **Then run the whole batch for real.** Dry-run proves specs parse and resolve not that they pass. As soon as a batch is dry-run clean, run it against the browser:
218
+ - First real runs almost always fail locator drift, timing the source framework hid behind its own retry, auth/session differences, data assumptions. **Expected; fixing it is part of the migration.**
219
+ - Every failure → invoke `debugging-codeceptjs-tests` and fix on the fly (breakpoint, live-page inspection, verified fix). No blind rewrites, no `retry` masking.
220
+ - A batch is done when it runs green, not when it dry-runs clean.
223
221
 
224
- ```bash
225
- npx codeceptjs run --steps -c <config>
226
- ```
222
+ ### 6. Locators
227
223
 
228
- First real runs after a migration almost always have failures locator drift, timing the source framework hid behind its own retry, auth/session differences, data assumptions. **This is expected; fixing it is part of the migration, not a follow-up task.** When a test fails, **invoke the `debugging-codeceptjs-tests` skill and fix it on the fly** — it breakpoints the failing step, inspects the live page via MCP, finds the working locator/wait, and commits the verified fix. Do not bulk-rewrite specs blind, and do not mask failures with `retry`. Drive every failure to a real fix before starting the next batch. A batch is "done" when it runs green, not when it dry-runs clean.
224
+ **Scope every locator with a context.** The last argument of every action narrows the lookup to a region `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`, `I.click({ role: 'button', name: 'Delete' }, '.modal')`. A short semantic or ARIA locator plus a context beats one long unscoped locator: it reads like the page, disambiguates duplicate labels without growing, and survives markup churn. Apply this to every row of the tables below the source framework's chain usually splits cleanly into *region* + *what the user sees*.
229
225
 
230
- ### 6. Locators
226
+ `cy.get(sel).within(() => ...)` and `cy.get(parent).find(child)` both collapse onto the context argument — that is where a Cypress chain's parent selector belongs.
231
227
 
232
- CodeceptJS priority — pick the highest that fits:
228
+ CodeceptJS priority — pick the highest that fits, then add the context:
233
229
 
234
- 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save')`, `I.fillField('Email', 'u@t.com')`.
235
- 2. **ARIA roles** `I.click({ role: 'button', name: 'Sign In' })`.
236
- 3. **`locate()` builder** — `I.click(locate('button').withText('Edit').inside('tr').withText('Acme')))`.
237
- 4. **CSS / XPath** — fallback only.
230
+ 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`. Replaces most `cy.contains(...)` calls.
231
+ A plain string already matches `aria-label`, so an icon-only control with `aria-label="Save"` is `I.click('Save', <context>)` — never `'aria-label=Save'` or `{ css: '[aria-label="Save"]' }`.
232
+ 2. **ARIA roles** — `I.click({ role: 'button', name: 'Sign In' }, '#login-form')`.
233
+ 3. **`$name` via the `customLocator` plugin** — Cypress users often default to `[data-cy=...]`. Keep those attributes, but enable the plugin so they read as `I.click('$submit', '.checkout')` instead of `{ css: '[data-cy=submit]' }`.
234
+ 4. **`locate()` builder** — `I.click(locate('button').withText('Edit').inside('tr').withText('Acme'))`; often better split as `I.click('Edit', locate('tr').withText('Acme'))`.
235
+ 5. **CSS / XPath** — fallback only.
238
236
 
239
- Cypress users often default to `[data-cy=...]`. Keep those attributes, but enable the `customLocator` plugin so they read as `$submit` instead of `{ css: '[data-cy=submit]' }`. Full guidance in **`writing-codeceptjs-tests`** § Locators.
237
+ Full guidance in **`writing-codeceptjs-tests`** § Locators.
240
238
 
241
239
  ### 7. Actions, assertions, grabs
242
240
 
@@ -288,19 +286,10 @@ Only after every spec is ported and CI is green: delete `cypress/`, `cypress.con
288
286
  5. Hand off to **`codeceptjs-run-analysis`** to inspect `output/trace_*/` artifacts (requires the `aiTrace` plugin enabled).
289
287
  6. `grep -r "cy\." cypress/` — empty before deleting `cypress/`.
290
288
 
291
- ## Pointers
292
-
293
- - `node_modules/codeceptjs/docs/basics.md` — `I.*` vocabulary, locators, assertions, the `await` rule
294
- - `node_modules/codeceptjs/docs/playwright.md` — recommended helper; `mockRoute` for `cy.intercept`
295
- - `node_modules/codeceptjs/docs/locators.md` — semantic / ARIA / `locate()`
296
- - `node_modules/codeceptjs/docs/custom-helpers.md` — `WebExtra` / `ApiExtras` patterns (extending `Helper`, reaching `this.helpers['Playwright']` / `this.helpers['REST']`)
297
- - `node_modules/codeceptjs/docs/api.md` REST / GraphQL configuration, `setSharedCookies()`, `defaultHeaders`, `JSONResponse` assertions, Zod schemas
298
- - `node_modules/codeceptjs/docs/assertions.md` — built-in `see*` assertions, `ExpectHelper`, `codeceptjs/assertions` factories (use these instead of `if (cond) throw new Error(...)`)
299
- - `node_modules/codeceptjs/docs/pageobjects.md` — porting Cypress page-object-style modules
300
- - `node_modules/codeceptjs/docs/data.md` — fixtures, data factories
301
- - `node_modules/codeceptjs/docs/sessions.md`, `auth.md` — multi-user + login reuse
302
- - `node_modules/codeceptjs/docs/effects.md` — `tryTo`, `retryTo`, `within`
303
- - `writing-codeceptjs-tests` — per-spec rewrite playbook (drive via MCP, learn locators, commit verified steps)
304
- - `debugging-codeceptjs-tests` — **use on every failing test from the first full run** (breakpoint, inspect live page via MCP, fix on the fly)
305
- - `codeceptjs-auth` — replace `cy.session()` and programmatic login
306
- - `codeceptjs-fundamentals` — run **after** migration to confirm the new setup is wired correctly
289
+ ## Related skills
290
+
291
+ - `writing-codeceptjs-tests` — per-spec rewrite playbook (MCP-driven, verified steps)
292
+ - `debugging-codeceptjs-tests` — use on every failing test from the first full run
293
+ - `codeceptjs-auth` — replaces `cy.session()` and programmatic login
294
+ - `codeceptjs-fundamentals` — run after migration to confirm wiring
295
+ - Reference docs: `node_modules/codeceptjs/docs/` (basics, playwright, locators, custom-helpers, api, assertions, pageobjects, data, sessions, effects)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migrate-protractor-to-codeceptjs
3
- description: "Port a Protractor test suite to CodeceptJS 4. Trigger when the project contains `protractor.conf.{js,ts}`, `protractor` in `devDependencies`, `*.e2e-spec.{js,ts}` files, an `e2e/` (or `protractor/`) directory with spec files, `@types/jasmine` / `jasmine-spec-reporter` in dependencies, imports from `protractor` (`browser`, `element`, `by`, `ExpectedConditions`, `ElementFinder`, `ElementArrayFinder`), or code calling `element(by.X(...))`, `element.all(...)`, `by.addLocator(...)`, `browser.get(...)`, `browser.executeScript(...)`, `browser.wait(EC.*)`, `browser.waitForAngular(...)`, `browser.ignoreSynchronization`, `browser.params.*`, or `browser.driver.*`. Walks the port end-to-end: inventory shared logic (page objects — Protractor projects almost always have them, custom locators via `by.addLocator`, shared helpers, `onPrepare` / `onComplete` hooks, Jasmine custom matchers), install CodeceptJS with the Playwright helper alongside Protractor, port the config, split shared helpers into `WebExtra` (browser-driven via Playwright `page`) and `ApiExtras` (HTTP via REST helper, never `browserContext.request.*`), port existing page objects to CodeceptJS page objects without inventing assertion/one-liner wrappers, replace `.then(...)` promise chains with `await` only on grabs, drop `browser.waitForAngular()` / `browser.ignoreSynchronization` (CodeceptJS auto-waits), translate `element(by.X(...))` to semantic strings / ARIA / `locate()` / `{ css }`, register `by.addLocator` strategies via the `customLocator` plugin or `WebExtra`, convert specs (handing off to `writing-codeceptjs-tests`), replace `browser.params` with `process.env`, swap Jasmine `expect()` matchers for `I.see*` / `ExpectHelper` / `codeceptjs/assertions`, then decommission Protractor."
3
+ description: "Port a Protractor test suite to CodeceptJS 4. Trigger when the project contains `protractor.conf.{js,ts}`, `protractor` in `devDependencies`, `*.e2e-spec.{js,ts}` files, an `e2e/` (or `protractor/`) directory with spec files, `@types/jasmine` / `jasmine-spec-reporter` in dependencies, imports from `protractor` (`browser`, `element`, `by`, `ExpectedConditions`), or code calling `element(by.X(...))`, `element.all(...)`, `by.addLocator(...)`, `browser.get(...)` / `browser.executeScript(...)` / `browser.wait(EC.*)` / `browser.waitForAngular(...)` / `browser.ignoreSynchronization` / `browser.params.*`."
4
4
  ---
5
5
 
6
6
  # Migrate Protractor → CodeceptJS 4
@@ -13,7 +13,7 @@ Three foundational differences to internalize:
13
13
  2. **Helpers, not `browser` / `driver`.** `I.*` dispatches to a configured helper. **Playwright recommended**; WebDriver is also available if the suite must keep running against a Selenium Grid — test code is identical either way.
14
14
  3. **Auto-wait, not Angular-wait.** Drop `browser.waitForAngular()` and `browser.ignoreSynchronization`. The Playwright and WebDriver helpers wait on DOM and element stability, which covers Angular's render cycle without a framework-specific hook.
15
15
 
16
- Authoritative references: `node_modules/codeceptjs/docs/basics.md`, `locators.md`, `playwright.md`, `webdriver.md`, `custom-helpers.md`, `pageobjects.md`.
16
+ Authoritative reference: `node_modules/codeceptjs/docs/` (basics, locators, playwright, webdriver, custom-helpers, pageobjects).
17
17
 
18
18
  ## When to trigger
19
19
 
@@ -215,30 +215,26 @@ for (const row of await I.grabWebElements('.row')) {
215
215
  }
216
216
  ```
217
217
 
218
- **Dry-run as you go.** After each batch of converted specs, run:
218
+ **Per batch**: `npx codeceptjs dry-run --steps -c <config>` loads every Scenario, resolves every `I.*` call, no browser. Surfaces typos, missing imports, page objects not under `include`, and nonexistent verbs in seconds. Fix before anything real.
219
219
 
220
- ```bash
221
- npx codeceptjs dry-run --steps -c <config>
222
- ```
223
-
224
- It loads every scenario, resolves every `I.*` call against the configured helpers, and prints the step list — all without launching a browser. Typos, missing imports, page objects not registered under `include`, and `I.*` verbs that don't exist on `WebExtra` / `ApiExtras` all surface here in seconds. Fix anything that fails before running a real test.
220
+ Then run the batch: `npx codeceptjs run --steps -c <config>`.
225
221
 
226
- **Then run the whole batch for real.** Dry-run proves specs parse and resolve not that they pass. As soon as a batch is dry-run clean, run it against the browser:
227
-
228
- ```bash
229
- npx codeceptjs run --steps -c <config>
230
- ```
231
-
232
- First real runs after a migration almost always have failures — locator drift, timing the source framework hid behind its own retry, auth/session differences, data assumptions. **This is expected; fixing it is part of the migration, not a follow-up task.** When a test fails, **invoke the `debugging-codeceptjs-tests` skill and fix it on the fly** — it breakpoints the failing step, inspects the live page via MCP, finds the working locator/wait, and commits the verified fix. Do not bulk-rewrite specs blind, and do not mask failures with `retry`. Drive every failure to a real fix before starting the next batch. A batch is "done" when it runs green, not when it dry-runs clean.
222
+ - First real runs almost always fail locator drift, timing the ControlFlow hid behind its own queueing, auth/session differences, data assumptions. **Expected; fixing it is part of the migration.**
223
+ - Every failure → invoke `debugging-codeceptjs-tests` and fix on the fly (breakpoint, live-page inspection, verified fix). No blind rewrites, no `retry` masking.
224
+ - A batch is done when it runs green, not when it dry-runs clean.
233
225
 
234
226
  ### 6. Locator preference
235
227
 
236
- CodeceptJS prioritypick the highest that fits:
228
+ **Scope every locator with a context.** The last argument of every action narrows the lookup to a region `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`, `I.click({ role: 'button', name: 'Delete' }, '.modal')`. A short semantic or ARIA locator plus a context beats one long unscoped locator: it reads like the page, disambiguates duplicate labels without growing, and survives markup churn. Apply this to every row of the tables below — the source framework's chain usually splits cleanly into *region* + *what the user sees*.
229
+
230
+ CodeceptJS priority — pick the highest that fits, then add the context:
237
231
 
238
- 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save')`, `I.fillField('Email', 'u@t.com')`. Covers Protractor's `by.linkText`, `by.buttonText`, `by.partialButtonText`, `by.partialLinkText` cleanly.
239
- 2. **ARIA roles** `I.click({ role: 'button', name: 'Sign In' })`. Strong default for Angular apps that ship Material / ARIA-correct components.
240
- 3. **`locate()` builder** — `I.click(locate('.row').withText('Acme').inside('table'))`. Direct equivalent of `by.cssContainingText` + element traversal chains.
241
- 4. **CSS / XPath / attribute objects** — `{ id: 'foo' }`, `{ name: 'email' }`, `{ css: '[ng-model="user.email"]' }`, `{ xpath: '//div[@id="x"]' }`. The fallback for Angular directive attributes.
232
+ 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`. Covers Protractor's `by.linkText`, `by.buttonText`, `by.partialButtonText`, `by.partialLinkText` cleanly.
233
+ A plain string already matches `aria-label`, so an icon-only control with `aria-label="Save"` is `I.click('Save', <context>)` never `'aria-label=Save'` or `{ css: '[aria-label="Save"]' }`.
234
+ 2. **ARIA roles** — `I.click({ role: 'button', name: 'Sign In' }, '#login-form')`. Strong default for Angular apps that ship Material / ARIA-correct components.
235
+ 3. **`$name` via the `customLocator` plugin** — when the app tags elements with `data-qa` / `data-test`; beats repeating the attribute selector at every call site.
236
+ 4. **`locate()` builder** — `I.click(locate('.row').withText('Acme').inside('table'))`. Direct equivalent of `by.cssContainingText` + element traversal chains — though `I.click('Edit', locate('tr').withText('Acme'))` is usually the better split.
237
+ 5. **CSS / XPath / attribute objects** — `{ id: 'foo' }`, `{ name: 'email' }`, `{ css: '[ng-model="user.email"]' }`, `{ xpath: '//div[@id="x"]' }`. The fallback for Angular directive attributes.
242
238
 
243
239
  | Protractor locator | CodeceptJS 4 |
244
240
  |---|---|
@@ -334,19 +330,10 @@ Only after every spec is ported and CI is green: delete `e2e/` (or whichever dir
334
330
  5. Hand off to **`codeceptjs-run-analysis`** to inspect `output/trace_*/` artifacts (requires the `aiTrace` plugin enabled).
335
331
  6. `grep -rE "\\bbrowser\\.|\\bby\\.|\\.then\\(|waitForAngular" e2e/` — empty before deleting `e2e/`.
336
332
 
337
- ## Pointers
338
-
339
- - `node_modules/codeceptjs/docs/basics.md` — `I.*` vocabulary, locators, assertions, the `await` rule
340
- - `node_modules/codeceptjs/docs/playwright.md` — recommended helper; `mockRoute` for any network mocking; `evaluate` for `executeScript` ports
341
- - `node_modules/codeceptjs/docs/webdriver.md` — alternative helper if the suite stays on Selenium Grid
342
- - `node_modules/codeceptjs/docs/locators.md` — semantic / ARIA / `locate()`, `customLocator` plugin for `by.addLocator` replacements
343
- - `node_modules/codeceptjs/docs/custom-helpers.md` `WebExtra` / `ApiExtras` patterns (extending `Helper`, reaching `this.helpers['Playwright']` / `this.helpers['REST']`)
344
- - `node_modules/codeceptjs/docs/api.md` — REST / GraphQL configuration, `setSharedCookies()`, `defaultHeaders`, `JSONResponse` assertions, Zod schemas
345
- - `node_modules/codeceptjs/docs/assertions.md` — built-in `see*` assertions, `ExpectHelper`, `codeceptjs/assertions` factories (use these instead of `if (cond) throw new Error(...)`)
346
- - `node_modules/codeceptjs/docs/pageobjects.md` — porting Protractor page objects
347
- - `node_modules/codeceptjs/docs/sessions.md`, `auth.md` — multi-user + login reuse
348
- - `node_modules/codeceptjs/docs/effects.md` — `tryTo`, `retryTo`, `within`
349
- - `writing-codeceptjs-tests` — per-spec rewrite playbook (drive via MCP, learn locators, commit verified steps)
350
- - `debugging-codeceptjs-tests` — **use on every failing test from the first full run** (breakpoint, inspect live page via MCP, fix on the fly)
351
- - `codeceptjs-auth` — replace UI re-login in every `beforeEach`
352
- - `codeceptjs-fundamentals` — run **after** migration to confirm the new setup is wired correctly
333
+ ## Related skills
334
+
335
+ - `writing-codeceptjs-tests` — per-spec rewrite playbook (MCP-driven, verified steps)
336
+ - `debugging-codeceptjs-tests` — use on every failing test from the first full run
337
+ - `codeceptjs-auth` — replaces UI re-login in every `beforeEach` / manual cookie injection
338
+ - `codeceptjs-fundamentals` — run after migration to confirm wiring
339
+ - Reference docs: `node_modules/codeceptjs/docs/` (basics, playwright, webdriver, locators, custom-helpers, api, assertions, pageobjects, sessions, effects)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migrate-selenium-java-to-codeceptjs
3
- description: "Port a Selenium WebDriver or Selenide (Java) test suite to CodeceptJS 4. Trigger when the project contains `pom.xml` declaring `<artifactId>selenium-java</artifactId>` / `<artifactId>selenide</artifactId>` / `<artifactId>webdrivermanager</artifactId>`, `build.gradle` / `build.gradle.kts` with `org.seleniumhq.selenium:selenium-java` or `com.codeborne:selenide`, a `src/test/java/` tree with `*Test.java` / `*IT.java` / `*Tests.java` / `*Steps.java`, imports from `org.openqa.selenium.*` (`WebDriver`, `WebElement`, `By`, `WebDriverWait`, `ExpectedConditions`, `Actions`, `JavascriptExecutor`, `Select`, `Keys`) or `com.codeborne.selenide.*` (`Selenide`, `SelenideElement`, `Configuration`, `Condition`, `ElementsCollection`), JUnit 5 / 4 or TestNG annotations (`@Test`, `@BeforeEach`, `@AfterEach`, `@BeforeAll`, `@BeforeMethod`, `@BeforeClass`, `@DataProvider`, `@ParameterizedTest`, `@FindBy`, `@FindAll`), `PageFactory.initElements(...)`, `WebDriverManager.*.setup()`, `new ChromeDriver(...)` / `new RemoteWebDriver(...)`, `Selenide.open(...)`, `$(...).shouldBe(...)` / `$$(...).filter(...)` chains, or Cucumber-JVM step defs (`@Given` / `@When` / `@Then` from `io.cucumber.java.en.*`). Walks the port end-to-end: inventory page objects (almost always present, often `@FindBy`-driven), shared `*Helper` / `*Manager` classes, JUnit/TestNG hooks and listeners, data providers, Cucumber step defs; install CodeceptJS in a parallel directory with the **WebDriver helper as the default** (most native target — same W3C protocol the Java suite already speaks); no driver setup is needed because WebdriverIO v9 auto-starts the matching browser driver, with **Docker Selenium (Selenoid / `selenium/standalone-chrome`) only as a fallback** for parallel/CI/Grid runs per `codeceptjs-fundamentals` and `node_modules/codeceptjs/docs/webdriver.md § \"Selenium in Docker (Selenoid)\"`; port the config (Maven/Gradle deps → `package.json`, Selenide `Configuration.*` / Selenium capabilities → `helpers.WebDriver.*`); split shared Java helpers into `WebExtra` (browser-driven — `JavascriptExecutor` bodies become `browser.execute(...)` via `this.helpers['WebDriver'].browser`) and `ApiExtras` (RestAssured / Apache HttpClient → REST helper, never via the browser helper); port `@FindBy`-driven page objects to CodeceptJS page objects without inventing assertion/one-liner wrappers; **drop explicit wait code** (`WebDriverWait`, `ExpectedConditions.*`, Selenide `.shouldBe(visible)` / `.shouldHave(text(...))` chains) — CodeceptJS auto-waits via `smartWait`; translate `By.X(...)` / `@FindBy(...)` locators to semantic strings / ARIA / `locate()` / `{ css }`; convert specs (handing off to `writing-codeceptjs-tests`), mapping JUnit 5 / JUnit 4 / TestNG annotations to `Feature` / `Scenario` / `Before` / `BeforeSuite` / `After` / `AfterSuite` and `@DataProvider` / `@ParameterizedTest` to `Data(...).Scenario(...)`; swap any custom `LoginHelper` / cookie-based session reuse for the `auth` plugin; keep WireMock as a sidecar for client-side stubs while on WebDriver (WebDriver has no native network interception); for Cucumber-JVM, keep `.feature` files and rewrite step defs in JS via CodeceptJS BDD; then decommission the Java suite. Once the WebDriver suite is green, propose the **optional Playwright swap** (faster, cross-browser from one config, native `I.mockRoute`) — mechanical config change, test code unchanged."
3
+ description: "Port a Selenium WebDriver or Selenide (Java) test suite to CodeceptJS 4. Trigger when the project contains `pom.xml` declaring `selenium-java` / `selenide` / `webdrivermanager` / `junit-jupiter` / `testng`, a `build.gradle{,.kts}` with `org.seleniumhq.selenium` / `com.codeborne:selenide`, a `src/test/java/` tree with `*Test.java` / `*IT.java` / `*Steps.java`, imports from `org.openqa.selenium.*` (`WebDriver`, `By`, `WebDriverWait`, `ExpectedConditions`, `Actions`) or `com.codeborne.selenide.*` (`Selenide`, `SelenideElement`, `Condition`), JUnit/TestNG annotations (`@Test`, `@BeforeEach`, `@DataProvider`, `@FindBy`, `@ParameterizedTest`), `PageFactory.initElements(...)`, `new ChromeDriver(...)` / `Selenide.open(...)`, or Cucumber-JVM step defs (`@Given` / `@When` / `@Then`)."
4
4
  ---
5
5
 
6
6
  # Migrate Selenium / Selenide (Java) → CodeceptJS 4
@@ -13,7 +13,7 @@ Three foundational differences to internalize:
13
13
  2. **Helpers, not `WebDriver` / `driver`.** `I.*` dispatches to a configured helper. **Default to the WebDriver helper** — it speaks the same W3C WebDriver protocol your Java suite already speaks, so the migration is most native: same Selenium server, same browser drivers, same capabilities, same Grid if you have one. Once the suite is green on WebDriver, you can swap in the **Playwright** helper (modern, faster, less flaky, native multi-browser via one config) by changing one helper block — the test code is identical either way.
14
14
  3. **First-class abstractions.** Page objects, the `auth` plugin, multi-user `session(...)`, custom helpers, and the `customLocator` plugin are built in. Java suites already centralise these (`PageFactory`, `LoginHelper`, `DriverManager`); the migration consolidates them onto the framework's idioms instead of carrying the Java-specific glue forward.
15
15
 
16
- Authoritative references: `node_modules/codeceptjs/docs/basics.md`, `locators.md`, `playwright.md`, `webdriver.md`, `custom-helpers.md`, `pageobjects.md`.
16
+ Authoritative reference: `node_modules/codeceptjs/docs/` (basics, locators, playwright, webdriver, custom-helpers, pageobjects).
17
17
 
18
18
  ## When to trigger
19
19
 
@@ -317,30 +317,26 @@ for (const sort of testSort) {
317
317
  }
318
318
  ```
319
319
 
320
- **Dry-run as you go.** After each batch of converted specs, run:
320
+ **Per batch**: `npx codeceptjs dry-run --steps -c <config>` loads every Scenario, resolves every `I.*` call, no browser. Surfaces typos, missing imports, page objects not under `include`, and nonexistent verbs in seconds. Fix before anything real.
321
321
 
322
- ```bash
323
- npx codeceptjs dry-run --steps -c <config>
324
- ```
325
-
326
- It loads every scenario, resolves every `I.*` call against the configured helpers, and prints the step list — all without launching a browser. Typos, missing imports, page objects not registered under `include`, and `I.*` verbs that don't exist on `WebExtra` / `ApiExtras` all surface here in seconds. Fix anything that fails before running a real test.
322
+ Then run the batch: `npx codeceptjs run --steps -c <config>`.
327
323
 
328
- **Then run the whole batch for real.** Dry-run proves specs parse and resolve not that they pass. As soon as a batch is dry-run clean, run it against the browser:
329
-
330
- ```bash
331
- npx codeceptjs run --steps -c <config>
332
- ```
333
-
334
- First real runs after a migration almost always have failures — locator drift, timing the explicit `WebDriverWait` code was masking, auth/session differences, data assumptions. **This is expected; fixing it is part of the migration, not a follow-up task.** When a test fails, **invoke the `debugging-codeceptjs-tests` skill and fix it on the fly** — it breakpoints the failing step, inspects the live page via MCP, finds the working locator/wait, and commits the verified fix. Do not bulk-rewrite specs blind, and do not mask failures with `retry`. Drive every failure to a real fix before starting the next batch. A batch is "done" when it runs green, not when it dry-runs clean.
324
+ - First real runs almost always fail locator drift, timing the explicit `WebDriverWait` code was masking, auth/session differences, data assumptions. **Expected; fixing it is part of the migration.**
325
+ - Every failure → invoke `debugging-codeceptjs-tests` and fix on the fly (breakpoint, live-page inspection, verified fix). No blind rewrites, no `retry` masking.
326
+ - A batch is done when it runs green, not when it dry-runs clean.
335
327
 
336
328
  ### 6. Locators
337
329
 
338
- CodeceptJS prioritypick the highest that fits:
330
+ **Scope every locator with a context.** The last argument of every action narrows the lookup to a region `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`, `I.click({ role: 'button', name: 'Delete' }, '.modal')`. A short semantic or ARIA locator plus a context beats one long unscoped locator: it reads like the page, disambiguates duplicate labels without growing, and survives markup churn. Apply this to every row of the tables below — the source framework's chain usually splits cleanly into *region* + *what the user sees*.
339
331
 
340
- 1. **Semantic strings** button text, label, placeholder, link text: `I.click('Save')`, `I.fillField('Email', 'u@t.com')`.
341
- 2. **ARIA roles** — `I.click({ role: 'button', name: 'Sign In' })`.
342
- 3. **`locate()` builder** — `I.click(locate('button').withText('Edit').inside('tr').withText('Acme'))`.
343
- 4. **CSS / XPath** fallback only.
332
+ CodeceptJS prioritypick the highest that fits, then add the context:
333
+
334
+ 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`.
335
+ A plain string already matches `aria-label`, so an icon-only control with `aria-label="Save"` is `I.click('Save', <context>)` — never `'aria-label=Save'` or `{ css: '[aria-label="Save"]' }`.
336
+ 2. **ARIA roles** — `I.click({ role: 'button', name: 'Sign In' }, '#login-form')`.
337
+ 3. **`$name` via the `customLocator` plugin** — when the suite leans on `data-test` / `data-qa` attributes.
338
+ 4. **`locate()` builder** — `I.click(locate('button').withText('Edit').inside('tr').withText('Acme'))`; often better split as `I.click('Edit', locate('tr').withText('Acme'))`.
339
+ 5. **CSS / XPath** — fallback only.
344
340
 
345
341
  Java suites lean on `By.id`, `By.cssSelector`, `By.xpath`, `By.linkText`, and `@FindBy(...)` heavily. Translation:
346
342
 
@@ -454,19 +450,10 @@ Once the migration is complete and WebDriver runs are stable in CI, consider swa
454
450
 
455
451
  You gain: cross-browser coverage (Chromium / Firefox / WebKit) from one config, faster runs, native `I.mockRoute(...)` network mocking, richer ARIA snapshots via the MCP loop.
456
452
 
457
- ## Pointers
458
-
459
- - `node_modules/codeceptjs/docs/basics.md` — `I.*` vocabulary, locators, assertions, the `await` rule
460
- - `node_modules/codeceptjs/docs/webdriver.md` — default helper for this migration; § "Selenium in Docker (Selenoid)" for the container setup
461
- - `node_modules/codeceptjs/docs/playwright.md` — target for the optional follow-up swap; `mockRoute` for WireMock client-side stubs
462
- - `node_modules/codeceptjs/docs/locators.md` — semantic / ARIA / `locate()`, `customLocator` plugin
463
- - `node_modules/codeceptjs/docs/pageobjects.md` for ported `@FindBy` POMs
464
- - `node_modules/codeceptjs/docs/custom-helpers.md` — `WebExtra` / `ApiExtras` patterns (see § "WebDriver Example" for the `browser` access pattern)
465
- - `node_modules/codeceptjs/docs/api.md` — REST helper for RestAssured ports
466
- - `node_modules/codeceptjs/docs/auth.md` — replace `LoginHelper` + cookie reuse
467
- - `node_modules/codeceptjs/docs/bdd.md` — CodeceptJS BDD for Cucumber-JVM ports
468
- - `node_modules/codeceptjs/docs/effects.md` — `session`, `tryTo`, `retryTo`, `within`
469
- - **`codeceptjs-fundamentals`** — Docker-fallback Selenium setup convention; run **after** migration to confirm wiring
470
- - **`writing-codeceptjs-tests`** — per-spec rewrite playbook (drive via MCP, learn locators, commit verified steps)
471
- - **`debugging-codeceptjs-tests`** — **use on every failing test from the first full run** (breakpoint, inspect live page via MCP, fix on the fly)
472
- - **`codeceptjs-auth`** — replace `LoginHelper` / cookie-based session reuse
453
+ ## Related skills
454
+
455
+ - `writing-codeceptjs-tests` — per-spec rewrite playbook (MCP-driven, verified steps)
456
+ - `debugging-codeceptjs-tests` — use on every failing test from the first full run
457
+ - `codeceptjs-auth` — replaces `LoginHelper` / cookie-based session reuse
458
+ - `codeceptjs-fundamentals` — Docker-fallback Selenium convention; run after migration to confirm wiring
459
+ - Reference docs: `node_modules/codeceptjs/docs/` (basics, webdriver, playwright, locators, custom-helpers, api, auth, bdd, effects)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migrate-testcafe-to-codeceptjs
3
- description: "Port a TestCafe test suite to CodeceptJS 4. Trigger when the project contains `.testcaferc.{json,js,ts,cjs}`, `testcafe` in `devDependencies`, test files that import from `testcafe` (`Selector`, `ClientFunction`, `Role`, `RequestMock`, `RequestHook`, `RequestLogger`, `t` from a test signature), top-level `fixture('X').page(...)` + `test('y', async t => { ... })` blocks, `Selector(...)` chains (`.withText`, `.withAttribute`, `.nth`, `.find`, `.filter`, `.parent`, `.child`, `.sibling`), `await t.click(...)` / `t.typeText(...)` patterns, `t.useRole(...)`, `t.addRequestHooks(...)`, `t.eval(...)`, `ClientFunction(...)`, TestCafe Studio recordings, or a `tests/` directory matching `*.test.{js,ts}` whose contents start with `fixture(...)`. Walks the port end-to-end: inventory shared logic (TestCafe page-object-style modules, `Role` definitions, `ClientFunction` factories, `RequestMock` factories, custom Test Controller actions, fixture hooks), install CodeceptJS with the Playwright helper alongside TestCafe, port the config, split shared helpers into `WebExtra` (browser-driven via Playwright `page` — `ClientFunction` / `t.eval` ports here as `page.evaluate`) and `ApiExtras` (HTTP via REST helper, never `browserContext.request.*`), port TestCafe page objects to CodeceptJS page objects without inventing assertion/one-liner wrappers, replace `Selector(...)` chains with semantic strings / ARIA / `locate()` / `{ css }`, **strip excess `await` from every action call** (CodeceptJS auto-queues — `await` is only for grabs), convert specs (handing off to `writing-codeceptjs-tests`), replace `Role` + `t.useRole` with the `auth` plugin, swap `RequestMock` for `I.mockRoute`, fold `t.expect(sel.X).Y(...)` chains into `I.see*` / `ExpectHelper` / `codeceptjs/assertions`, then decommission TestCafe."
3
+ description: "Port a TestCafe test suite to CodeceptJS 4. Trigger when the project contains `.testcaferc.{json,js,ts,cjs}`, `testcafe` in `devDependencies`, test files importing from `testcafe` (`Selector`, `ClientFunction`, `Role`, `RequestMock`, `RequestHook`, `RequestLogger`), top-level `fixture('X').page(...)` + `test('y', async t => { ... })` blocks, `Selector(...)` chains (`.withText`, `.nth`, `.find`, `.filter`), `await t.click(...)` patterns, `t.useRole(...)`, `t.eval(...)` / `ClientFunction(...)`, or TestCafe Studio recordings."
4
4
  ---
5
5
 
6
6
  # Migrate TestCafe → CodeceptJS 4
@@ -11,7 +11,7 @@ TestCafe and CodeceptJS share a lot at the surface — both expose a single test
11
11
  2. **Helpers, not a bundled proxy.** TestCafe runs as an HTTP/HTTPS proxy that injects automation into pages; CodeceptJS dispatches `I.*` to a configured helper. **Playwright recommended** — closest feel, fastest, supports all three engines (Chromium / Firefox / WebKit) the same way TestCafe did.
12
12
  3. **First-class abstractions.** Page objects, multi-user `session(...)`, the `auth` plugin, custom helpers, and the `customLocator` plugin are built in. TestCafe projects accumulate ad-hoc versions of these (Selector-property classes, `Role` factories, `ClientFunction` factories) — the migration consolidates them onto framework idioms.
13
13
 
14
- Authoritative references: `node_modules/codeceptjs/docs/basics.md`, `locators.md`, `playwright.md`, `custom-helpers.md`, `pageobjects.md`.
14
+ Authoritative reference: `node_modules/codeceptjs/docs/` (basics, locators, playwright, custom-helpers, pageobjects).
15
15
 
16
16
  ## When to trigger
17
17
 
@@ -215,30 +215,26 @@ for (const row of await I.grabWebElements('.row')) {
215
215
  }
216
216
  ```
217
217
 
218
- **Dry-run as you go.** After each batch of converted specs, run:
218
+ **Per batch**: `npx codeceptjs dry-run --steps -c <config>` loads every Scenario, resolves every `I.*` call, no browser. Surfaces typos, missing imports, page objects not under `include`, and nonexistent verbs in seconds. Fix before anything real.
219
219
 
220
- ```bash
221
- npx codeceptjs dry-run --steps -c <config>
222
- ```
223
-
224
- It loads every scenario, resolves every `I.*` call against the configured helpers, and prints the step list — all without launching a browser. Typos, missing imports, page objects not registered under `include`, and `I.*` verbs that don't exist on `WebExtra` / `ApiExtras` all surface here in seconds. Fix anything that fails before running a real test.
220
+ Then run the batch: `npx codeceptjs run --steps -c <config>`.
225
221
 
226
- **Then run the whole batch for real.** Dry-run proves specs parse and resolve not that they pass. As soon as a batch is dry-run clean, run it against the browser:
227
-
228
- ```bash
229
- npx codeceptjs run --steps -c <config>
230
- ```
231
-
232
- First real runs after a migration almost always have failures — locator drift, timing the source framework hid behind its own retry, auth/session differences, data assumptions. **This is expected; fixing it is part of the migration, not a follow-up task.** When a test fails, **invoke the `debugging-codeceptjs-tests` skill and fix it on the fly** — it breakpoints the failing step, inspects the live page via MCP, finds the working locator/wait, and commits the verified fix. Do not bulk-rewrite specs blind, and do not mask failures with `retry`. Drive every failure to a real fix before starting the next batch. A batch is "done" when it runs green, not when it dry-runs clean.
222
+ - First real runs almost always fail locator drift, timing the source framework hid behind its own retry, auth/session differences, data assumptions. **Expected; fixing it is part of the migration.**
223
+ - Every failure → invoke `debugging-codeceptjs-tests` and fix on the fly (breakpoint, live-page inspection, verified fix). No blind rewrites, no `retry` masking.
224
+ - A batch is done when it runs green, not when it dry-runs clean.
233
225
 
234
226
  ### 6. Locator preference
235
227
 
236
- CodeceptJS priority pick the highest that fits. TestCafe's lazy chainable `Selector` lines up well with CodeceptJS's `locate()` builder, but most chains shrink considerably because semantic strings cover what `.withText` was doing.
228
+ **Scope every locator with a context.** The last argument of every action narrows the lookup to a region — `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`, `I.click({ role: 'button', name: 'Delete' }, '.modal')`. A short semantic or ARIA locator plus a context beats one long unscoped locator: it reads like the page, disambiguates duplicate labels without growing, and survives markup churn. Apply this to every row of the tables below — the source framework's chain usually splits cleanly into *region* + *what the user sees*.
229
+
230
+ CodeceptJS priority — pick the highest that fits, then add the context. TestCafe's lazy chainable `Selector` lines up well with CodeceptJS's `locate()` builder, but most chains shrink considerably because a semantic string plus a context covers what `.withText` + `.find` were doing — `Selector('.row').withText('Acme').find('.btn')` becomes `I.click('Edit', locate('.row').withText('Acme'))`.
237
231
 
238
- 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save')`, `I.fillField('Email', 'u@t.com')`. Covers `Selector('button').withText('Save')` cleanly.
239
- 2. **ARIA roles** `I.click({ role: 'button', name: 'Sign In' })`. Strong default for modern apps.
240
- 3. **`locate()` builder** — `I.click(locate('.row').withText('Acme').inside('table'))`. Direct equivalent of TestCafe `Selector('.row').withText('Acme').find('.btn')` style chains.
241
- 4. **CSS / XPath / attribute objects** — `{ id: 'foo' }`, `{ name: 'email' }`, `{ css: '[data-test=submit]' }`, `{ xpath: '//div[@id="x"]' }`. Fallback.
232
+ 1. **Semantic strings** — button text, label, placeholder, link text: `I.click('Save', '.toolbar')`, `I.fillField('Email', 'u@t.com', '#login-form')`. Covers `Selector('button').withText('Save')` cleanly.
233
+ A plain string already matches `aria-label`, so an icon-only control with `aria-label="Save"` is `I.click('Save', <context>)` — never `'aria-label=Save'` or `{ css: '[aria-label="Save"]' }`.
234
+ 2. **ARIA roles** — `I.click({ role: 'button', name: 'Sign In' }, '#login-form')`. Strong default for modern apps.
235
+ 3. **`$name` via the `customLocator` plugin** — when the suite uses `data-test` / `data-qa` attributes.
236
+ 4. **`locate()` builder** — `I.click(locate('.row').withText('Acme').inside('table'))`. Direct equivalent of TestCafe `Selector(...)` chains that don't reduce to locator + context.
237
+ 5. **CSS / XPath / attribute objects** — `{ id: 'foo' }`, `{ name: 'email' }`, `{ css: '[data-test=submit]' }`, `{ xpath: '//div[@id="x"]' }`. Fallback.
242
238
 
243
239
  | TestCafe Selector chain | CodeceptJS 4 |
244
240
  |---|---|
@@ -333,18 +329,10 @@ Only after every spec is ported and CI is green: delete `.testcaferc.{json,js,ts
333
329
  5. Hand off to **`codeceptjs-run-analysis`** to inspect `output/trace_*/` artifacts (requires the `aiTrace` plugin enabled).
334
330
  6. `grep -rE "\\bfixture\\(|\\btest\\(|Selector\\(|ClientFunction\\(|\\bRole\\(|t\\.click\\(|t\\.typeText\\(" tests/` — empty before deleting the original TestCafe directory.
335
331
 
336
- ## Pointers
337
-
338
- - `node_modules/codeceptjs/docs/basics.md` — `I.*` vocabulary, locators, assertions, the `await` rule (the rule TestCafe users have to *un*-learn)
339
- - `node_modules/codeceptjs/docs/playwright.md` — recommended helper; `mockRoute` for `RequestMock`; `evaluate` for `ClientFunction` / `t.eval` ports
340
- - `node_modules/codeceptjs/docs/locators.md` — semantic / ARIA / `locate()` builder (replaces TestCafe Selector chains)
341
- - `node_modules/codeceptjs/docs/custom-helpers.md` — `WebExtra` / `ApiExtras` patterns (extending `Helper`, reaching `this.helpers['Playwright']` / `this.helpers['REST']`)
342
- - `node_modules/codeceptjs/docs/api.md` REST / GraphQL configuration, `setSharedCookies()`, `defaultHeaders`, `JSONResponse` assertions, Zod schemas
343
- - `node_modules/codeceptjs/docs/assertions.md` — built-in `see*` assertions, `ExpectHelper`, `codeceptjs/assertions` factories (use these instead of `if (cond) throw new Error(...)`)
344
- - `node_modules/codeceptjs/docs/pageobjects.md` — porting TestCafe Selector-based page objects
345
- - `node_modules/codeceptjs/docs/sessions.md`, `auth.md` — replaces `Role` + `t.useRole`
346
- - `node_modules/codeceptjs/docs/effects.md` — `tryTo`, `retryTo`, `within` (replaces `t.switchToIframe`)
347
- - `writing-codeceptjs-tests` — per-spec rewrite playbook (drive via MCP, learn locators, commit verified steps)
348
- - `debugging-codeceptjs-tests` — **use on every failing test from the first full run** (breakpoint, inspect live page via MCP, fix on the fly)
349
- - `codeceptjs-auth` — replace `Role` + `t.useRole`
350
- - `codeceptjs-fundamentals` — run **after** migration to confirm the new setup is wired correctly
332
+ ## Related skills
333
+
334
+ - `writing-codeceptjs-tests` — per-spec rewrite playbook (MCP-driven, verified steps); also the path to re-author Studio recordings
335
+ - `debugging-codeceptjs-tests` — use on every failing test from the first full run
336
+ - `codeceptjs-auth` — replaces `Role` + `t.useRole`
337
+ - `codeceptjs-fundamentals` — run after migration to confirm wiring; effects (`tryTo`, `within`) replace `t.switchToIframe`
338
+ - Reference docs: `node_modules/codeceptjs/docs/` (basics, playwright, locators, custom-helpers, api, assertions, pageobjects, sessions, auth)
@@ -1,53 +1,42 @@
1
1
  ---
2
2
  name: refactoring-codeceptjs-tests
3
- description: Use when refactoring CodeceptJS 4 tests — cleaning up duplication, extracting page objects, taming long locators, moving raw JS into custom helpers. Works targeted (one test or file) or global (whole tests directory). Always proposes changes before applying. Trigger on phrases like "refactor my tests", "clean up", "extract page object", "this test is too long", "deduplicate", or when reviewing test files for quality.
3
+ description: >
4
+ Use when cleaning up existing CodeceptJS 4 tests — deduplication, extracting
5
+ page objects, taming long locators, moving raw JS into custom helpers.
6
+ Targeted (one file) or global (whole tests directory); always proposes before
7
+ applying. Trigger on "refactor my tests", "clean up", "extract page object",
8
+ "this test is too long", "deduplicate", or when reviewing test files for
9
+ quality.
4
10
  ---
5
11
 
6
12
  # Refactoring CodeceptJS 4 Tests
7
13
 
8
- Test suites rot in three predictable ways: duplicate UI flows copy-pasted across files, fat locators repeated everywhere, and raw JS escaping into Scenarios. The fix for each is moving the pattern to its proper home — page object, custom helper, or the `auth` plugin — without changing test behaviour.
14
+ Suites rot in three predictable ways: duplicated UI flows copy-pasted across files, fat locators repeated everywhere, raw JS escaping into Scenarios. The fix for each is moving the pattern to its proper home without changing behaviour.
9
15
 
10
- This skill works **targeted** (refactor one test or file the user named) or **global** (sweep the whole tests directory). Either way it **proposes changes first** and applies after approval, in reviewable batches.
16
+ Works **targeted** (a file or Scenario the user named) or **global** (the whole configured `tests` glob). Either way: **propose first**, apply in reviewable batches after approval.
11
17
 
12
18
  ## Workflow
13
19
 
14
- ### 1. Read the project (fundamentals)
15
- Run the **codeceptjs-fundamentals** skill. You need: registered page objects (keys under `include`), the actor file (`custom_steps.js` or similar), any custom helpers already configured, and the `auth` plugin's user list. Without this you don't know where extractions land.
16
-
17
- ### 2. Pick scope
18
- - **Targeted** — a file or Scenario the user named. Read it once, propose, apply.
19
- - **Global** — the configured `tests` glob. Treat as a multi-pass cycle: inventory → propose grouped → approve → apply a batch → re-run affected Scenarios → next batch. Never one big edit.
20
-
21
- ### 3. Inventory the target
22
- Read the test(s). Note:
23
- - Repeated `I.*` sequences across 2+ Scenarios.
24
- - Locator strings used in 2+ places, or single locators that span multiple lines / deep XPath / nested CSS.
25
- - `I.executeScript` blocks beyond one statement.
26
- - `usePlaywrightTo` / `usePuppeteerTo` / `useWebDriverTo` blocks doing business work (not inspection).
27
- - Hardcoded credentials, URLs, magic strings.
28
- - `I.wait(N)` raw-seconds calls and `await` on plain action steps — fix while you're there.
29
-
30
- ### 4. Duplicate UI flowspage object methods
31
- Sequences like login form fill, modal-confirm, search-then-click, table-row-edit. Extract to a method named for the user's intent: `loginPage.signIn(email, pass)`, `searchBar.searchFor(term)`, `cartPage.removeItem(name)`. Add to the existing PO when one fits the area; otherwise create a new PO and register it under `include` in the config. Apply the **rule of three** wait for the second occurrence before extracting; one-off code shouldn't be abstracted.
32
-
33
- ### 5. Fat locators `locate()` in page objects
34
- Multi-line XPath, deeply nested CSS, or repeated locator strings. Convert to the `locate(...)` builder, leaning on the new 4.x DSL methods (`withClass`, `withoutClass`, `and`, `andNot`, plus `withText`, `inside`, `withDescendant`). Used once → keep `locate()` inline at the call site. Used 2+ times → store as a named page-object field with `.as('description')` so failures point at a meaningful name.
35
-
36
- ### 6. Raw JS → custom helper
37
- Big `I.executeScript(...)` blocks, `usePlaywrightTo` doing real DOM walking or business logic, hand-rolled fetches inside a Scenario. Move into a method on a custom helper. Register the helper under `helpers` in the config alongside built-ins. **Critical rule from fundamentals**: inside a custom helper, `I` does **not** exist — compose with another helper via `this.helpers['<Name>']` (e.g. `this.helpers['Playwright'].page.evaluate(...)`, `this.helpers['REST'].sendGetRequest(...)`). Tests stay in the `I.*` vocabulary; helpers expose the new capability.
38
-
39
- ### 7. Special case — login duplication
40
- If the duplicated UI flow is login, **don't build a `loginPage.signIn` method**. Hand off to the **codeceptjs-auth** skill — that's what the `auth` plugin exists for. Page objects for login flows are a common smell when the project should be using session reuse.
41
-
42
- ### 8. Cross-page flows (optional)
43
- Site-wide actions used across many Features — `I.acceptCookies()`, `I.goToBilling()`, `I.dismissNotification()` — belong in the actor (`custom_steps.js`), not a single page's PO. The actor is the right home when no single page owns the action.
44
-
45
- ### 9. Propose, then apply
46
- Group proposals by destination file (`pages/loginPage.js`, `helpers/DbHelper.js`, `tests/checkout_test.js`). Show the user the list before editing. In global mode, get explicit approval and work in batches — three to five files at a time. After each batch, run the affected Scenarios:
47
- ```bash
48
- npx codeceptjs run --grep '<scenario or feature>' --steps
49
- ```
50
- Hand the result to **codeceptjs-run-analysis** — confirm every affected scenario still passes and no failure shifted to a new step. Refactors that don't run aren't refactors — they're guesses.
20
+ 1. **Fundamentals** — run `codeceptjs-fundamentals`. You need: page objects under `include`, the actor file, custom helpers, auth roles. Without this you don't know where extractions land.
21
+ 2. **Pick scope**:
22
+ - Targeted — read once, propose, apply.
23
+ - Global — multi-pass cycle: inventory → propose grouped → approve → apply a batch → re-run affected Scenarios → next batch. Never one big edit.
24
+ 3. **Inventory** — flag:
25
+ - Repeated `I.*` sequences across 2+ Scenarios
26
+ - Locators used in 2+ places; multi-line XPath / deeply nested CSS
27
+ - Unscoped locators carrying their own region (`'.sidebar nav a.settings'`), `'aria-label=X'` spellings, raw `[data-testid=...]` at call sites
28
+ - Multi-statement `I.executeScript`; `usePlaywrightTo`/`usePuppeteerTo`/`useWebDriverTo` doing business work
29
+ - Hardcoded credentials, URLs, magic strings
30
+ - `I.wait(N)` and stray `await` on plain actions fix while you're there
31
+ 4. **Duplicate flows → page-object methods** named for user intent (`loginPage.signIn(email, pass)`, `cartPage.removeItem(name)`). Rule of three: extract at the second occurrence; one-off code stays put.
32
+ 5. **Fat locators** split before reaching for the builder: structural half becomes the context argument, rest stays a semantic string.
33
+ - `I.click('.sidebar nav a.settings')` `I.click('Settings', '.sidebar')`
34
+ - `I.click({ css: '[aria-label="Save"]' })` `I.click('Save', '.toolbar')`
35
+ - `I.click({ css: '[data-qa=submit]' })` → `I.click('$submit', '.checkout')` with `customLocator`
36
+ Only what survives the split needs `locate()`: used once inline at call site; used 2+ times → named PO field with `.as('description')` so failures point at a meaningful name.
37
+ 6. **Raw JS custom helper** `I.executeScript` blocks, `usePlaywrightTo` doing DOM walking or business logic, hand-rolled fetches inside Scenarios. Remember the fundamentals rule: **`I` does not exist inside a helper** — compose via `this.helpers['<Name>']`. Tests stay in the `I.*` vocabulary.
38
+ 7. **Login duplication** — don't build a `loginPage.signIn` method. Hand off to `codeceptjs-auth`: that's what the `auth` plugin exists for. Login POs are a smell when session reuse applies.
39
+ 8. **Site-wide actions** (`I.acceptCookies()`, `I.goToBilling()`) actor file (`custom_steps.js`), not any single page's PO. Right home when no single page owns the action.
51
40
 
52
41
  ## Decision tree
53
42
 
@@ -56,26 +45,34 @@ Hand the result to **codeceptjs-run-analysis** — confirm every affected scenar
56
45
  | UI flow on one page | Method on that page's PO |
57
46
  | UI flow spanning pages, site-wide | Actor (`custom_steps.js`) |
58
47
  | Login | `auth` plugin (see `codeceptjs-auth`) |
48
+ | Long locator carrying its own region | Short semantic locator + context arg |
59
49
  | Long locator used once | `locate()` inline |
60
- | Long locator used 2+ times | `locate()` stored as a PO field |
50
+ | Long locator used 2+ times | `locate()` stored as PO field |
61
51
  | Raw browser API / file system / DB / mail | Custom helper |
62
52
  | Test-data setup hitting an API | REST helper + Data Object |
63
53
 
54
+ ## Propose, then apply
55
+
56
+ Group proposals by destination file (`pages/loginPage.js`, `helpers/DbHelper.js`, `tests/checkout_test.js`). Show the list before editing. In global mode: explicit approval, batches of three to five files, re-run after each batch:
57
+
58
+ ```bash
59
+ npx codeceptjs run --grep '<scenario or feature>' --steps
60
+ ```
61
+
62
+ Hand output to `codeceptjs-run-analysis` — confirm every affected Scenario still passes and no failure shifted to a new step. Refactors that don't run aren't refactors.
63
+
64
64
  ## Things to avoid
65
65
 
66
66
  - Refactoring without re-running the affected Scenarios afterwards.
67
- - Extracting a flow that's only used once — wait for the second occurrence.
68
- - Renaming PO methods or fields without grepping for every caller first.
69
- - Moving code to a custom helper when a page object would do.
67
+ - Extracting a flow used only once — wait for the second occurrence.
68
+ - Renaming PO methods/fields without grepping every caller.
69
+ - A custom helper where a page object would do.
70
70
  - Squashing distinct flows into one method (`loginPage.do(thing)` is a smell).
71
- - Touching Scenario names or tags — CI pipelines and `--grep` filters reference them.
72
- - Mass-applying changes in global mode without batching and re-running.
71
+ - Touching Scenario names or tags — CI and `--grep` reference them.
72
+ - Mass-applying in global mode without batching and re-running.
73
73
 
74
- ## Pointers
74
+ ## Related skills
75
75
 
76
- - `node_modules/codeceptjs/docs/pageobjects.md` — class-based POs, `inject()`, lifecycle hooks
77
- - `node_modules/codeceptjs/docs/custom-helpers.md` — extending `Helper`, the `this.helpers[...]` rule
78
- - `node_modules/codeceptjs/docs/locators.md` — `locate()` builder + 4.x DSL methods
79
- - `node_modules/codeceptjs/docs/best.md` — broader test-organisation guidance
80
- - `codeceptjs-fundamentals` skill — DI, `inject()`, the `I`-unreachable-from-helpers rule
81
- - `codeceptjs-auth` skill — for login deduplication
76
+ - `codeceptjs-fundamentals` — Main rule, Where things go, Architecture (`I`-unreachable rule)
77
+ - `codeceptjs-auth` — login deduplication
78
+ - `codeceptjs-run-analysis` — post-refactor verification