testeiya 0.2.1 → 0.3.9

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 (414) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -213
  3. package/dist/prompt/context.js +79 -0
  4. package/dist/prompt/context.js.map +1 -0
  5. package/dist/prompt/index.js +56 -0
  6. package/dist/prompt/index.js.map +1 -0
  7. package/dist/prompt/print.js +22 -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} +24 -21
  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 +49 -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 +72 -0
  20. package/dist/src/args.js.map +1 -0
  21. package/dist/src/cli.js +61 -0
  22. package/dist/src/cli.js.map +1 -0
  23. package/dist/src/env.js +69 -0
  24. package/dist/src/env.js.map +1 -0
  25. package/dist/src/mcp-extension.js +9 -0
  26. package/dist/src/mcp-extension.js.map +1 -0
  27. package/dist/src/mcp.js +139 -0
  28. package/dist/src/mcp.js.map +1 -0
  29. package/dist/src/model.js +66 -0
  30. package/dist/src/model.js.map +1 -0
  31. package/dist/src/result.js +41 -0
  32. package/dist/src/result.js.map +1 -0
  33. package/dist/src/run.js +199 -0
  34. package/dist/src/run.js.map +1 -0
  35. package/dist/src/session.js +77 -0
  36. package/dist/src/session.js.map +1 -0
  37. package/dist/vendor/mcp.js +14801 -0
  38. package/mcp-tools.json +2967 -0
  39. package/package.json +29 -42
  40. package/prompt/context.ts +101 -0
  41. package/prompt/index.ts +93 -0
  42. package/prompt/print.ts +23 -0
  43. package/prompt/project-info.ts +30 -0
  44. package/prompt/system-prompt.ts +173 -0
  45. package/{src/prompt → prompt}/testomatio.ts +119 -8
  46. package/{src/prompt → prompt}/tools.ts +30 -8
  47. package/prompt/vocab.ts +7 -0
  48. package/{skills.lock.json → skills/skills.lock.json} +11 -7
  49. package/skills/skills.yaml +34 -0
  50. package/assets/testeiya-logo-dark.svg +0 -16
  51. package/assets/testeiya-logo.svg +0 -15
  52. package/models.catalog.json +0 -6963
  53. package/skills/codeceptjs/ci-fix-tests/SKILL.md +0 -120
  54. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +0 -158
  55. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +0 -91
  56. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +0 -158
  57. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +0 -90
  58. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +0 -234
  59. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +0 -110
  60. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +0 -306
  61. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +0 -352
  62. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +0 -472
  63. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +0 -350
  64. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +0 -81
  65. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +0 -206
  66. package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
  67. package/skills/playwright-best-practices-skill/README.md +0 -147
  68. package/skills/playwright-best-practices-skill/SKILL.md +0 -303
  69. package/skills/playwright-best-practices-skill/advanced/authentication-flows.md +0 -360
  70. package/skills/playwright-best-practices-skill/advanced/authentication.md +0 -871
  71. package/skills/playwright-best-practices-skill/advanced/clock-mocking.md +0 -364
  72. package/skills/playwright-best-practices-skill/advanced/mobile-testing.md +0 -409
  73. package/skills/playwright-best-practices-skill/advanced/multi-context.md +0 -288
  74. package/skills/playwright-best-practices-skill/advanced/multi-user.md +0 -393
  75. package/skills/playwright-best-practices-skill/advanced/network-advanced.md +0 -452
  76. package/skills/playwright-best-practices-skill/advanced/third-party.md +0 -464
  77. package/skills/playwright-best-practices-skill/architecture/pom-vs-fixtures.md +0 -363
  78. package/skills/playwright-best-practices-skill/architecture/test-architecture.md +0 -369
  79. package/skills/playwright-best-practices-skill/architecture/when-to-mock.md +0 -383
  80. package/skills/playwright-best-practices-skill/browser-apis/browser-apis.md +0 -391
  81. package/skills/playwright-best-practices-skill/browser-apis/iframes.md +0 -403
  82. package/skills/playwright-best-practices-skill/browser-apis/service-workers.md +0 -504
  83. package/skills/playwright-best-practices-skill/browser-apis/websockets.md +0 -403
  84. package/skills/playwright-best-practices-skill/core/annotations.md +0 -424
  85. package/skills/playwright-best-practices-skill/core/assertions-waiting.md +0 -361
  86. package/skills/playwright-best-practices-skill/core/configuration.md +0 -452
  87. package/skills/playwright-best-practices-skill/core/fixtures-hooks.md +0 -417
  88. package/skills/playwright-best-practices-skill/core/global-setup.md +0 -434
  89. package/skills/playwright-best-practices-skill/core/locators.md +0 -242
  90. package/skills/playwright-best-practices-skill/core/page-object-model.md +0 -315
  91. package/skills/playwright-best-practices-skill/core/projects-dependencies.md +0 -453
  92. package/skills/playwright-best-practices-skill/core/test-data.md +0 -492
  93. package/skills/playwright-best-practices-skill/core/test-suite-structure.md +0 -361
  94. package/skills/playwright-best-practices-skill/core/test-tags.md +0 -298
  95. package/skills/playwright-best-practices-skill/debugging/console-errors.md +0 -420
  96. package/skills/playwright-best-practices-skill/debugging/debugging.md +0 -504
  97. package/skills/playwright-best-practices-skill/debugging/error-testing.md +0 -360
  98. package/skills/playwright-best-practices-skill/debugging/flaky-tests.md +0 -496
  99. package/skills/playwright-best-practices-skill/frameworks/angular.md +0 -530
  100. package/skills/playwright-best-practices-skill/frameworks/nextjs.md +0 -469
  101. package/skills/playwright-best-practices-skill/frameworks/react.md +0 -531
  102. package/skills/playwright-best-practices-skill/frameworks/vue.md +0 -574
  103. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/ci-cd.md +0 -468
  104. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/docker.md +0 -283
  105. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/github-actions.md +0 -546
  106. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/gitlab.md +0 -397
  107. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/other-providers.md +0 -521
  108. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/parallel-sharding.md +0 -371
  109. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/performance.md +0 -453
  110. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/reporting.md +0 -424
  111. package/skills/playwright-best-practices-skill/infrastructure-ci-cd/test-coverage.md +0 -497
  112. package/skills/playwright-best-practices-skill/testing-patterns/accessibility.md +0 -359
  113. package/skills/playwright-best-practices-skill/testing-patterns/api-testing.md +0 -719
  114. package/skills/playwright-best-practices-skill/testing-patterns/browser-extensions.md +0 -506
  115. package/skills/playwright-best-practices-skill/testing-patterns/canvas-webgl.md +0 -493
  116. package/skills/playwright-best-practices-skill/testing-patterns/component-testing.md +0 -500
  117. package/skills/playwright-best-practices-skill/testing-patterns/drag-drop.md +0 -576
  118. package/skills/playwright-best-practices-skill/testing-patterns/electron.md +0 -509
  119. package/skills/playwright-best-practices-skill/testing-patterns/file-operations.md +0 -377
  120. package/skills/playwright-best-practices-skill/testing-patterns/file-upload-download.md +0 -562
  121. package/skills/playwright-best-practices-skill/testing-patterns/forms-validation.md +0 -561
  122. package/skills/playwright-best-practices-skill/testing-patterns/graphql-testing.md +0 -331
  123. package/skills/playwright-best-practices-skill/testing-patterns/i18n.md +0 -508
  124. package/skills/playwright-best-practices-skill/testing-patterns/performance-testing.md +0 -476
  125. package/skills/playwright-best-practices-skill/testing-patterns/security-testing.md +0 -430
  126. package/skills/playwright-best-practices-skill/testing-patterns/visual-regression.md +0 -634
  127. package/skills/playwright-cli/SKILL.md +0 -420
  128. package/skills/playwright-cli/references/element-attributes.md +0 -23
  129. package/skills/playwright-cli/references/playwright-tests.md +0 -39
  130. package/skills/playwright-cli/references/request-mocking.md +0 -87
  131. package/skills/playwright-cli/references/running-code.md +0 -241
  132. package/skills/playwright-cli/references/session-management.md +0 -225
  133. package/skills/playwright-cli/references/storage-state.md +0 -275
  134. package/skills/playwright-cli/references/test-generation.md +0 -433
  135. package/skills/playwright-cli/references/tracing.md +0 -139
  136. package/skills/playwright-cli/references/video-recording.md +0 -143
  137. package/skills/testeiya/README.md +0 -29
  138. package/skills/testeiya/answer-formatting/SKILL.md +0 -30
  139. package/skills/testeiya/check-cucumber/SKILL.md +0 -200
  140. package/skills/testeiya/check-tests/SKILL.md +0 -260
  141. package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
  142. package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
  143. package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
  144. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
  145. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
  146. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
  147. package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
  148. package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
  149. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
  150. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
  151. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
  152. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
  153. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
  154. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
  155. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
  156. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
  157. package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
  158. package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
  159. package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
  160. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
  161. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
  162. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
  163. package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
  164. package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
  165. package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
  166. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
  167. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
  168. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
  169. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
  170. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
  171. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
  172. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
  173. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
  174. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
  175. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
  176. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
  177. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
  178. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
  179. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
  180. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
  181. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
  182. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
  183. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
  184. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
  185. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
  186. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
  187. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
  188. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
  189. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
  190. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
  191. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
  192. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
  193. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
  194. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
  195. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
  196. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
  197. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
  198. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
  199. package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
  200. package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
  201. package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
  202. package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
  203. package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
  204. package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
  205. package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
  206. package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
  207. package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
  208. package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
  209. package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
  210. package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
  211. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
  212. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
  213. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
  214. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
  215. package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
  216. package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
  217. package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
  218. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
  219. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
  220. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
  221. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
  222. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
  223. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
  224. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
  225. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
  226. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
  227. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
  228. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
  229. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
  230. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
  231. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
  232. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
  233. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
  234. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
  235. package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
  236. package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
  237. package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
  238. package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
  239. package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
  240. package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
  241. package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
  242. package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
  243. package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
  244. package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
  245. package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
  246. package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
  247. package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
  248. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
  249. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
  250. package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
  251. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
  252. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
  253. package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
  254. package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
  255. package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
  256. package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
  257. package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
  258. package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
  259. package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
  260. package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
  261. package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
  262. package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
  263. package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
  264. package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
  265. package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
  266. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
  267. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
  268. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
  269. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
  270. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
  271. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
  272. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
  273. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
  274. package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
  275. package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
  276. package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
  277. package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
  278. package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
  279. package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
  280. package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
  281. package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
  282. package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
  283. package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
  284. package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
  285. package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
  286. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +0 -88
  287. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +0 -95
  288. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +0 -334
  289. package/skills/testomatio/test-automation/automate-manual-test-cases/CLAUDE.md +0 -56
  290. package/skills/testomatio/test-automation/automate-manual-test-cases/SKILL.md +0 -242
  291. package/skills/testomatio/test-automation/automate-manual-test-cases/references/CODECEPTJS_BEST_PRACTICES.md +0 -182
  292. package/skills/testomatio/test-automation/automate-manual-test-cases/references/FINAL_SUMMARY_TEMPLATE.md +0 -22
  293. package/skills/testomatio/test-automation/automate-manual-test-cases/references/PLAYWRIGHT_BEST_PRACTICES.md +0 -90
  294. package/skills/testomatio/test-automation/automate-manual-test-cases/references/POM_BEST_PRACTICES.md +0 -53
  295. package/skills/testomatio/test-automation/automate-manual-test-cases/references/TEST_DATA_MANAGEMENT.md +0 -52
  296. package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/SKILL.md +0 -107
  297. package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/references/DEBUGGING_QUICK_REFERENCE.md +0 -113
  298. package/skills/testomatio/test-automation/qa-automation-test-consolidation/SKILL.md +0 -29
  299. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +0 -151
  300. package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
  301. package/skills/testomatio/test-automation/testomat-allure-adapter/SKILL.md +0 -289
  302. package/skills/testomatio/test-management/detect-duplicate-test-cases/SKILL.md +0 -86
  303. package/skills/testomatio/test-management/detect-duplicate-test-cases/references/DUPLICATE_INSTRUCTIONS.md +0 -54
  304. package/skills/testomatio/test-management/improve-test-cases/SKILL.md +0 -114
  305. package/skills/testomatio/test-management/improve-test-cases/references/TESTOMAT_MARKDOWN_EXAMPLE.md +0 -66
  306. package/skills/testomatio/test-management/pull-request-diff-analyzer/SKILL.md +0 -141
  307. package/skills/testomatio/test-management/qa-e2e-tests-reporting/SKILL.md +0 -354
  308. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_ARTIFACTS.md +0 -82
  309. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_HTML_REPORT.md +0 -37
  310. package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_REPORTERS_CONFIG.md +0 -118
  311. package/skills/testomatio/test-management/qa-pr-requirements-analyzer/SKILL.md +0 -149
  312. package/skills/testomatio/test-management/qa-pr-requirements-analyzer/references/summary-example.md +0 -54
  313. package/skills/testomatio/test-management/qa-requirement-reviewer/SKILL.md +0 -126
  314. package/skills/testomatio/test-management/qa-requirement-reviewer/references/requirements_reviewer_examples.md +0 -128
  315. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +0 -174
  316. package/skills/testomatio/test-management/qa-test-code-coverage/references/COVERAGE_FILE_FORMAT.md +0 -138
  317. package/skills/testomatio/test-management/qa-test-code-coverage/references/E2E_FRAMEWORKS.md +0 -65
  318. package/skills/testomatio/test-management/qa-test-code-coverage/scripts/check-coverage.mjs +0 -40
  319. package/skills/testomatio/test-management/qa-thinking/SKILL.md +0 -36
  320. package/skills/testomatio/test-management/qa-write-test-cases/SKILL.md +0 -267
  321. package/skills/testomatio/test-management/qa-write-test-cases/references/test-case-format.md +0 -387
  322. package/skills/testomatio/test-management/qa-write-test-cases/references/testomat-tms-guide.md +0 -72
  323. package/skills/testomatio/test-management/qa-write-test-cases/references/writing-rule.md +0 -159
  324. package/skills/testomatio/test-management/scan-automation-project/SKILL.md +0 -152
  325. package/skills/testomatio/test-management/sync-test-cases-with-tms/SKILL.md +0 -107
  326. package/skills/testomatio/test-management/sync-test-cases-with-tms/references/TESTOMATIO_CLI.md +0 -140
  327. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +0 -182
  328. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +0 -169
  329. package/skills.yaml +0 -21
  330. package/src/ai-debug.ts +0 -188
  331. package/src/api/agent-get.ts +0 -22
  332. package/src/api/agent-start.ts +0 -384
  333. package/src/api/client-log.ts +0 -29
  334. package/src/api/context.ts +0 -332
  335. package/src/api/debug-layout.ts +0 -47
  336. package/src/api/debug-report.ts +0 -29
  337. package/src/api/debug-snapshot.ts +0 -30
  338. package/src/api/debug-stream.ts +0 -52
  339. package/src/api/files-delete.ts +0 -184
  340. package/src/api/files-read.ts +0 -41
  341. package/src/api/files-rename.ts +0 -99
  342. package/src/api/files-tree.ts +0 -292
  343. package/src/api/files-write.ts +0 -41
  344. package/src/api/mcp.ts +0 -603
  345. package/src/api/memory.ts +0 -69
  346. package/src/api/open-external.ts +0 -39
  347. package/src/api/playwright-cli.ts +0 -606
  348. package/src/api/providers.ts +0 -457
  349. package/src/api/read-env-token.ts +0 -33
  350. package/src/api/sessions.ts +0 -79
  351. package/src/api/settings.ts +0 -120
  352. package/src/api/skills.ts +0 -58
  353. package/src/api/testomatio-attachment.ts +0 -89
  354. package/src/api/testomatio-auth.ts +0 -284
  355. package/src/api/testomatio-proxy.ts +0 -197
  356. package/src/api/testomatio-run-stats.ts +0 -81
  357. package/src/api/testomatio-target.ts +0 -225
  358. package/src/api/testomatio-transcription.ts +0 -82
  359. package/src/api/workspace-search.ts +0 -96
  360. package/src/api/workspace-sync.ts +0 -151
  361. package/src/api/workspace.ts +0 -165
  362. package/src/app-server.ts +0 -556
  363. package/src/bridge.ts +0 -251
  364. package/src/check-tests.ts +0 -156
  365. package/src/cli.ts +0 -17
  366. package/src/commands.ts +0 -244
  367. package/src/config.ts +0 -183
  368. package/src/connection.ts +0 -658
  369. package/src/context-store.ts +0 -265
  370. package/src/debug-bus.ts +0 -405
  371. package/src/extensions/tool-gate.ts +0 -220
  372. package/src/extensions/webui/ask-channel.ts +0 -52
  373. package/src/extensions/webui/index.ts +0 -184
  374. package/src/extensions/webui/tools/ask-question.ts +0 -88
  375. package/src/extensions/webui/tools/query-result.ts +0 -79
  376. package/src/extensions/webui/tools/render-chart.ts +0 -53
  377. package/src/extensions/webui/tools/render-item.ts +0 -61
  378. package/src/extensions/webui/tools/render-list.ts +0 -170
  379. package/src/extensions/webui/tools/render-result.ts +0 -85
  380. package/src/extensions/webui/tools/render-tree.ts +0 -71
  381. package/src/extensions/webui/tools/ui-widget.ts +0 -54
  382. package/src/extensions/webui/tools/widget-result.ts +0 -13
  383. package/src/extensions/webui/widget-channel.ts +0 -50
  384. package/src/file-log.ts +0 -196
  385. package/src/git-tracked.ts +0 -68
  386. package/src/gitignore.ts +0 -53
  387. package/src/json-store.ts +0 -43
  388. package/src/load-env.ts +0 -70
  389. package/src/loader-style.ts +0 -96
  390. package/src/main.ts +0 -140
  391. package/src/mcp-catalog.ts +0 -96
  392. package/src/models-catalog.ts +0 -72
  393. package/src/permissions.ts +0 -120
  394. package/src/project-dir.ts +0 -189
  395. package/src/project-info.ts +0 -108
  396. package/src/prompt/app-ui.ts +0 -59
  397. package/src/prompt/browser.ts +0 -27
  398. package/src/prompt/index.ts +0 -62
  399. package/src/server-info.ts +0 -62
  400. package/src/session-factory.ts +0 -442
  401. package/src/session-store.ts +0 -115
  402. package/src/shell-env.ts +0 -45
  403. package/src/skills.ts +0 -163
  404. package/src/sync-snapshot.ts +0 -140
  405. package/src/telemetry.ts +0 -239
  406. package/src/testomatio-auth.ts +0 -299
  407. package/src/testomatio.ts +0 -98
  408. package/src/theme.ts +0 -30
  409. package/src/user-env.ts +0 -94
  410. package/src/welcome.ts +0 -194
  411. package/src/workspace/safe-path.ts +0 -85
  412. package/src/workspace/test-md.ts +0 -70
  413. package/src/workspace-model.ts +0 -440
  414. package/testeiya.config.json +0 -14
@@ -1,120 +0,0 @@
1
- ---
2
- name: ci-fix-tests
3
- description: "Use on CI in non-interactive mode when a CodeceptJS run failed — automatically attempt safe fixes (locator drift, missing waits), rerun only the failing scenarios, compare against the baseline, roll back any edit that didn't help, and always write a markdown report at `output/ci-fix.md` for the CI step to consume. Conservative by design: no refactors, no config edits, no auth fixes, no flake-masking retries. Trigger on \"ci fix tests\", \"auto-fix failing tests\", \"attempt repair on CI\", or as a CI step after a failed run."
4
- ---
5
-
6
- # Auto-fix CodeceptJS Tests on CI
7
-
8
- A non-interactive auto-repair loop. Reads the failed-tests baseline from `output/` (where `aiTrace` left trace artifacts), attempts a small set of safe fixes, reruns only the failing scenarios, compares, and writes a report at `output/ci-fix.md`. Rolls back any edit that didn't help.
9
-
10
- **Conservative by design.** CI is not the place to restructure tests, change abstractions, or fix anything that needs human judgement. The goal is "pass the run". Anything riskier is escalated through the report.
11
-
12
- This skill assumes a working **git** checkout — rollback uses `git checkout -- <file>` to restore originals.
13
-
14
- ## Workflow
15
-
16
- ### 1. Read the baseline failures
17
- Use the **codeceptjs-run-analysis** skill against the existing `output/trace_*/` artifacts to enumerate every failing scenario. Record:
18
-
19
- - the **set** of failing tests (file path + scenario name)
20
- - the failed step in each, and the locator / wait / assertion involved
21
- - a cluster signature per failure (so unique vs systemic is clear)
22
-
23
- Save this as the **baseline** — `count`, `failing_set`, `clusters`.
24
-
25
- ### 2. Pick safe fix candidates
26
- Only attempt fixes from this allowed list:
27
-
28
- - **Locator drift** — the failed locator no longer matches anything but a similar element exists. Use the **codeceptjs-exploration** skill (headless) to find candidates; pick one with high semantic stability (ARIA `{ role, name }` → visible text → `data-testid` → composed CSS). Replace the locator at the failing step only.
29
- - **Missing wait for a spinner / loader / modal** — the failed step's ARIA snapshot shows a spinner or skeleton present, or the target element appears later. Add a single matching `I.waitFor*` immediately before the failing step.
30
- - **`I.wait(N)` replacement** — when a hardcoded sleep is the only thing between a failing assertion and a passing one and the gating element is identifiable, replace the sleep with a specific `waitFor*`.
31
-
32
- **Do not attempt:**
33
- - Auth / credential / env-var fixes — those are CI configuration, not test code.
34
- - Refactoring (extracting page objects, custom helpers, splitting scenarios).
35
- - Renaming Scenarios or tags — CI's `--grep` and pipelines reference them.
36
- - Adding `retries: N` to a Scenario — masking flake is a human decision.
37
- - Anything outside the failing test file (no `codecept.conf.*`, no helper, no PO edits).
38
-
39
- If a failure doesn't match any allowed-fix pattern, **skip it** and record it as `unresolved` for the report.
40
-
41
- ### 3. Apply edits and rerun
42
- Track every modification: file path, line number, before/after snippet, fix kind. Then rerun **only the failing scenarios** under the same config CI used:
43
-
44
- ```bash
45
- npx codeceptjs run --grep '<scenario>|<scenario>|...'
46
- ```
47
-
48
- Find the right config via `package.json` scripts or the CI workflow file. Match the worker count if `run-workers` was used originally.
49
-
50
- ### 4. Compare against the baseline
51
- Use **codeceptjs-run-analysis** again to enumerate the failing set after the fix.
52
-
53
- | New failing-set vs baseline | Status |
54
- |---|---|
55
- | Empty (zero failures) | `SUCCESS_FULL` |
56
- | Strict subset of the baseline | `SUCCESS_PARTIAL` |
57
- | Identical set | `NO_IMPROVEMENT` |
58
- | Larger, or contains a test not in baseline | `REGRESSED` |
59
-
60
- ### 5. Decide: keep or roll back
61
-
62
- - `SUCCESS_FULL` / `SUCCESS_PARTIAL` → **keep** the edits.
63
- - `NO_IMPROVEMENT` / `REGRESSED` → **roll back every edit** with `git checkout -- <files>`. The on-disk state at the end of the skill must be identical to what it was at the start.
64
-
65
- A regression is treated the same as no improvement — the attempt didn't work, the working state is what was on disk before. Don't try to "undo only the bad ones" — the whole batch goes.
66
-
67
- ### 6. Write the report (always)
68
- Write `output/ci-fix.md` regardless of outcome — CI reads it to surface results.
69
-
70
- ## Report format
71
-
72
- ```markdown
73
- # CI Fix Report — <ISO timestamp>
74
-
75
- **Status:** SUCCESS_FULL | SUCCESS_PARTIAL | NO_IMPROVEMENT | REGRESSED
76
-
77
- ## Baseline
78
- Failing scenarios: N
79
- - `tests/foo_test.js` — "user can log in"
80
- - `tests/bar_test.js` — "checkout flow"
81
- - ...
82
-
83
- ## Attempted fixes
84
- - `tests/foo_test.js:42` — locator drift: `'Save'` → `{ role: 'button', name: 'Save' }`
85
- - `tests/bar_test.js:15` — added `I.waitForInvisible('.spinner')` before checkout click
86
- - `tests/baz_test.js:7` — replaced `I.wait(3)` with `I.waitForVisible('.confirmation-dialog', 10)`
87
-
88
- ## Result
89
- Failing scenarios after fix: M (was N)
90
- - Resolved: `tests/foo_test.js` — "user can log in"
91
- - Still failing: `tests/bar_test.js` — "checkout flow"
92
- - New failures (REGRESSED only): `tests/baz_test.js` — "edit profile"
93
-
94
- ## Failure clusters (NO_IMPROVEMENT / REGRESSED only)
95
- - **Cluster A (3 scenarios)** — `Element not found: button.btn-primary`. Likely a deploy regression or design change.
96
- - **Cluster B (1 scenario)** — `Navigation timeout to /checkout`. Possible backend issue.
97
-
98
- ## Discarded changes (NO_IMPROVEMENT / REGRESSED only)
99
- - `tests/foo_test.js` — restored
100
- - `tests/bar_test.js` — restored
101
- - `tests/baz_test.js` — restored
102
- ```
103
-
104
- The first line of `Status:` is the machine-parseable signal. The rest is for the human reading the failed CI build.
105
-
106
- ## Things to avoid
107
-
108
- - Editing files outside the failing test files. Config, helpers, page objects, and CI workflows are off-limits in this mode.
109
- - Attempting more than one fix kind on the same scenario in one pass. Fix one thing, observe, then try another.
110
- - `retries: N` to mask flakiness — human decision.
111
- - Skipping rollback on `NO_IMPROVEMENT`. Even no-op edits can confuse the next run or the next reviewer.
112
- - Writing a partial or missing `output/ci-fix.md`. CI depends on it; the absence of a report is itself a failure mode.
113
- - Running the **whole** suite for the verification step — only the originally-failing scenarios, to keep CI time bounded.
114
-
115
- ## Pointers
116
-
117
- - `codeceptjs-run-analysis` — read trace artifacts, cluster failures, build the baseline set.
118
- - `codeceptjs-exploration` — find replacement locators when one has drifted.
119
- - `codeceptjs-fundamentals` — confirm helper, config, which env the CI run used.
120
- - `node_modules/codeceptjs/docs/aitrace.md` — trace format.
@@ -1,158 +0,0 @@
1
- ---
2
- name: codeceptjs-auth
3
- description: Use when a CodeceptJS test needs login, when different user roles are involved, or when the writing-codeceptjs-tests skill identifies authorization is required. Configures the `auth` plugin for session reuse, derives the login flow from the actual login page HTML (not guesses), keeps the real flow inside `steps_file.js` so `I.login*()` is callable directly and the conf stays small, loads credentials from a `.env` file via the modern Node `process.loadEnvFile()` API (no `dotenv` dependency), and supports multiple roles. Trigger on mentions of login, sign-in, sign-up, authentication, sessions, "logged in", admin/editor/user roles, or auth-related test failures.
4
- ---
5
-
6
- # CodeceptJS Auth Plugin
7
-
8
- The `auth` plugin logs each user in once, captures cookies (or local-storage / token via overrides), and restores the session for subsequent tests. Stale sessions trigger a fresh login automatically.
9
-
10
- Source of truth: `node_modules/codeceptjs/lib/plugin/auth.js` — JSDoc lists every recipe. Reference doc: `node_modules/codeceptjs/docs/auth.md`.
11
-
12
- ## When to add it
13
-
14
- Suggested if tests have repeatable authentication and session is needed to be persisted accross tests. Also optimizes start time of tests by saving previous sessision cookies in files.
15
-
16
- Suggested as performance optimization, refactoring measure.
17
-
18
- If `auth` plugin already exists in the project (check fundamentals' output), reuse the existing `inject` name and user keys.
19
-
20
- ## Decide first — ask the user
21
-
22
- Four answers shape the plugin. Don't guess any. If the project or test plan doesn't make them obvious, ASK.
23
-
24
- 1. **Is a session needed at all?** Public flows (landing, signup) don't need one — skip the plugin.
25
- 2. **One user or many?** Default to one. Add more only when more than one is actually exercised.
26
- 3. **If many — what splits them?** Don't assume "admin / editor / viewer". Real systems split users by role, workspace / tenant, plan tier, sign-in provider (Google vs SSO vs password — same person), or per-test fixture. ASK the user; use the answer to name the `users.<key>` entries.
27
- 4. **What's the auth type?** Form login is the default; others need a different `login()` body:
28
- - **Form** — `fillField` → `click Sign in`. Canonical shape below.
29
- - **OAuth / SSO** — click provider button, drive the IdP page (often a separate origin).
30
- - **Magic link / passwordless** — UI flow is rarely worth automating. Prefer a backdoor — API mint, or read the link from a test mailbox.
31
- - **API token** — skip the form; `I.executeScript` to write the token into `localStorage`, or `I.setCookie(...)`.
32
- - **2FA / OTP** — `async login`; fetch the code from a test mailbox / backdoor before submitting.
33
-
34
- ## Rules
35
-
36
- 1. **Login flow must not be written in the conf.** Better to place it nto steps_file.js (if it is includded) or page object. The conf better to reference it like: `login: (I) => I.login()`.
37
- 2. **Credentials should not be stored in configs. Use `.env` via `process.loadEnvFile()`** (modern Node, no `dotenv` package). Passwords wrapped with `secret(...)`. No literal credentials anywhere — conf, steps file, test, or git history.
38
- 3. **`.env` is gitignored; `.env.example` is committed** with the var names and no values. `output/*_session.json` is gitignored too.
39
-
40
- ## Canonical shape
41
-
42
- ```js
43
- // codecept.conf.js — first line of the file
44
- process.loadEnvFile() // or dotenv.load() if this package availble
45
- // ...
46
-
47
- export const config = {
48
- // ...
49
- include: { I: './steps_file.js' },
50
- plugins: {
51
- auth: {
52
- enabled: true,
53
- saveToFile: true,
54
- users: {
55
- admin: {
56
- login: (I) => I.login(),
57
- check: (I) => I.see('Welcome, User', '.navbar'),
58
- },
59
- },
60
- },
61
- },
62
- }
63
- ```
64
-
65
- ```js
66
- // steps_file.js
67
- import { secret } from 'codeceptjs'
68
- const { I } = inject()
69
-
70
- export default function () {
71
- return actor({
72
- login() {
73
- I.amOnPage('/login')
74
- I.fillField('Email', process.env.ADMIN_EMAIL)
75
- I.fillField('Password', secret(process.env.ADMIN_PASSWORD))
76
- I.click('Sign in')
77
- },
78
- })
79
- }
80
- ```
81
-
82
- ```
83
- # .env (gitignored) # .env.example (committed)
84
- USER_EMAIL=USER@example.com USER_EMAIL=
85
- USER_PASSWORD=<secret> USER_PASSWORD=
86
- ```
87
-
88
- ## Pre-flight (before writing config)
89
-
90
- 1. **Read the real login page HTML.** Don't guess locators. MCP: `run_code` to login page and inspect the ARIA snapshot. Field labels / `name` / `id` / submit control — from the actual page. It's ok to ask user about authorization if it is not clear how to makeit.
91
- 2. **Pick a role-specific post-login marker.** Something the page renders only for *this* user (navbar username, `data-user-role`).
92
- 3. **Confirm session storage.** Cookies (default) for server-rendered apps; `localStorage`/`sessionStorage` for SPAs — verify with `I.executeScript(() => Object.keys(localStorage))` after a manual login. Default cookie `fetch`/`restore` silently no-op for token storage.
93
-
94
- ## Verify
95
-
96
- Or MCP `run_test` against a one-Scenario file that calls `login(<role>)` then asserts on the post-login marker.
97
-
98
- Enable `saveToFile: true` only after the verification round-trip succeeds — a bad saved session masks a broken `login`.
99
-
100
- ## Refactor
101
-
102
- Add to before hooks (if applied to all tests in suite) or to exact tests in syute
103
-
104
- `Before(({ login }) => login())`
105
-
106
- `login` was declared in auth plugin configuration
107
-
108
- Run real, not dry:
109
-
110
- ```bash
111
- npx codeceptjs run --grep '<scenario>' --debug
112
- ```
113
-
114
-
115
- ## Multi-session shape
116
-
117
- Only after question 3 is answered. Name `users.<key>` after whatever splits them in *this* system; one matching login method per key in `steps_file.js`.
118
-
119
- ```js
120
- // keys named after the dimension (role / workspace / provider / …)
121
- users: {
122
- admin: { login: (I) => I.loginAsAdmin() },
123
- workspaceB: { login: (I) => I.loginToWorkspaceB() },
124
- }
125
- ```
126
-
127
- Don't parameterise into a single `login(key)` — the plugin keys sessions by name and explicit methods read better. Switching between sessions in one Scenario: `session('<key>')` opens a separate browser context (see `node_modules/codeceptjs/docs/sessions.md`).
128
-
129
- ## Token / local-storage auth
130
-
131
- When sessions live outside cookies, override `fetch` and `restore`:
132
-
133
- ```js
134
- admin: {
135
- login: (I) => I.loginAsAdmin(),
136
- check: (I) => I.see('Admin', '.navbar'),
137
- fetch: (I) => I.executeScript(() => localStorage.getItem('session_id')),
138
- restore: (I, session) => {
139
- I.amOnPage('/')
140
- I.executeScript((s) => localStorage.setItem('session_id', s), session)
141
- },
142
- }
143
- ```
144
-
145
- `check(I, session)` receives whatever `fetch` returned — throw inside `check` to force a fresh login (e.g., when a `/me` endpoint shows the wrong user).
146
-
147
- ## Common pitfalls
148
-
149
- - **Credentials inlined in conf or test.** Always env-driven. A code review showing a literal email or password = skill failed.
150
- - **Forgetting to gitignore `.env` and `output/*_session.json`.** Both leak credentials.
151
-
152
-
153
- ## Pointers
154
-
155
- - `node_modules/codeceptjs/lib/plugin/auth.js` — JSDoc recipes (cookie / multi-user / local-storage / async / session-validation)
156
- - `node_modules/codeceptjs/docs/auth.md` — full reference
157
- - `node_modules/codeceptjs/docs/sessions.md` — `session()` for multi-user Scenarios
158
- - `node_modules/codeceptjs/docs/secrets.md` — the `secret()` wrapper
@@ -1,91 +0,0 @@
1
- ---
2
- name: codeceptjs-exploration
3
- description: Use to explore a page in CodeceptJS — read its ARIA tree, inspect candidate elements, pick a stable locator. Drives the live browser through MCP `run_code`, prefers ARIA over HTML, uses `I.grabWebElement` / `I.grabWebElements` with permissive XPaths to enumerate candidates and `toSimplifiedHTML` / `toAbsoluteXPath` to disambiguate. Other skills (`writing-codeceptjs-tests`, `debugging-codeceptjs-tests`, `refactoring-codeceptjs-tests`) invoke this whenever they need to learn what's on a page.
4
- ---
5
-
6
- # CodeceptJS Page Exploration
7
-
8
- Authoring a test, debugging a failure, and refactoring a stale locator all share one task: open a page, find the right element, pick a stable locator. This skill is the playbook.
9
-
10
- ## How to look at a page
11
-
12
- Drive everything through MCP. Two tools matter for exploration:
13
-
14
- - **`run_code`** — runs CodeceptJS code and returns the value the code produced, captures `console.*` output, and saves a final-state snapshot. Use when you want to *do something and look at the result* (try a locator, grab a value, navigate).
15
- - **`snapshot`** — captures the current state without performing any action: URL, cookies, localStorage, HTML, ARIA, screenshot, console. Use when you want to look at "what's on the page right now" between two actions, without re-running anything.
16
-
17
- Three artifact sources, in order of preference:
18
-
19
- 1. **ARIA snapshot first.** Structured, free of styling noise, easy to scan for duplicates and accessibility names.
20
- 2. **Screenshot.** Visual confirmation — catches layout breaks, missing icons, "rendered but wrong" cases that ARIA can't show.
21
- 3. **HTML / outer markup.** Pull only when ARIA is missing crucial context: custom widgets without accessible names, attribute-driven behaviour, dynamic content with no roles.
22
-
23
- ## Inspect a known element
24
-
25
- `I.grabWebElement(locator)` returns one WebElement; `I.grabWebElements(locator)` returns an array. Same cross-helper API on Playwright / Puppeteer / WebDriver, returns values back through MCP `run_code`.
26
-
27
- | You want to … | Method on WebElement |
28
- |---|---|
29
- | Confirm rendered / visible / enabled | `exists()`, `isVisible()`, `isEnabled()` |
30
- | Read text / value / attribute / property | `getText()`, `getValue()`, `getAttribute(n)`, `getProperty(n)` |
31
- | Where is it on the page | `getBoundingBox()` — flags offscreen / zero-sized |
32
- | The actual rendered markup | `toOuterHTML()`, `toSimplifiedHTML(300)` (truncated, MCP-friendly) |
33
- | Stable selector for a fix | `toAbsoluteXPath()` |
34
- | Look inside an iframe | `inIframe(async (body) => { ... })` |
35
- | Drill into children | `$(loc)`, `$$(loc)` |
36
- | Run a browser-side function | `evaluate(fn, ...args)` |
37
-
38
- ## Discover candidates when the obvious locator misses
39
-
40
- When `Edit` matches nothing, the control might say "Change", carry `aria-label="Edit user"`, or live in a `.btn-edit` class. Cast a wide net: pass a permissive XPath to `I.grabWebElements`, then disambiguate.
41
-
42
- Build the XPath by ORing:
43
- - visible text — `text()` (or `.` to match descendants too)
44
- - relevant attributes — `@class`, `@aria-label`, `@title`, `@data-action`, `@id`
45
- - **synonyms** — "edit" / "change" / "modify"; "delete" / "remove" / "trash"; "submit" / "send" / "save"
46
-
47
- Wrap each match with `translate(...)` for case-insensitive `contains`:
48
-
49
- ```
50
- //*[contains(translate(., 'EDIT', 'edit'), 'edit')
51
- or contains(translate(@class, 'EDIT', 'edit'), 'edit')
52
- or contains(translate(@aria-label, 'EDIT', 'edit'), 'edit')
53
- or contains(translate(., 'CHANGE', 'change'), 'change')]
54
- ```
55
-
56
- Then iterate `toSimplifiedHTML(150)` over the result, review the candidates, pick the right one, and commit a stable locator built from its discriminating attribute or text — or `toAbsoluteXPath()` if nothing else is stable.
57
-
58
- ## Pick a stable locator
59
-
60
- Once the right element is identified, choose the locator with the highest semantic value that is still unique:
61
-
62
- 1. ARIA — `{ role: 'button', name: 'Edit user' }`. Survives CSS refactors.
63
- 2. Visible label / semantic text — `'Edit user'`. Easy to read.
64
- 3. `[data-testid="edit-user"]` if the team uses test attributes.
65
- 4. Composed CSS with a stable parent — `#user-row-42 button.edit`.
66
- 5. `toAbsoluteXPath()` from the candidate review — last resort; flag for the team to add a `data-testid`.
67
-
68
- Don't commit a locator you didn't verify. After picking, run `I.seeElement(<locator>)` (or `grabWebElement(<locator>)`) through MCP `run_code` to confirm it matches exactly one element.
69
-
70
- ## Common patterns
71
-
72
- - **Strict mode found 2 matches** — `grabWebElements('Save')`, `toSimplifiedHTML(200)` each, find a discriminator (parent class, `data-*`, surrounding text).
73
- - **Button rendered but doesn't act** — `grabWebElement('Submit')`, then `isEnabled()` + `getBoundingBox()` — disabled? offscreen? zero-sized?
74
- - **Wrong row in a list** — `grabWebElements('.user-row')`, `getText()` per row, identify, then `getAttribute('data-id')` for a stable hook.
75
- - **Inside an iframe** — `(await I.grabWebElement('iframe.editor')).inIframe(async (body) => body.$('button'))`.
76
- - **No semantic name on the element** — `toAbsoluteXPath()` for now; flag the team to add a `data-testid`.
77
-
78
- ## Things to avoid
79
-
80
- - Choosing a locator without seeing the candidates first — you'll guess wrong and the test will be flaky.
81
- - Committing `toAbsoluteXPath()` when a semantic locator is right there.
82
- - Ignoring the screenshot — "element exists in HTML" doesn't mean "user can see it".
83
- - Reaching for `usePlaywrightTo` / `useWebDriverTo` when WebElement methods cover the case (cross-helper code is preferred).
84
-
85
- ## Pointers
86
-
87
- - `node_modules/codeceptjs/docs/web-element.md` — full WebElement API
88
- - `node_modules/codeceptjs/docs/locators.md` — locator strategies and priorities
89
- - `node_modules/codeceptjs/docs/element-selection.md` — `step.opts({ elementIndex })`, strict mode
90
- - `node_modules/codeceptjs/docs/mcp.md` — MCP tool list
91
- - `codeceptjs-fundamentals` skill — locator priority and the `await` rule
@@ -1,158 +0,0 @@
1
- ---
2
- name: codeceptjs-fundamentals
3
- description: "Run first when working with any CodeceptJS 4 project. Compact primer on the internals you must know — configuration, the `I` actor and helpers, the DI container and `inject()`, custom helpers (and the rule that `I` is unreachable from inside one), plugins as hook listeners, and the `await` rule. Then runs a four-step discovery against this project: `codeceptjs check` to verify the setup loads, read the config, run `codeceptjs list` to enumerate available `I.*` actions, run `codeceptjs dry-run` to enumerate existing tests — and reports which helper, plugins, env switching, page objects, custom actions, and test suites are actually active. Other CodeceptJS skills depend on this output."
4
- ---
5
-
6
- # CodeceptJS Fundamentals
7
-
8
- Two jobs: teach the concepts you need to read CodeceptJS code without making things up, and report what *this* project has configured. Do both, in order.
9
-
10
- ---
11
-
12
- ## Concepts
13
-
14
- ### Module system
15
- CodeceptJS 4 is **ESM and TypeScript only**. Tests, configs, page objects, and helpers use `import`/`export`; `package.json` **must** have `"type": "module"` — if it isn't there yet, add it before doing anything else (without it, every `.js` file is parsed as CommonJS and imports fail). **TypeScript** is first-class: name the config `codecept.conf.ts`, add a loader entry like `require: ['tsx/cjs']` (or `ts-node/register`), and write tests as `.ts` files.
16
-
17
- If the project is on **CodeceptJS 3.x or still uses CommonJS** (`require()` / `module.exports`, no `"type": "module"`, removed helpers/plugins like `autoLogin` or `Nightmare`), stop here and run the **`migrate-codeceptjs-4`** skill — it walks the full upgrade path (Node bump, ESM conversion, helper/plugin replacements, AI/Zod/effects API changes, `noGlobals`, dependency bumps, verify). Don't try to half-fix individual files; the migration is a whole-project change.
18
-
19
- ### Configuration
20
- `codecept.conf.{js,ts,mjs,cjs}` at the repo root. Top-level keys: `helpers`, `plugins`, `include`, `ai`, `bootstrap`/`teardown`, `tests`, `output`, `timeout`. TypeScript configs declare a loader in `require: [...]` (`tsx/cjs`, `ts-node/register`, `ts-node/esm`). Multiple env-specific files (`codecept.ci.conf.js`, …) are selected via `--config <file>`. The `@codeceptjs/configure` package mutates the resolved config at load time (`setHeadlessWhen`, `setBrowser`, `setCommonPlugins`, `setWindowSize`) — static fields can lie until you grep for that import.
21
-
22
- ### `I` and helpers
23
- `I` is the actor. Every `I.<method>(...)` is dispatched to whichever active helper provides that method. Built-in helpers contribute different surfaces: web (Playwright, Puppeteer, WebDriver — overlapping core actions plus helper-specific extras), API (REST, GraphQL), AI, mobile (Appium), utility (FileSystem). The active helpers are exactly the keys under `helpers` in config.
24
-
25
- ### `inject()` and the DI container
26
- Everything testable lives in a global container — the actor, every helper, every page object listed in `include`, every custom step module, every support object. Inside a Scenario you destructure from the test signature: `Scenario('...', ({ I, loginPage }) => { ... })`. Inside a *file* (page object class, data factory, custom helper module) call `const { I } = inject()` once at the top to pull what you need from the container. The names available are exactly the keys in `include`.
27
-
28
- ### Custom helpers
29
- Custom helpers extend `Helper` (from `codeceptjs`) and contribute new `I.<method>` calls. They register under `helpers` in config alongside built-ins. **You cannot call `I.*` from inside a custom helper — `I` does not exist in helper scope.** To compose with another helper, reach for it via `this.helpers['<Name>']` (e.g. `this.helpers['Playwright'].page` or `this.helpers['REST'].sendGetRequest(...)`). Helpers exist to expose new low-level capabilities; tests stay in the `I.*` vocabulary.
30
-
31
- ### Plugins and hooks
32
- Plugins are event listeners. CodeceptJS emits lifecycle events on a global dispatcher; any plugin can subscribe. Events include `suite.before`/`after`, `test.before`/`started`/`passed`/`failed`/`after`, `step.before`/`started`/`passed`/`failed`/`after`, `hook.passed`/`failed`, `multiple.before`/`after`. Plugins react — taking screenshots, retrying, healing, writing artifacts, pausing. Built-ins live under `node_modules/codeceptjs/lib/plugin/`; the full event list is in `node_modules/codeceptjs/lib/event.js`. A plugin is registered under `plugins` with `enabled: true`. `setCommonPlugins()` from `@codeceptjs/configure` enables a recommended bundle silently.
33
-
34
- ### Plugins worth knowing
35
- - `retryFailedStep` — re-runs a transient action failure
36
- - `screenshot` — saves a screenshot when a step matches the trigger (default `on: 'fail'`); set `slides: true` to also produce a `output/records.html` slideshow (replaces the old `stepByStepReport`)
37
- - `pageInfo` — dumps URL, HTML, console output on failure
38
- - `auth` — session reuse for login (see the `codeceptjs-auth` skill)
39
- - `aiTrace` — per-step screenshots/HTML/ARIA/console for AI debugging (default `on: 'step'`; set `on: 'fail'` to capture only failures)
40
- - `pause` — interactive pause (replaces `pauseOn` / `pauseOnFail`; default `on: 'fail'`)
41
- - `heal` — AI-suggested fixes for broken action steps (disabled in `--debug` mode)
42
- - `screencast` — records a video / animated frames of the run (replaces `subtitles`)
43
- - `browser` — CLI-only override of browser helper config; see the next section
44
-
45
- ### Running plugins from the CLI
46
- Plugins are normally enabled in `codecept.conf.{js,ts}`, but any plugin can be turned on or reconfigured for a single run via `-p <plugin>` on the runner. Args chain with `:` (or `;` inside one arg):
47
-
48
- ```bash
49
- npx codeceptjs run -p aiTrace # enable aiTrace for this run
50
- npx codeceptjs run -p screenshot:on=step # screenshot every step
51
- npx codeceptjs run -p pause:on=file:path=tests/login_test.js;line=43
52
- npx codeceptjs run -p browser:hide:browser=firefox:windowSize=1280x800
53
- ```
54
-
55
- `screenshot`, `pause`, `aiTrace`, and `heal` share a unified **`on=` parameter** that picks when they fire:
56
-
57
- | `on=` value | Fires when | Extra args |
58
- |---|---|---|
59
- | `fail` | a step fails (default for screenshot / pause / heal) | — |
60
- | `step` | every step (default for aiTrace) | — |
61
- | `test` | after each test | — |
62
- | `file` | execution reaches a file/line | `path=<file>[;line=<N>]` |
63
- | `url` | browser URL matches a pattern | `pattern=<glob>` (`*` wildcards) |
64
-
65
- The **`browser` plugin** is CLI-only and overrides the active browser helper without touching the config file — useful for one-off env variants and CI matrix legs:
66
-
67
- ```bash
68
- npx codeceptjs run -p browser:show # force visible
69
- npx codeceptjs run -p browser:hide # force headless
70
- npx codeceptjs run -p browser:browser=firefox # switch browser
71
- npx codeceptjs run -p browser:windowSize=1024x768
72
- npx codeceptjs run -p browser:hide:browser=webkit:windowSize=800x600
73
- ```
74
-
75
- Requires `@codeceptjs/configure` installed. It translates `browser=` per helper (Puppeteer's `product`, Playwright's `browser`) and injects `--headless` into WebDriver capability args when toggling `hide`.
76
-
77
- ### Test file structure
78
- One `Feature(...)` per file with one or more `Scenario(...)` blocks inside it. CodeceptJS does **not** allow nested suites or multiple Features in the same file. Hooks: `Before`, `After`, `BeforeSuite`, `AfterSuite`, plus `Fail((test, err) => { ... })` for failure-only cleanup. Page objects can expose `_before`, `_after`, `_afterSuite` lifecycle methods so per-page setup lives next to the page.
79
-
80
- ### Locators
81
- Most actions accept a locator as a plain string (semantic — visible text, label, placeholder, `name`) or an object (`{ css }`, `{ xpath }`, `{ role, name }`, `{ id }`, `{ aria }`). Prefer ARIA `{ role, name }` for resilience to markup changes; semantic strings for prototyping; CSS / XPath as fallback. The `locate(...)` builder composes complex queries (`.withClass`, `.withText`, `.inside`, `.and`, `.andNot`). Almost every action method takes an optional context arg that narrows the search to a subtree: `I.click('Save', '.modal')`.
82
-
83
- ### Auto-waiting
84
- Action methods (`click`, `fillField`, `selectOption`, …) automatically wait for the element to exist and become interactable before acting. Explicit `I.waitFor*` calls are needed only when the next condition isn't tied to an interaction — a modal appearing after a network call, a spinner disappearing, a value updating. Avoid `I.wait(N)` (raw seconds) unless nothing else fits.
85
-
86
- ### Assertions
87
- CodeceptJS ships built-in browser assertions: `I.see`, `I.dontSee`, `I.seeElement`, `I.dontSeeElement`, `I.seeInCurrentUrl`, `I.seeInTitle`, `I.seeInField`, `I.seeNumberOfElements`, `I.seeCookie`, `I.seeCheckboxIsChecked`, etc. Use these instead of an external `expect()` library — they produce clear failure messages and integrate with the recorder. For non-DOM assertions, use `grab*` plus any assertion library: `const title = await I.grabTitle(); expect(title).toEqual('My App')`.
88
-
89
- ### `await` inside tests
90
- CodeceptJS queues steps onto an internal recorder; the framework chains them, you do not. **Use `await` only when you need a return value** — `await I.grabTextFrom(...)`, `await I.grabCookie(...)`, or when calling a user-defined `async` function. Plain action steps (`I.click`, `I.fillField`, `I.see`) do not need `await`. Same rule inside `within(...)` and `pause()` callbacks. Sprinkling unnecessary `await` doesn't break anything, but signals you don't trust the recorder.
91
-
92
- ### `secret()` for sensitive values
93
- Wrap passwords, tokens, API keys so they're masked in logs, step output, and trace artifacts: `I.fillField('Password', secret(process.env.PASSWORD))`. Imported from `codeceptjs`. Use anywhere a value would otherwise leak through verbose output, trace files, or AI prompts.
94
-
95
- ### Sessions and `within`
96
- - `session(name, fn)` runs `fn` in a parallel browser context — for multi-user Scenarios (chat, multi-tenant). Combined with the `auth` plugin, each session can log in as a different role.
97
- - `within(locator, fn)` scopes locator resolution inside `fn` to the subtree under `locator`. `within({ frame: '#editor' }, fn)` switches into an iframe for the callback. Both can return values (`await within(..., () => I.grabTextFrom(...))`).
98
-
99
- ### Parallel runs
100
- `npx codeceptjs run-workers <N>` splits Scenarios across N Node worker threads; results aggregate in the main process. The config can also describe **profiles** (different browsers, viewports, environments) via the `multiple` block; launch with `npx codeceptjs run-multiple <profile>`.
101
-
102
- ---
103
-
104
- ## Discover this project
105
-
106
- Four steps, in order. Don't skip — guesses about helpers, custom actions, or what tests exist will be wrong as often as they're right.
107
-
108
- ### 1. Verify the setup loads
109
-
110
- ```sh
111
- npx codeceptjs check -c <config> # validates config, container, helpers, plugins, page objects, hooks, tests, defs
112
- ```
113
-
114
- Each item prints a pass/fail line, so the output doubles as a quick inventory of what the project has wired up. If anything fails here, fix it before running `list` or `dry-run` — a broken helper or unresolved page object will distort their output. Skipping this step also means you won't notice a missing dependency, an `auth` plugin pointed at a non-existent login route, or a custom helper that throws at construction.
115
-
116
- ### 2. Read the active config
117
-
118
- Open `codecept.conf.{js,ts,mjs,cjs}` (resolve via `package.json` scripts and CI workflows if multiple files exist — note the path; you'll pass it to `-c` in steps 3 and 4). Extract: which helper(s) and any non-default behaviour (browser, strict, navigation, base URL, viewport, env-driven values); which plugins (incl. anything `setCommonPlugins()` injects); AI provider + the env var its key requires; how environments are selected (`--config` vs `process.env.*` branching, plus any `setHeadlessWhen`-style mutations); page object names from `include`; any custom helpers (entries pointing at local files).
119
-
120
- ### 3. List available actions
121
-
122
- ```sh
123
- npx codeceptjs list -c <config> # every I.<method>, grouped by helper, with signature
124
- npx codeceptjs list --docs -c <config> # adds JSDoc + docs/webapi/* prose under each action
125
- npx codeceptjs list --action <name> -c <config> # single action; I. prefix optional; implies --docs
126
- ```
127
-
128
- Run `list` against the discovered config before suggesting any method — especially in projects with custom helpers, where the available `I.*` surface differs from the built-in catalog. The CodeceptJS MCP server's `list_actions` tool returns the same data programmatically.
129
-
130
- ### 4. List existing tests
131
-
132
- ```sh
133
- npx codeceptjs dry-run -c <config> # suite + test names that the config would load
134
- npx codeceptjs dry-run --steps -c <config> # also prints queued I.* steps inside each test
135
- npx codeceptjs dry-run --grep "@smoke" -c <config> # filter by name; --features / --tests narrow file kind
136
- npx codeceptjs dry-run --debug --grep '<test>' --numbers --no-ansi -c <config> # numbered steps, no ANSI
137
- ```
138
-
139
- `dry-run` walks the test files the active config picks up and prints them without executing — confirming both **which tests exist** and (with `--steps`) **what each Scenario would do** before any browser spins up.
140
-
141
- `--numbers` (paired with `--debug`, `--steps`, or `--verbose`) prefixes each leaf step with a per-test 1-based index. The numbering matches the `pauseAt: N` parameter on the MCP `run_test` tool — so this is the canonical way to discover step indices for programmatic breakpoints. `--no-ansi` strips colors / ANSI escapes so the output is clean for LLM consumption or piping to other tools.
142
-
143
- For Gherkin step definitions specifically, `npx codeceptjs gherkin:steps -c <config>` lists registered step patterns.
144
-
145
- ## Report
146
-
147
- Short prose summary covering the items above. Flag env-driven values explicitly — don't claim a fixed value when it's `process.env.BROWSER || 'chromium'`. Flag conflicts (static `show: true` overridden by `setHeadlessWhen(CI)`; `auth` configured but the credential env vars are missing from the current shell or `.env.example`). If no config exists at the repo root and no `--config` is referenced anywhere, recommend `npx codeceptjs init .` and stop. **If the project is on CodeceptJS 3.x or CommonJS, recommend the `migrate-codeceptjs-4` skill and stop** — discovery output for a pre-4 project will misrepresent the available APIs.
148
-
149
- ## Pointers
150
-
151
- - `node_modules/codeceptjs/docs/configuration.md` — config reference
152
- - `node_modules/codeceptjs/docs/typescript.md` — TS loader options
153
- - `node_modules/codeceptjs/docs/helpers.md` — helper concepts and method catalogs
154
- - `node_modules/codeceptjs/docs/custom-helpers.md` — writing your own
155
- - `node_modules/codeceptjs/docs/plugins.md` — plugin authoring + built-ins
156
- - `node_modules/codeceptjs/docs/hooks.md` — suite/test/step hook semantics
157
- - `node_modules/codeceptjs/lib/event.js` — every event the dispatcher emits
158
- - `@codeceptjs/configure` (npm) — the mutator API surface
@@ -1,90 +0,0 @@
1
- ---
2
- name: codeceptjs-run-analysis
3
- description: Use after running CodeceptJS tests with the `aiTrace` plugin enabled — analyse the trace artifacts (trace.md, per-step HTML/ARIA/screenshots, console logs) via bash tools. Toolkit, not a workflow — use cases include verifying a fix, clustering errors across a CI fail-storm, diagnosing flakiness across reruns, or investigating a single failure. Other skills (`writing-codeceptjs-tests`, `debugging-codeceptjs-tests`, `refactoring-codeceptjs-tests`) invoke this whenever a run has happened and needs to be reviewed. Trigger on phrases like "what failed", "analyse the run", "cluster these errors", "is it flaky", "did the fix hold".
4
- ---
5
-
6
- # CodeceptJS Run Analysis
7
-
8
- After `npx codeceptjs run`, the trace artifacts land in `output/`. This skill is the playbook for reading them efficiently — pulling out the right step, the right file, and the right slice of a giant HTML snapshot using bash tools rather than re-running the test through MCP.
9
-
10
- There's no single end goal — pick the use case that matches the situation. The foundations (where artifacts live, how to read them, what tools to reach for) apply to all of them.
11
-
12
- ## Foundations
13
-
14
- ### Ensure aiTrace is on
15
- The whole skill leans on `output/trace_<TestName>_<hash>/trace.md` and its sibling artifacts. Confirm `plugins: { aiTrace: { enabled: true } }` in the active config (run `codeceptjs-fundamentals` if you don't already know). Without aiTrace there are screenshots and `pageInfo` dumps at most — useful but partial; suggest enabling and re-running before deep analysis.
16
-
17
- The MCP `run_step_by_step` tool is now interactive (pauses after every step; agent advances via `continue`) and no longer auto-writes a per-run artifact bundle. `aiTrace` is the only source of per-step trace files now — for ad-hoc `run_code` and `snapshot` calls you still get a single-shot artifact set under `output/trace_run_code_*` / `output/snapshot_*`.
18
-
19
- ### Locate traces
20
- Trace directories are `output/trace_<TestName>_<short-hash>/`; reruns produce a new dir per run. **When the right trace isn't obvious, sort by modification time and take the most recent** (`ls -dt`) — almost always the run you just kicked off.
21
-
22
- ### Read trace.md first
23
- trace.md is the index — each step block links to its screenshot/HTML/ARIA/console. **Focus on the step marked failed; if no failure is explicitly marked, jump to the last step in the trace** — execution usually stops where the failure happened. When more than one step shows failed, the **first** is usually the cause; the rest are cascading side effects.
24
-
25
- ### Open artifacts in the right order
26
- For the focus step `NNNN_<step>`:
27
-
28
- | Artifact | When |
29
- |---|---|
30
- | `NNNN_*_aria.txt` | First read — leaner than HTML, structured, easy to scan for duplicates |
31
- | `NNNN_*_screenshot.png` | Visual confirmation — layout, animation, "rendered but wrong" |
32
- | `NNNN_*_page.html` | Only when ARIA is missing context. **Use `grep`, not `cat`** |
33
- | `NNNN_*_console.json` | JS errors, 4xx/5xx, deprecation warnings explaining "vanished" elements |
34
- | `NNNN_*_storage.json` | Cookies + localStorage at this step. First place to look when auth is the suspected culprit. |
35
-
36
- ### Never read big files whole
37
- HTML snapshots can be megabytes; `console.json` arrays can be long.
38
-
39
- - Use `grep` to search HTML for expected elements / attributes / locator variants (text, class, aria-label, `data-*`). Line numbers and context flags make the match readable.
40
- - Use `jq` to filter `console.json` for errors or specific event types instead of reading every entry.
41
- - When scanning many files, `grep -l` returns filenames-only.
42
-
43
- ## Use cases
44
-
45
- ### Verify a fix held
46
- After editing a test (e.g. via MCP) and re-running it via CLI: locate the latest trace, read trace.md, confirm no FAILED markers. Glance at `console.json` for warnings worth fixing while you're there.
47
-
48
- ### Cluster errors across a CI batch
49
- When many tests failed in one run: extract the failing-step lines from every `trace.md` in the batch, group by signature (`grep` + `sort` + `uniq -c`), rank by frequency.
50
-
51
- - **Same error in many tests = systemic.** Env var missing, auth broken, base URL wrong, deploy regression. Fix the root cause once and rerun the batch.
52
- - **Different errors per test = local issues.** Triage one at a time.
53
-
54
- Pick the most-frequent root cause first; rerun to see how many tests came back along with it.
55
-
56
- ### Diagnose flakiness across reruns
57
- Run the same test 5–10 times. Extract which step failed in each trace and look at how the answer varies. If the failing step is the *same* but the surrounding state differs, `diff` the ARIA snapshots at that step between two runs to spot what changed.
58
-
59
- - **Different step each run** → timing, environment, external service.
60
- - **Same step, different reason** → likely a missing or wrong wait (see Waiting in writing/debug skills).
61
- - **`console.json` differs between runs** → transient backend / network errors.
62
- - **Bounding box differs** → layout reflow or late-loading content shifting things.
63
-
64
- ### Investigate a single failure
65
- Locate the trace, jump to the failed-or-last step, open ARIA + screenshot first, console.json second, HTML last (and only via `grep`). Form a hypothesis. If the trace alone isn't enough — the failure resists static analysis or the page state needs live poking — hand off to **debugging-codeceptjs-tests** for the MCP-driven loop.
66
-
67
- ## After the analysis
68
-
69
- - **Systemic cause across many tests** — fix the root once (env, auth, deploy, base URL). Not per test.
70
- - **Locator drift** — invoke **codeceptjs-exploration** to pick a new stable locator.
71
- - **Timing / wait issue** — apply the Waiting guidance from the writing/debugging skills, replacing `I.wait(N)` with a specific `waitFor*`.
72
- - **Failure resists static analysis** — invoke **debugging-codeceptjs-tests** for the live MCP loop.
73
- - **Test passed cleanly** — done. Still glance at `console.json` for warnings worth fixing now.
74
-
75
- ## Things to avoid
76
-
77
- - Reading large HTML or `console.json` files whole — search them with `grep` / `jq` instead.
78
- - When more than one step is marked failed, stopping at the last one — the **first** failure is usually the cause and the rest are cascading.
79
- - Triaging individual failures before clustering — fixing 12 symptoms of one bug is wasted effort.
80
- - Drawing flakiness conclusions from a single run — needs 5+ reruns.
81
- - Deleting `output/` mid-investigation; the artifacts are the only record of the run.
82
-
83
- ## Pointers
84
-
85
- - `node_modules/codeceptjs/docs/aitrace.md` — trace format and config knobs
86
- - `node_modules/codeceptjs/docs/debugging.md` — verbose flags, `pause` plugin's `on=` modes
87
- - `node_modules/codeceptjs/docs/reports.md` — alternative reporters
88
- - `codeceptjs-fundamentals` — what's actually configured
89
- - `codeceptjs-exploration` — when locator drift is the cause
90
- - `debugging-codeceptjs-tests` — when post-mortem isn't enough