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.
- package/LICENSE +21 -0
- package/README.md +284 -171
- package/dist/prompt/context.js +79 -0
- package/dist/prompt/context.js.map +1 -0
- package/dist/prompt/index.js +60 -0
- package/dist/prompt/index.js.map +1 -0
- package/dist/prompt/print.js +30 -0
- package/dist/prompt/print.js.map +1 -0
- package/dist/prompt/project-info.js +2 -0
- package/dist/prompt/project-info.js.map +1 -0
- package/{src/prompt/system-prompt.ts → dist/prompt/system-prompt.js} +38 -25
- package/dist/prompt/system-prompt.js.map +1 -0
- package/dist/prompt/testomatio.js +264 -0
- package/dist/prompt/testomatio.js.map +1 -0
- package/dist/prompt/tools.js +57 -0
- package/dist/prompt/tools.js.map +1 -0
- package/dist/prompt/vocab.js +8 -0
- package/dist/prompt/vocab.js.map +1 -0
- package/dist/src/args.js +172 -0
- package/dist/src/args.js.map +1 -0
- package/dist/src/cli.js +97 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/doctor.js +186 -0
- package/dist/src/doctor.js.map +1 -0
- package/dist/src/env.js +93 -0
- package/dist/src/env.js.map +1 -0
- package/dist/src/mcp-extension.js +9 -0
- package/dist/src/mcp-extension.js.map +1 -0
- package/dist/src/mcp.js +139 -0
- package/dist/src/mcp.js.map +1 -0
- package/dist/src/model.js +71 -0
- package/dist/src/model.js.map +1 -0
- package/dist/src/models.js +38 -0
- package/dist/src/models.js.map +1 -0
- package/dist/src/output.js +185 -0
- package/dist/src/output.js.map +1 -0
- package/dist/src/result.js +41 -0
- package/dist/src/result.js.map +1 -0
- package/dist/src/run.js +291 -0
- package/dist/src/run.js.map +1 -0
- package/dist/src/session.js +92 -0
- package/dist/src/session.js.map +1 -0
- package/dist/src/sessions.js +61 -0
- package/dist/src/sessions.js.map +1 -0
- package/dist/vendor/mcp.js +14801 -0
- package/mcp-tools.json +2967 -0
- package/package.json +34 -43
- package/prompt/context.ts +101 -0
- package/prompt/index.ts +102 -0
- package/prompt/print.ts +32 -0
- package/prompt/project-info.ts +30 -0
- package/prompt/system-prompt.ts +187 -0
- package/{src/prompt → prompt}/testomatio.ts +120 -9
- package/prompt/tools.ts +57 -0
- package/prompt/vocab.ts +7 -0
- package/skills/codeceptjs/ci-fix-tests/SKILL.md +7 -8
- package/skills/codeceptjs/codeceptjs-auth/SKILL.md +47 -64
- package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +56 -47
- package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +144 -106
- package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +50 -57
- package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +88 -196
- package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +4 -5
- package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +25 -36
- package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +23 -36
- package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +23 -36
- package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +23 -35
- package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +50 -53
- package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +87 -191
- package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/SKILL.md +1 -1
- package/{skills.lock.json → skills/skills.lock.json} +43 -36
- package/skills/skills.yaml +34 -0
- package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +49 -61
- package/skills/testomatio/explorbot/explorbot-fundamentals/references/no-install.md +36 -0
- package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +20 -7
- package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +41 -289
- package/skills/testomatio/qa-process/qa-explain-behavior/SKILL.md +111 -0
- package/skills/testomatio/qa-process/qa-explain-behavior/references/answer-shapes.md +116 -0
- package/skills/testomatio/qa-process/qa-explain-behavior/references/examples.md +157 -0
- package/skills/testomatio/qa-process/qa-lead-strategy-advisor/SKILL.md +91 -0
- package/skills/testomatio/qa-process/qa-lead-strategy-advisor/references/output-format.md +71 -0
- package/skills/testomatio/qa-process/testing-workflow/SKILL.md +227 -0
- package/skills/testomatio/test-automation/qa-data-seeder/SKILL.md +83 -0
- package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +5 -3
- package/skills/testomatio/test-automation/setup-change-aware-pr-testing/SKILL.md +190 -0
- package/skills/testomatio/test-automation/setup-ci-automation/SKILL.md +76 -0
- package/skills/testomatio/test-management/qa-split-testing-levels-pyramid/SKILL.md +55 -0
- package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/SKILL.md +220 -0
- package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/references/qa-sprint-report.md +126 -0
- package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +1 -1
- package/skills/testomatio/test-management/qa-thinking/SKILL.md +25 -25
- package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +14 -1
- package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +8 -0
- package/assets/testeiya-logo-dark.svg +0 -16
- package/assets/testeiya-logo.svg +0 -15
- package/models.catalog.json +0 -6963
- package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
- package/skills/playwright-best-practices-skill/README.md +0 -147
- package/skills/testeiya/README.md +0 -29
- package/skills/testeiya/answer-formatting/SKILL.md +0 -30
- package/skills/testeiya/check-cucumber/SKILL.md +0 -200
- package/skills/testeiya/check-tests/SKILL.md +0 -260
- package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
- package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
- package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
- package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
- package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
- package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
- package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
- package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
- package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
- package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
- package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
- package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
- package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
- package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
- package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
- package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
- package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
- package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
- package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
- package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
- package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
- package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
- package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
- package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
- package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
- package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
- package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
- package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
- package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
- package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
- package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
- package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
- package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
- package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
- package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
- package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
- package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
- package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
- package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
- package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
- package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
- package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
- package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
- package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
- package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
- package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
- package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
- package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
- package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
- package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
- package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
- package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
- package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
- package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
- package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
- package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
- package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
- package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
- package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
- package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
- package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
- package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
- package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
- package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
- package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
- package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
- package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
- package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
- package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
- package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
- package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
- package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
- package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
- package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
- package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
- package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
- package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
- package/skills.yaml +0 -21
- package/src/ai-debug.ts +0 -188
- package/src/api/agent-get.ts +0 -22
- package/src/api/agent-start.ts +0 -384
- package/src/api/client-log.ts +0 -29
- package/src/api/context.ts +0 -332
- package/src/api/debug-layout.ts +0 -47
- package/src/api/debug-report.ts +0 -29
- package/src/api/debug-snapshot.ts +0 -30
- package/src/api/debug-stream.ts +0 -52
- package/src/api/files-delete.ts +0 -184
- package/src/api/files-read.ts +0 -41
- package/src/api/files-rename.ts +0 -99
- package/src/api/files-tree.ts +0 -292
- package/src/api/files-write.ts +0 -41
- package/src/api/mcp.ts +0 -603
- package/src/api/memory.ts +0 -69
- package/src/api/open-external.ts +0 -39
- package/src/api/playwright-cli.ts +0 -606
- package/src/api/providers.ts +0 -457
- package/src/api/read-env-token.ts +0 -33
- package/src/api/sessions.ts +0 -79
- package/src/api/settings.ts +0 -120
- package/src/api/skills.ts +0 -58
- package/src/api/testomatio-attachment.ts +0 -89
- package/src/api/testomatio-auth.ts +0 -284
- package/src/api/testomatio-proxy.ts +0 -197
- package/src/api/testomatio-run-stats.ts +0 -81
- package/src/api/testomatio-target.ts +0 -225
- package/src/api/testomatio-transcription.ts +0 -82
- package/src/api/workspace-search.ts +0 -96
- package/src/api/workspace-sync.ts +0 -151
- package/src/api/workspace.ts +0 -165
- package/src/app-server.ts +0 -556
- package/src/bridge.ts +0 -251
- package/src/check-tests.ts +0 -156
- package/src/cli.ts +0 -17
- package/src/commands.ts +0 -244
- package/src/config.ts +0 -183
- package/src/connection.ts +0 -658
- package/src/context-store.ts +0 -265
- package/src/debug-bus.ts +0 -405
- package/src/extensions/tool-gate.ts +0 -220
- package/src/extensions/webui/ask-channel.ts +0 -52
- package/src/extensions/webui/index.ts +0 -184
- package/src/extensions/webui/tools/ask-question.ts +0 -88
- package/src/extensions/webui/tools/query-result.ts +0 -79
- package/src/extensions/webui/tools/render-chart.ts +0 -53
- package/src/extensions/webui/tools/render-item.ts +0 -61
- package/src/extensions/webui/tools/render-list.ts +0 -170
- package/src/extensions/webui/tools/render-result.ts +0 -85
- package/src/extensions/webui/tools/render-tree.ts +0 -71
- package/src/extensions/webui/tools/ui-widget.ts +0 -54
- package/src/extensions/webui/tools/widget-result.ts +0 -13
- package/src/extensions/webui/widget-channel.ts +0 -50
- package/src/file-log.ts +0 -196
- package/src/git-tracked.ts +0 -68
- package/src/gitignore.ts +0 -53
- package/src/json-store.ts +0 -43
- package/src/load-env.ts +0 -70
- package/src/loader-style.ts +0 -96
- package/src/main.ts +0 -140
- package/src/mcp-catalog.ts +0 -96
- package/src/models-catalog.ts +0 -72
- package/src/permissions.ts +0 -120
- package/src/project-dir.ts +0 -189
- package/src/project-info.ts +0 -108
- package/src/prompt/app-ui.ts +0 -59
- package/src/prompt/browser.ts +0 -27
- package/src/prompt/index.ts +0 -62
- package/src/prompt/tools.ts +0 -27
- package/src/server-info.ts +0 -62
- package/src/session-factory.ts +0 -442
- package/src/session-store.ts +0 -115
- package/src/shell-env.ts +0 -45
- package/src/skills.ts +0 -163
- package/src/sync-snapshot.ts +0 -140
- package/src/telemetry.ts +0 -239
- package/src/testomatio-auth.ts +0 -299
- package/src/testomatio.ts +0 -98
- package/src/theme.ts +0 -30
- package/src/user-env.ts +0 -94
- package/src/welcome.ts +0 -194
- package/src/workspace/safe-path.ts +0 -85
- package/src/workspace/test-md.ts +0 -70
- package/src/workspace-model.ts +0 -440
- package/testeiya.config.json +0 -14
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication-flows.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/clock-mocking.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/mobile-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-context.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-user.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/network-advanced.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/third-party.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/pom-vs-fixtures.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/test-architecture.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/when-to-mock.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/browser-apis.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/iframes.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/service-workers.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/websockets.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/annotations.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/assertions-waiting.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/configuration.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/fixtures-hooks.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/global-setup.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/locators.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/page-object-model.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/projects-dependencies.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-data.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-suite-structure.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-tags.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/console-errors.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/debugging.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/error-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/flaky-tests.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/angular.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/nextjs.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/react.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/vue.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/ci-cd.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/docker.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/github-actions.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/gitlab.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/other-providers.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/parallel-sharding.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/performance.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/reporting.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/test-coverage.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/accessibility.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/api-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/browser-extensions.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/canvas-webgl.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/component-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/drag-drop.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/electron.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-operations.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-upload-download.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/forms-validation.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/graphql-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/i18n.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/performance-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/security-testing.md +0 -0
- /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/visual-regression.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/SKILL.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/element-attributes.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/playwright-tests.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/request-mocking.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/running-code.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/session-management.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/storage-state.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/test-generation.md +0 -0
- /package/skills/{playwright-cli → playwright/playwright-cli}/references/tracing.md +0 -0
- /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
|
|
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
|
|
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
|
-
**
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
225
|
-
npx codeceptjs run --steps -c <config>
|
|
226
|
-
```
|
|
222
|
+
### 6. Locators
|
|
227
223
|
|
|
228
|
-
|
|
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
|
-
|
|
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
|
-
|
|
236
|
-
|
|
237
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
292
|
-
|
|
293
|
-
- `
|
|
294
|
-
- `
|
|
295
|
-
- `
|
|
296
|
-
- `
|
|
297
|
-
- `node_modules/codeceptjs/docs
|
|
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
|
|
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
|
|
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
|
-
**
|
|
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
|
-
|
|
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
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
##
|
|
338
|
-
|
|
339
|
-
- `
|
|
340
|
-
- `
|
|
341
|
-
- `
|
|
342
|
-
- `
|
|
343
|
-
- `node_modules/codeceptjs/docs
|
|
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
|
|
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
|
|
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
|
-
**
|
|
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
|
-
|
|
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
|
-
|
|
329
|
-
|
|
330
|
-
|
|
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
|
-
|
|
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
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
332
|
+
CodeceptJS priority — pick 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
|
-
##
|
|
458
|
-
|
|
459
|
-
- `
|
|
460
|
-
- `
|
|
461
|
-
- `
|
|
462
|
-
- `
|
|
463
|
-
- `node_modules/codeceptjs/docs
|
|
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
|
|
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
|
|
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
|
-
**
|
|
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
|
-
|
|
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
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
##
|
|
337
|
-
|
|
338
|
-
- `
|
|
339
|
-
- `
|
|
340
|
-
- `
|
|
341
|
-
- `
|
|
342
|
-
- `node_modules/codeceptjs/docs
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- `
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
- `I.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
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
|
|
68
|
-
- Renaming PO methods
|
|
69
|
-
-
|
|
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
|
|
72
|
-
- Mass-applying
|
|
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
|
-
##
|
|
74
|
+
## Related skills
|
|
75
75
|
|
|
76
|
-
- `
|
|
77
|
-
- `
|
|
78
|
-
- `
|
|
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
|