testeiya 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -0
- package/models.catalog.json +6963 -0
- package/package.json +71 -0
- package/skills/codeceptjs/ci-fix-tests/SKILL.md +120 -0
- package/skills/codeceptjs/codeceptjs-auth/SKILL.md +158 -0
- package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +91 -0
- package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +158 -0
- package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +90 -0
- package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +234 -0
- package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +110 -0
- package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +306 -0
- package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +352 -0
- package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +472 -0
- package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +350 -0
- package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +81 -0
- package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +206 -0
- package/skills/playwright-best-practices-skill/LICENSE.md +7 -0
- package/skills/playwright-best-practices-skill/README.md +147 -0
- package/skills/playwright-best-practices-skill/SKILL.md +303 -0
- package/skills/playwright-best-practices-skill/advanced/authentication-flows.md +360 -0
- package/skills/playwright-best-practices-skill/advanced/authentication.md +871 -0
- package/skills/playwright-best-practices-skill/advanced/clock-mocking.md +364 -0
- package/skills/playwright-best-practices-skill/advanced/mobile-testing.md +409 -0
- package/skills/playwright-best-practices-skill/advanced/multi-context.md +288 -0
- package/skills/playwright-best-practices-skill/advanced/multi-user.md +393 -0
- package/skills/playwright-best-practices-skill/advanced/network-advanced.md +452 -0
- package/skills/playwright-best-practices-skill/advanced/third-party.md +464 -0
- package/skills/playwright-best-practices-skill/architecture/pom-vs-fixtures.md +363 -0
- package/skills/playwright-best-practices-skill/architecture/test-architecture.md +369 -0
- package/skills/playwright-best-practices-skill/architecture/when-to-mock.md +383 -0
- package/skills/playwright-best-practices-skill/browser-apis/browser-apis.md +391 -0
- package/skills/playwright-best-practices-skill/browser-apis/iframes.md +403 -0
- package/skills/playwright-best-practices-skill/browser-apis/service-workers.md +504 -0
- package/skills/playwright-best-practices-skill/browser-apis/websockets.md +403 -0
- package/skills/playwright-best-practices-skill/core/annotations.md +424 -0
- package/skills/playwright-best-practices-skill/core/assertions-waiting.md +361 -0
- package/skills/playwright-best-practices-skill/core/configuration.md +452 -0
- package/skills/playwright-best-practices-skill/core/fixtures-hooks.md +417 -0
- package/skills/playwright-best-practices-skill/core/global-setup.md +434 -0
- package/skills/playwright-best-practices-skill/core/locators.md +242 -0
- package/skills/playwright-best-practices-skill/core/page-object-model.md +315 -0
- package/skills/playwright-best-practices-skill/core/projects-dependencies.md +453 -0
- package/skills/playwright-best-practices-skill/core/test-data.md +492 -0
- package/skills/playwright-best-practices-skill/core/test-suite-structure.md +361 -0
- package/skills/playwright-best-practices-skill/core/test-tags.md +298 -0
- package/skills/playwright-best-practices-skill/debugging/console-errors.md +420 -0
- package/skills/playwright-best-practices-skill/debugging/debugging.md +504 -0
- package/skills/playwright-best-practices-skill/debugging/error-testing.md +360 -0
- package/skills/playwright-best-practices-skill/debugging/flaky-tests.md +496 -0
- package/skills/playwright-best-practices-skill/frameworks/angular.md +530 -0
- package/skills/playwright-best-practices-skill/frameworks/nextjs.md +469 -0
- package/skills/playwright-best-practices-skill/frameworks/react.md +531 -0
- package/skills/playwright-best-practices-skill/frameworks/vue.md +574 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/ci-cd.md +468 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/docker.md +283 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/github-actions.md +546 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/gitlab.md +397 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/other-providers.md +521 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/parallel-sharding.md +371 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/performance.md +453 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/reporting.md +424 -0
- package/skills/playwright-best-practices-skill/infrastructure-ci-cd/test-coverage.md +497 -0
- package/skills/playwright-best-practices-skill/testing-patterns/accessibility.md +359 -0
- package/skills/playwright-best-practices-skill/testing-patterns/api-testing.md +719 -0
- package/skills/playwright-best-practices-skill/testing-patterns/browser-extensions.md +506 -0
- package/skills/playwright-best-practices-skill/testing-patterns/canvas-webgl.md +493 -0
- package/skills/playwright-best-practices-skill/testing-patterns/component-testing.md +500 -0
- package/skills/playwright-best-practices-skill/testing-patterns/drag-drop.md +576 -0
- package/skills/playwright-best-practices-skill/testing-patterns/electron.md +509 -0
- package/skills/playwright-best-practices-skill/testing-patterns/file-operations.md +377 -0
- package/skills/playwright-best-practices-skill/testing-patterns/file-upload-download.md +562 -0
- package/skills/playwright-best-practices-skill/testing-patterns/forms-validation.md +561 -0
- package/skills/playwright-best-practices-skill/testing-patterns/graphql-testing.md +331 -0
- package/skills/playwright-best-practices-skill/testing-patterns/i18n.md +508 -0
- package/skills/playwright-best-practices-skill/testing-patterns/performance-testing.md +476 -0
- package/skills/playwright-best-practices-skill/testing-patterns/security-testing.md +430 -0
- package/skills/playwright-best-practices-skill/testing-patterns/visual-regression.md +634 -0
- package/skills/playwright-cli/SKILL.md +420 -0
- package/skills/playwright-cli/references/element-attributes.md +23 -0
- package/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/skills/playwright-cli/references/request-mocking.md +87 -0
- package/skills/playwright-cli/references/running-code.md +241 -0
- package/skills/playwright-cli/references/session-management.md +225 -0
- package/skills/playwright-cli/references/storage-state.md +275 -0
- package/skills/playwright-cli/references/test-generation.md +433 -0
- package/skills/playwright-cli/references/tracing.md +139 -0
- package/skills/playwright-cli/references/video-recording.md +143 -0
- package/skills/testeiya/README.md +29 -0
- package/skills/testeiya/answer-formatting/SKILL.md +30 -0
- package/skills/testeiya/check-cucumber/SKILL.md +200 -0
- package/skills/testeiya/check-tests/SKILL.md +260 -0
- package/skills/testeiya/manual-run-assistant/SKILL.md +61 -0
- package/skills/testeiya/testomatio-docs/INDEX.md +175 -0
- package/skills/testeiya/testomatio-docs/SKILL.md +102 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +144 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +531 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +437 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +191 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +277 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +39 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +122 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +170 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +53 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +98 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +151 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +377 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +267 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +138 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +220 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +48 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +201 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +94 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +243 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +135 -0
- package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +394 -0
- package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +290 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +96 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +94 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +106 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +115 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +120 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +88 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +151 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +121 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +96 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +31 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +54 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +34 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +31 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +93 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +131 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +164 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +29 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +67 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +94 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +53 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +71 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +52 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +60 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +267 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +82 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +73 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +207 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +204 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +95 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +75 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +33 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +108 -0
- package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +66 -0
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +95 -0
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +94 -0
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +26 -0
- package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +32 -0
- package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +242 -0
- package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +140 -0
- package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +76 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +363 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +41 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +240 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +326 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +75 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +49 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +285 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +67 -0
- package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +138 -0
- package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +87 -0
- package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +546 -0
- package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +326 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +386 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +378 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +112 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +127 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +63 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +49 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +41 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +39 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +37 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +117 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +93 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +44 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +117 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +44 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +47 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +82 -0
- package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +55 -0
- package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +334 -0
- package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +104 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +176 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +195 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +203 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +455 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +137 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +329 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +342 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +256 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +331 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +633 -0
- package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +223 -0
- package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +68 -0
- package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +181 -0
- package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +98 -0
- package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +354 -0
- package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +169 -0
- package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +156 -0
- package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +412 -0
- package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +527 -0
- package/skills/testeiya/testomatio-docs/docs/support/index.md +75 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +388 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +215 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +247 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +490 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +144 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +48 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +248 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +138 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +77 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +72 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +23 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +18 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +63 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +29 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +80 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +57 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +331 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +229 -0
- package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +325 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +159 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +164 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +85 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +163 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +125 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +478 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +207 -0
- package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +218 -0
- package/skills/testeiya/testomatio-docs/docs.lock.json +6 -0
- package/skills/testeiya/testomatio-reporter/SKILL.md +307 -0
- package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +88 -0
- package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +95 -0
- package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +334 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/CLAUDE.md +56 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/SKILL.md +242 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/references/CODECEPTJS_BEST_PRACTICES.md +182 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/references/FINAL_SUMMARY_TEMPLATE.md +22 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/references/PLAYWRIGHT_BEST_PRACTICES.md +90 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/references/POM_BEST_PRACTICES.md +53 -0
- package/skills/testomatio/test-automation/automate-manual-test-cases/references/TEST_DATA_MANAGEMENT.md +52 -0
- package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/SKILL.md +107 -0
- package/skills/testomatio/test-automation/debug-fix-failed-flaky-autotests/references/DEBUGGING_QUICK_REFERENCE.md +113 -0
- package/skills/testomatio/test-automation/qa-automation-test-consolidation/SKILL.md +29 -0
- package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +151 -0
- package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +199 -0
- package/skills/testomatio/test-automation/testomat-allure-adapter/SKILL.md +289 -0
- package/skills/testomatio/test-management/detect-duplicate-test-cases/SKILL.md +86 -0
- package/skills/testomatio/test-management/detect-duplicate-test-cases/references/DUPLICATE_INSTRUCTIONS.md +54 -0
- package/skills/testomatio/test-management/improve-test-cases/SKILL.md +114 -0
- package/skills/testomatio/test-management/improve-test-cases/references/TESTOMAT_MARKDOWN_EXAMPLE.md +66 -0
- package/skills/testomatio/test-management/pull-request-diff-analyzer/SKILL.md +141 -0
- package/skills/testomatio/test-management/qa-e2e-tests-reporting/SKILL.md +354 -0
- package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_ARTIFACTS.md +82 -0
- package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_HTML_REPORT.md +37 -0
- package/skills/testomatio/test-management/qa-e2e-tests-reporting/references/TESTOMATIO_REPORTERS_CONFIG.md +118 -0
- package/skills/testomatio/test-management/qa-pr-requirements-analyzer/SKILL.md +149 -0
- package/skills/testomatio/test-management/qa-pr-requirements-analyzer/references/summary-example.md +54 -0
- package/skills/testomatio/test-management/qa-requirement-reviewer/SKILL.md +126 -0
- package/skills/testomatio/test-management/qa-requirement-reviewer/references/requirements_reviewer_examples.md +128 -0
- package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +174 -0
- package/skills/testomatio/test-management/qa-test-code-coverage/references/COVERAGE_FILE_FORMAT.md +138 -0
- package/skills/testomatio/test-management/qa-test-code-coverage/references/E2E_FRAMEWORKS.md +65 -0
- package/skills/testomatio/test-management/qa-test-code-coverage/scripts/check-coverage.mjs +40 -0
- package/skills/testomatio/test-management/qa-thinking/SKILL.md +36 -0
- package/skills/testomatio/test-management/qa-write-test-cases/SKILL.md +267 -0
- package/skills/testomatio/test-management/qa-write-test-cases/references/test-case-format.md +387 -0
- package/skills/testomatio/test-management/qa-write-test-cases/references/testomat-tms-guide.md +72 -0
- package/skills/testomatio/test-management/qa-write-test-cases/references/writing-rule.md +159 -0
- package/skills/testomatio/test-management/scan-automation-project/SKILL.md +152 -0
- package/skills/testomatio/test-management/sync-test-cases-with-tms/SKILL.md +107 -0
- package/skills/testomatio/test-management/sync-test-cases-with-tms/references/TESTOMATIO_CLI.md +140 -0
- package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +182 -0
- package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +169 -0
- package/skills.lock.json +72 -0
- package/skills.yaml +21 -0
- package/src/ai-debug.ts +188 -0
- package/src/api/agent-get.ts +22 -0
- package/src/api/agent-start.ts +384 -0
- package/src/api/client-log.ts +29 -0
- package/src/api/context.ts +332 -0
- package/src/api/debug-layout.ts +47 -0
- package/src/api/debug-report.ts +29 -0
- package/src/api/debug-snapshot.ts +30 -0
- package/src/api/debug-stream.ts +52 -0
- package/src/api/files-delete.ts +184 -0
- package/src/api/files-read.ts +41 -0
- package/src/api/files-rename.ts +99 -0
- package/src/api/files-tree.ts +292 -0
- package/src/api/files-write.ts +41 -0
- package/src/api/mcp.ts +603 -0
- package/src/api/memory.ts +69 -0
- package/src/api/open-external.ts +39 -0
- package/src/api/playwright-cli.ts +606 -0
- package/src/api/providers.ts +457 -0
- package/src/api/read-env-token.ts +33 -0
- package/src/api/sessions.ts +79 -0
- package/src/api/settings.ts +120 -0
- package/src/api/skills.ts +58 -0
- package/src/api/testomatio-attachment.ts +89 -0
- package/src/api/testomatio-auth.ts +284 -0
- package/src/api/testomatio-proxy.ts +197 -0
- package/src/api/testomatio-run-stats.ts +81 -0
- package/src/api/testomatio-target.ts +225 -0
- package/src/api/testomatio-transcription.ts +82 -0
- package/src/api/workspace-search.ts +96 -0
- package/src/api/workspace-sync.ts +151 -0
- package/src/api/workspace.ts +165 -0
- package/src/app-server.ts +556 -0
- package/src/bridge.ts +251 -0
- package/src/check-tests.ts +156 -0
- package/src/cli.ts +17 -0
- package/src/commands.ts +244 -0
- package/src/config.ts +183 -0
- package/src/connection.ts +658 -0
- package/src/context-store.ts +265 -0
- package/src/debug-bus.ts +405 -0
- package/src/extensions/tool-gate.ts +220 -0
- package/src/extensions/webui/ask-channel.ts +52 -0
- package/src/extensions/webui/index.ts +184 -0
- package/src/extensions/webui/tools/ask-question.ts +88 -0
- package/src/extensions/webui/tools/query-result.ts +79 -0
- package/src/extensions/webui/tools/render-chart.ts +53 -0
- package/src/extensions/webui/tools/render-item.ts +61 -0
- package/src/extensions/webui/tools/render-list.ts +170 -0
- package/src/extensions/webui/tools/render-result.ts +85 -0
- package/src/extensions/webui/tools/render-tree.ts +71 -0
- package/src/extensions/webui/tools/ui-widget.ts +54 -0
- package/src/extensions/webui/tools/widget-result.ts +13 -0
- package/src/extensions/webui/widget-channel.ts +50 -0
- package/src/file-log.ts +196 -0
- package/src/git-tracked.ts +68 -0
- package/src/gitignore.ts +53 -0
- package/src/json-store.ts +43 -0
- package/src/load-env.ts +70 -0
- package/src/loader-style.ts +96 -0
- package/src/main.ts +140 -0
- package/src/mcp-catalog.ts +96 -0
- package/src/models-catalog.ts +72 -0
- package/src/permissions.ts +120 -0
- package/src/project-dir.ts +189 -0
- package/src/project-info.ts +108 -0
- package/src/prompt/app-ui.ts +59 -0
- package/src/prompt/browser.ts +27 -0
- package/src/prompt/index.ts +62 -0
- package/src/prompt/system-prompt.ts +161 -0
- package/src/prompt/testomatio.ts +170 -0
- package/src/prompt/tools.ts +27 -0
- package/src/server-info.ts +62 -0
- package/src/session-factory.ts +442 -0
- package/src/session-store.ts +115 -0
- package/src/shell-env.ts +45 -0
- package/src/skills.ts +163 -0
- package/src/sync-snapshot.ts +140 -0
- package/src/telemetry.ts +239 -0
- package/src/testomatio-auth.ts +299 -0
- package/src/testomatio.ts +98 -0
- package/src/theme.ts +30 -0
- package/src/user-env.ts +94 -0
- package/src/welcome.ts +127 -0
- package/src/workspace/safe-path.ts +85 -0
- package/src/workspace/test-md.ts +70 -0
- package/src/workspace-model.ts +440 -0
- package/testeiya.config.json +14 -0
|
@@ -0,0 +1,90 @@
|
|
|
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
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging-codeceptjs-tests
|
|
3
|
+
description: "Use when a CodeceptJS 4 test is failing, flaky, or behaving unexpectedly — stack traces from `npx codeceptjs run`, intermittent failures, locator drift, timing issues, \"works locally fails in CI\", \"step through this test\", \"pause at step N\", \"set a breakpoint\". For AI agents the primary path is **MCP with pause** — drop a `pause()` in the test (or pass `pauseAt: N` to `run_test` for a no-edit breakpoint), inspect via `run_code` / `snapshot` against the live browser, release with `continue`. Step indices for `pauseAt` come from `npx codeceptjs dry-run --debug --grep <test> --numbers --no-ansi`. CLI debugging (`npx codeceptjs run --debug`, `DEBUG=\"codeceptjs:*\"`) is the fallback for humans, CI repros, and framework-internal issues (recorder hangs, leaks, plugin races). Don't fix from the error message alone; capture page state and read it. Trigger on broken or flaky tests, run errors, \"why does this fail\", trace/screenshot/console mentions, breakpoint/pause/step-through requests."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debugging CodeceptJS 4 Tests
|
|
7
|
+
|
|
8
|
+
Failures lie. The error usually points at a step that's a side effect of something earlier — auth expired, a frame switch missed, a network call still pending. Reproduce, capture state, and read it before fixing.
|
|
9
|
+
|
|
10
|
+
Two paths, picked by who's driving:
|
|
11
|
+
|
|
12
|
+
- **MCP-first (for AI agents)** — drive the test through the MCP server. In-test `pause()` and the `pauseAt: N` option on `run_test` both yield control back to the agent in-process — same `I` / browser the test is using. Inspect via `run_code` / `snapshot`, advance one step at a time via `run_step_by_step` + `continue`, release a pause via `continue`. `aiTrace` artifacts cover the prior steps.
|
|
13
|
+
- **CLI fallback (for humans / CI / framework internals)** — `npx codeceptjs run --debug` for verbose framework output. Escalate to `DEBUG="codeceptjs:*"` when the *framework itself* looks at fault: recorder hangs, plugin races, event leaks, "step never ran". Use this path for CI repros, headless servers, and framework-internal bugs.
|
|
14
|
+
|
|
15
|
+
In-test `pause()` adapts to who's driving: at a TTY it opens the readline REPL; under MCP it yields control to the agent (same in-process `I` / browser); in a non-TTY non-MCP subprocess it prints a notice and resolves immediately so leftover `pause()` calls don't deadlock CI. **Adding `pause()` is now the primary MCP breakpoint** — drop it where you want to look, run via `run_test`, drive the live page through `run_code`, release with `continue`.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
### 1. Read the project (fundamentals)
|
|
20
|
+
Run the **codeceptjs-fundamentals** skill. You need: helper, plugins on (especially `aiTrace`, `screenshot`, `pageInfo`, `retryFailedStep`, `pause`, `auth`), env vars, whether MCP is wired up. If `aiTrace` is **not** declared, add it **once** with `plugins: { aiTrace: { enabled: true } }` — most of this skill leans on its output.
|
|
21
|
+
|
|
22
|
+
**Declare `aiTrace` once; never edit config to change its trigger.** The capture mode is controlled per-run from the CLI, exactly like the `pause` plugin:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx codeceptjs run -p aiTrace:on=step # persist every step (default)
|
|
26
|
+
npx codeceptjs run -p aiTrace:on=fail # persist only the failed step
|
|
27
|
+
npx codeceptjs run -p aiTrace:on=test # persist only the last step of each test
|
|
28
|
+
npx codeceptjs run -p aiTrace:on=file:path=tests/login_test.js;line=43
|
|
29
|
+
npx codeceptjs run -p aiTrace:on=url:pattern=/checkout/*
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`-p aiTrace:on=...` overrides the config-declared mode for that run only. Reach for `on=fail` to keep a CI repro lean, `on=step` while actively diagnosing. Don't flip `on:` in `codecept.conf.js` between runs — it churns the config and the change leaks into other runs.
|
|
33
|
+
|
|
34
|
+
### 2. Reproduce minimally
|
|
35
|
+
Run only the failing test, with steps printed:
|
|
36
|
+
```bash
|
|
37
|
+
npx codeceptjs run --grep '<scenario>' --steps
|
|
38
|
+
```
|
|
39
|
+
Add `--config codecept.ci.conf.js` if the failure is CI-specific. Confirm reproduction before instrumenting further.
|
|
40
|
+
|
|
41
|
+
### 3. Pick a path
|
|
42
|
+
|
|
43
|
+
**MCP (primary for AI agents):**
|
|
44
|
+
- `run_test <test>` — runs a specific test in-process; shares `I` / browser with `run_code` and `snapshot`. Returns the JSON reporter result on completion, **or** `{ status: 'paused', pausedAfter, page, suggestions }` if the test calls `pause()` or hits the optional `pauseAt: N` breakpoint. From a paused state, drive the live page via `run_code` / `snapshot` and release with `continue`.
|
|
45
|
+
- `run_step_by_step <test>` — interactive: pauses after every step. After each `continue`, the test advances one step and re-pauses (or completes). Use when you want to watch the whole flow tick by; use `run_test` with `pauseAt: N` instead for a single targeted breakpoint.
|
|
46
|
+
- `continue` — releases a paused test. After `pause()` or `pauseAt`: runs to completion (or to the next `pause()`). After `run_step_by_step`: advances one step.
|
|
47
|
+
- `run_code <CodeceptJS lines>` — runs arbitrary CodeceptJS code in the live session (works fresh **and** while a test is paused — same container). Returns the **value the code produced**, captures `console.log` / `info` / `warn` / `error` / `debug` output, and saves a final-state snapshot (URL, ARIA, HTML, screenshot, storage). Use to test a locator hypothesis or grab a value at the failure point.
|
|
48
|
+
- `snapshot` — captures current browser state without performing any action (URL, cookies, localStorage, HTML, ARIA, screenshot, console). Use between actions when you want to reason about what to do next without re-running anything.
|
|
49
|
+
- `list_actions` — sanity-check that an `I.*` method exists on the active helper.
|
|
50
|
+
|
|
51
|
+
**CLI (fallback):**
|
|
52
|
+
- `npx codeceptjs run --grep '<scenario>' --debug` — first move when MCP isn't available. Steps + helper internals + URLs + plugin events.
|
|
53
|
+
- `npx codeceptjs run ... --verbose` — adds promise-queue / retry / timeout logs on top of `--debug`.
|
|
54
|
+
- `DEBUG="codeceptjs:*" npx codeceptjs run ...` — turns on CodeceptJS's internal debug streams. Reach for this when `--debug` doesn't explain the failure: orphaned timers, event leaks, recorder hangs, plugin races, double-emitted events, "step disappeared from the queue". Narrow with namespaces: `codeceptjs:recorder` (promise queue), `codeceptjs:pause`, `codeceptjs:ai`, `codeceptjs:plugin:<name>`. Most user-level test failures don't need this — it's the framework-internal escape hatch.
|
|
55
|
+
|
|
56
|
+
### 4. Set a breakpoint with `pause()` or `pauseAt`
|
|
57
|
+
|
|
58
|
+
The MCP server installs an in-process pause handler at startup. Whenever a test running through `run_test` hits `pause()` (or completes the `pauseAt: N` step), control yields back to the agent on the same `I` / browser. There's no subprocess, no IPC, and `run_code` / `snapshot` work against the live page — exactly what a paused REPL would give you.
|
|
59
|
+
|
|
60
|
+
Two ways to land at a breakpoint:
|
|
61
|
+
|
|
62
|
+
- **In-test `pause()`** — drop `pause()` directly in the test where you want to look. Best when you're already editing the file or want to break inside a `within` / loop / hook.
|
|
63
|
+
- **`pauseAt: N` on `run_test`** — programmatic, no test edit required. Pauses after the Nth leaf step completes.
|
|
64
|
+
|
|
65
|
+
To pick `N`, list the steps with their indices:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx codeceptjs dry-run --debug --grep '<scenario>' --numbers --no-ansi
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Output is one numbered line per leaf step (1-based, per-test). The number on the line you want to stop *after* is the value to pass as `pauseAt`. `--no-ansi` strips colors so the output is clean for parsing.
|
|
72
|
+
|
|
73
|
+
Once paused (`{ status: 'paused', pausedAfter, page, suggestions }`):
|
|
74
|
+
|
|
75
|
+
1. **Inspect with `run_code`** — `await I.grabCurrentUrl()`, `await I.grabWebElement(...)`, `await I.seeElement({ role: 'dialog' })`. Each call returns URL + ARIA + console + storage from the live page.
|
|
76
|
+
2. **Capture clean state with `snapshot`** between hypotheses — no action, just the artifact bundle.
|
|
77
|
+
3. **Walk earlier steps via `aiTrace`** — `output/trace_<TestName>_<hash>/trace.md` has the per-step state for everything that ran before the breakpoint.
|
|
78
|
+
4. **Release with `continue`** — runs to completion (or to the next `pause()`). For a step-by-step walk, use `run_step_by_step` instead of `run_test`; each `continue` then advances one step.
|
|
79
|
+
|
|
80
|
+
### 5. Read the trace
|
|
81
|
+
Hand off to **codeceptjs-run-analysis** to walk `output/trace_<TestName>_<hash>/trace.md` and the per-step artifacts. Focus on the **first** failed step — late failures are usually side effects of an earlier silent miss. The run-analysis skill also covers grepping into large HTML, clustering errors across many traces, and comparing reruns when flakiness is in play.
|
|
82
|
+
|
|
83
|
+
For locator-level questions on a saved snapshot ("would `.btn-primary` have matched here?", "is `Username` a field at step 7?") use **`codeceptq`** against the per-step `<NNNN>_<step>_page.html` — see the "Query trace HTML with `codeceptq`" section below. Faster feedback loop than `run_code` when you're iterating selector candidates.
|
|
84
|
+
|
|
85
|
+
### 6. Form a hypothesis
|
|
86
|
+
|
|
87
|
+
| Symptom | Likely cause |
|
|
88
|
+
|---|---|
|
|
89
|
+
| Element missing, page is `/login` | Auth: stale `check`, expired session, missing env var |
|
|
90
|
+
| Element in HTML but `display: none` | `waitForVisible`, not `waitForElement` |
|
|
91
|
+
| Locator matches 2+ (strict mode) | Disambiguate: ARIA role, `step.opts({ elementIndex })`, `within` |
|
|
92
|
+
| Element in screenshot N+1, missing in N | Animation / lazy load — `waitForVisible(loc, t)` |
|
|
93
|
+
| 401/403 in console.json | API token expired or env var missing |
|
|
94
|
+
| Steps pass, next `I.see` fails | Frame switch missed — wrap in `within({ frame })` |
|
|
95
|
+
| Different result CI vs local | `setHeadlessWhen(CI)`, viewport, timing, env var |
|
|
96
|
+
| Recorder hangs, step never fires | `DEBUG="codeceptjs:recorder"` to inspect the queue |
|
|
97
|
+
| Plugin misbehaves | `DEBUG="codeceptjs:plugin:<name>"` |
|
|
98
|
+
|
|
99
|
+
### 7. Verify the fix on the live page
|
|
100
|
+
For agents driving MCP, use `run_code` to try the candidate fix in the live session **before editing the file**. If it works there, it'll work in the test. While paused (in-test `pause()` or `pauseAt`), `run_code` operates on the same `I` / browser the test is using, so a candidate replacement step can be tried in place. Humans running with `--debug` at a TTY can use in-test `pause()` for the same purpose at a readline REPL.
|
|
101
|
+
|
|
102
|
+
### 8. Apply and re-run
|
|
103
|
+
Edit the test, then `npx codeceptjs run --grep '<scenario>' --steps`. Use **codeceptjs-run-analysis** to verify the trace looks right after the fix — and to confirm the failure didn't shift to another step. If the fix introduces a `waitFor*` or `step.opts`, leave a one-line `Why:` comment — those are the comments worth keeping.
|
|
104
|
+
|
|
105
|
+
## When to reach for which plugin / mode
|
|
106
|
+
|
|
107
|
+
| You want to … | Use |
|
|
108
|
+
|---|---|
|
|
109
|
+
| Per-step artifacts after a run | `aiTrace` plugin (`output/trace_*/`), declared once in config |
|
|
110
|
+
| Capture every step's state | `npx codeceptjs run -p aiTrace:on=step` |
|
|
111
|
+
| Capture only the failed step (lean CI repro) | `npx codeceptjs run -p aiTrace:on=fail` |
|
|
112
|
+
| Capture last step per test | `npx codeceptjs run -p aiTrace:on=test` |
|
|
113
|
+
| Capture steps from a file/line or URL | `-p aiTrace:on=file:path=<file>;line=<N>` / `-p aiTrace:on=url:pattern=<glob>` |
|
|
114
|
+
| REPL on first failure | `npx codeceptjs run -p pause` (default `on=fail`) |
|
|
115
|
+
| Single-step interactively | `npx codeceptjs run -p pause:on=step` |
|
|
116
|
+
| Break on a file or URL | `pause:on=file:path=<file>;line=<N>` / `pause:on=url:pattern=<glob>` |
|
|
117
|
+
| Programmatic breakpoint at step N (no test edit) | MCP `run_test` with `pauseAt: N` (discover N via `dry-run --numbers`) |
|
|
118
|
+
| In-test breakpoint at a specific line | drop `pause()` in the test, then MCP `run_test` |
|
|
119
|
+
| Step-by-step REPL from an AI agent | MCP `run_step_by_step`, then `continue` between steps |
|
|
120
|
+
| Release a paused test | MCP `continue` |
|
|
121
|
+
| Test a hypothesis on the live page (agent) | MCP `run_code` (works fresh **and** while paused) |
|
|
122
|
+
| Capture state without acting (agent) | MCP `snapshot` |
|
|
123
|
+
| Test a hypothesis on the live page (human, TTY) | in-test `pause()` + `npx codeceptjs run --debug` |
|
|
124
|
+
| List steps with their indices (for `pauseAt`) | `npx codeceptjs dry-run --debug --grep '<test>' --numbers --no-ansi` |
|
|
125
|
+
| Visual replay slideshow | `screenshot:slides=true` → `output/records.html` |
|
|
126
|
+
| Auto-suggest fixes for broken locators | `heal` plugin + `--ai` (disabled in `--debug`) |
|
|
127
|
+
| Diagnose framework-internal behaviour | `DEBUG="codeceptjs:*"` (or a specific namespace) |
|
|
128
|
+
| Inspect specific elements — state, markup, position, children | `I.grabWebElement` / `I.grabWebElements` (cross-helper WebElement API) |
|
|
129
|
+
| Drop to native helper APIs when nothing else works | `I.usePlaywrightTo` / `I.usePuppeteerTo` / `I.useWebDriverTo` |
|
|
130
|
+
| Verify a locator against a saved trace snapshot (offline) | `codeceptq <locator> --file output/trace_*/<NNNN>_<step>_page.html` |
|
|
131
|
+
|
|
132
|
+
## Waiting (a common cause of flakes)
|
|
133
|
+
|
|
134
|
+
Most "intermittent" failures are missed waits. Use the trace HTML / ARIA to find the *actual* gating element rather than adding a generic delay:
|
|
135
|
+
- a **loader / spinner / skeleton** still on the page → `I.waitForInvisible('.spinner')` / `I.waitForDetached('.skeleton')`
|
|
136
|
+
- a **modal / drawer / panel** that hasn't appeared yet → `I.waitForVisible('.modal')` / `I.waitForElement({ role: 'dialog' })`
|
|
137
|
+
- async data — list rows, cards, charts, async-rendered text → `I.waitForElement('.user-row', 10)` / `I.waitForText('Loaded', 10, '.status')`
|
|
138
|
+
|
|
139
|
+
`I.wait(N)` (raw seconds) is fine **during debugging** to confirm a timing hypothesis — if a 5-second sleep makes the test pass, you've found the cause. **Replace it with the specific `I.waitFor*` before committing.** Raw sleeps are slow on fast machines, flaky on slow ones, and hide the real sync point so the next person to touch the test inherits the same problem.
|
|
140
|
+
|
|
141
|
+
## Inspect the page when the trace isn't enough
|
|
142
|
+
|
|
143
|
+
When the trace tells you *what* failed but you need more page-state detail to diagnose — "is this button actually disabled?", "are there really two Save buttons?", "what's the rendered markup of this row?" — hand off to the **codeceptjs-exploration** skill. It covers the WebElement API (`I.grabWebElement` / `I.grabWebElements`, state checks, `toSimplifiedHTML`, `toAbsoluteXPath`, iframe walking) and the broad-XPath candidate-discovery technique.
|
|
144
|
+
|
|
145
|
+
Debug-specific reaches into that toolkit:
|
|
146
|
+
|
|
147
|
+
- **Button rendered but the click had no effect** — `grabWebElement('Submit')`, then `isEnabled()` + `getBoundingBox()`. Disabled? offscreen? zero-sized?
|
|
148
|
+
- **Strict-mode "matched 2 elements"** — exploration's broad-XPath + iterate-and-disambiguate pattern is the canonical fix.
|
|
149
|
+
- **Iframe content** — exploration's `inIframe` pattern; the failing step likely needs to be wrapped in `within({ frame })`.
|
|
150
|
+
|
|
151
|
+
Prefer this over `usePlaywrightTo` / `useWebDriverTo` for inspection: same code across helpers, less boilerplate.
|
|
152
|
+
|
|
153
|
+
## Query trace HTML with `codeceptq`
|
|
154
|
+
|
|
155
|
+
`aiTrace` writes a per-step `<NNNN>_<step>_page.html` snapshot of the live DOM for every step (formatted so each element sits on its own line — line numbers map 1:1 to elements). To answer "would my locator have matched at step N?", use `codeceptq` — a CLI that resolves any CodeceptJS locator (CSS / XPath / fuzzy / semantic) against a saved HTML snapshot and prints the matched elements with their source lines.
|
|
156
|
+
|
|
157
|
+
**Never load the page HTML into your context to inspect it manually.** Real-world `*_page.html` files are thousands of lines and burn context for nothing — `codeceptq` does the locator resolution and returns only the relevant elements. Reach for it instead of `Read`-ing the snapshot.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# does this CSS resolve?
|
|
161
|
+
npx codeceptq '#submit-btn' --file output/trace_<TestName>_<hash>/0007_I_click_Submit_page.html
|
|
162
|
+
|
|
163
|
+
# semantic field lookup against a saved snapshot
|
|
164
|
+
npx codeceptq 'Email' --field --file output/trace_*/0003_*_page.html
|
|
165
|
+
|
|
166
|
+
# semantic clickable, scoped to a context
|
|
167
|
+
npx codeceptq 'Save' '.modal' --click --file output/trace_*/0005_*_page.html
|
|
168
|
+
|
|
169
|
+
# pipe directly from stdin
|
|
170
|
+
cat output/trace_*/0001_*_page.html | npx codeceptq './/form//input[@required]'
|
|
171
|
+
|
|
172
|
+
# machine-readable for chained tooling
|
|
173
|
+
npx codeceptq 'Username' --field --json --file output/trace_*/0002_*_page.html
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
What you get back: a count, the resolved XPath, and one entry per match with the **line number** in the snapshot file plus the element's outerHTML.
|
|
177
|
+
|
|
178
|
+
Flags worth knowing:
|
|
179
|
+
- `--field` / `--click` / `--checkable` / `--select` — force a CodeceptJS semantic strategy (label, button text, checkbox, option). Without a flag, the locator type is auto-detected (CSS if it starts with `#`/`.`/`[`; XPath if it starts with `//` or `./`; fuzzy text otherwise).
|
|
180
|
+
- `--xpath` / `--css` — force interpretation when auto-detection wouldn't pick the right one (e.g., a bare tag name like `select.foo` without `--css` would be treated as fuzzy text).
|
|
181
|
+
- `[context]` — second positional arg restricts matches to descendants of the context locator (e.g., `'Save' '.modal' --click`).
|
|
182
|
+
- `--limit N` (default 20), `--snippet N` (default 500), `--full`, `--json`.
|
|
183
|
+
- Exit codes: `0` matches, `1` no match, `2` invalid input/XPath — useful for scripted "did this locator break?" checks.
|
|
184
|
+
|
|
185
|
+
Use `codeceptq` to test locators against the snapshot **before** applying them via `run_code`. If a candidate matches, you've validated the locator string against the DOM as captured. It can still fail live — element not visible, removed by a re-render, or the snapshot is from a different step — so treat a hit as a green light to try, not a guarantee.
|
|
186
|
+
|
|
187
|
+
When `codeceptq` returns multiple matches, **don't write a brittler XPath** — disambiguate with `step.opts({ elementIndex })`. Indexing is 1-based and follows the order `codeceptq` prints; supports `'first'`, `'last'`, and negatives.
|
|
188
|
+
|
|
189
|
+
```js
|
|
190
|
+
I.click('Edit', step.opts({ elementIndex: 2 }))
|
|
191
|
+
I.fillField('input', 'value', step.opts({ elementIndex: 'last' }))
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Native helper API escape hatch
|
|
195
|
+
|
|
196
|
+
When `I.grabWebElement` and the rest of the `I.*` surface still don't cover it — listening to network requests, manipulating storage, calling a Playwright-only API, raw browser context work — drop down to the underlying helper:
|
|
197
|
+
|
|
198
|
+
- **Playwright** — `I.usePlaywrightTo('description', async ({ browser, browserContext, page }) => { ... })`
|
|
199
|
+
- **Puppeteer** — `I.usePuppeteerTo('description', async ({ page }) => { ... })`
|
|
200
|
+
- **WebDriver** — `I.useWebDriverTo('description', async ({ browser }) => { ... })`
|
|
201
|
+
|
|
202
|
+
The first arg is a label that shows up in step output and traces. The callback receives the helper's native objects. Use these to inspect or manipulate state CodeceptJS doesn't expose — `page.evaluate(() => performance.timing)`, `page.context().cookies()`, `browserContext.on('request', …)`, raw `executeScript` chains. They work inside MCP `run_code` too, so you can poke at internals during a live debug session.
|
|
203
|
+
|
|
204
|
+
Try the regular `I.*` API first — these escape hatches couple the test to a specific helper. Reach for them only when nothing else works.
|
|
205
|
+
|
|
206
|
+
## Helper-specific gotchas
|
|
207
|
+
|
|
208
|
+
- **Playwright** — `strict: true` throws on multi-match. `trace: 'on'` produces `output/trace.zip` (open with `npx playwright show-trace`). Prefer `'load'` / `'domcontentloaded'` over `'networkidle'`.
|
|
209
|
+
- **Puppeteer** — `'networkidle0'` can hang on long-polling pages; try `'networkidle2'` or `'domcontentloaded'`.
|
|
210
|
+
- **WebDriver** — `smartWait` applies to actions only, not assertions. `executeScript` args must be JSON-serializable.
|
|
211
|
+
|
|
212
|
+
## Auth-related failures
|
|
213
|
+
|
|
214
|
+
If the trace shows a redirect to `/login` mid-test, or 401/403 in console, fix **auth**, not the failing step. Check the `auth` plugin's `check`, that credential env vars are exported, and that the cached session under `output/<role>_session.json` isn't stale (delete it to force re-login). The **codeceptjs-auth** skill has the full pattern.
|
|
215
|
+
|
|
216
|
+
## Things to avoid
|
|
217
|
+
|
|
218
|
+
- Fixing from the error message without reading the trace.
|
|
219
|
+
- Editing the test before verifying the fix in `run_code` — you'll iterate without ground truth.
|
|
220
|
+
- Committing `pause()` calls. They're a debugging tool — remove (or replace with `pauseAt`) before merging. A `pause()` left in a test that runs in a non-TTY non-MCP CI subprocess will print a notice and skip, but it's still noise on every run.
|
|
221
|
+
- Adding `waitFor*` blindly instead of identifying the real gating element from HTML/ARIA.
|
|
222
|
+
- Leaving `I.wait(N)` (raw seconds) in committed tests — keep them only while debugging, then replace with the specific `waitFor*`.
|
|
223
|
+
- Editing `aiTrace`'s `on:` in `codecept.conf.js` to switch capture modes — declare it once and override per-run with `-p aiTrace:on=...`. Repeated config edits churn the repo and leak the mode into unrelated runs.
|
|
224
|
+
- Skipping the config check — `setHeadlessWhen(CI)` or env-driven URLs explain many "works locally fails in CI" reports.
|
|
225
|
+
- Hiding the failure with `retries` instead of fixing the cause.
|
|
226
|
+
|
|
227
|
+
## Pointers
|
|
228
|
+
|
|
229
|
+
- `node_modules/codeceptjs/docs/mcp.md` — MCP tool list and client config
|
|
230
|
+
- `node_modules/codeceptjs/docs/aitrace.md` — plugin config, trace.md format
|
|
231
|
+
- `node_modules/codeceptjs/docs/debugging.md` — in-test `pause()`, the `pause` plugin's `on=` modes, IDE setup, DEBUG namespaces
|
|
232
|
+
- `node_modules/codeceptjs/docs/heal.md` — self-healing recipes
|
|
233
|
+
- `node_modules/codeceptjs/docs/retry.md` — retry semantics across step / scenario / hook
|
|
234
|
+
- `node_modules/codeceptjs/lib/plugin/aiTrace.js`, `lib/plugin/pause.js`, `lib/plugin/screenshot.js`, `lib/plugin/browser.js`, `bin/mcp-server.js` — source if docs and code disagree
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-codeceptjs-4
|
|
3
|
+
description: "Migrate a CodeceptJS '3.x' project to '4.x'. Trigger when 'package.json' pins 'codeceptjs' at '3.x' or is missing '\"type\": \"module\"', when test files still use CommonJS ('require()' / 'module.exports') against CodeceptJS APIs, when config references removed helpers ('Nightmare', 'Protractor', 'TestCafe', 'AI', 'SoftExpectHelper', 'Mochawesome') or removed plugins ('autoLogin', 'tryTo', 'retryTo', 'eachElement', 'commentStep', 'fakerTransform', 'enhancedRetryFailedStep', 'allure', 'htmlReporter', 'wdio', 'selenoid', 'screenshotOnFail', 'pauseOnFail', 'stepByStepReport'), or when '3.x' APIs are in use ('ai.request' function, Joi schemas in 'seeResponseMatchesJsonSchema', 'restart: 'browser'', 'I.retry()', 'I.limitTime()', Playwright 'customLocators'). Walks the project through Node + package upgrade, ESM conversion, helper/plugin replacements, AI/Zod/effects API changes, 'noGlobals: true' adoption, dependency bumps, and the post-upgrade verify pass."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Migrate CodeceptJS 3.x → 4.x
|
|
8
|
+
|
|
9
|
+
CodeceptJS 4 is **ESM-only and TypeScript-first**. There is no compatibility shim for CommonJS — every helper, page object, custom step, and config file must be ESM. This skill drives a project through the upgrade end-to-end.
|
|
10
|
+
|
|
11
|
+
The authoritative reference is `node_modules/codeceptjs/docs/migration-4.md` (after `npm install codeceptjs@4`). Read it once; this skill orchestrates the work and surfaces the parts agents miss.
|
|
12
|
+
|
|
13
|
+
## When to trigger
|
|
14
|
+
|
|
15
|
+
Detect *before* acting. Look for any of:
|
|
16
|
+
|
|
17
|
+
- `package.json` lists `"codeceptjs": "^3"` / `"3.x"`, or has no `"type": "module"`.
|
|
18
|
+
- Tests, page objects, helpers, or config use `require()` / `module.exports` against CodeceptJS.
|
|
19
|
+
- Config still references removed helpers (`Nightmare`, `Protractor`, `TestCafe`, `AI`, `SoftExpectHelper`, `Mochawesome`) or removed plugins (`autoLogin`, `tryTo`, `retryTo`, `eachElement`, `commentStep`, `fakerTransform`, `enhancedRetryFailedStep`, `allure`, `htmlReporter`, `wdio`, `selenoid`, `screenshotOnFail`, `pauseOnFail`, `stepByStepReport`).
|
|
20
|
+
- 3.x APIs: `ai.request`, Joi schemas in `seeResponseMatchesJsonSchema`, `restart: 'browser'`, `I.retry()`, `I.limitTime()`, Playwright `customLocators`, `I.softExpect*` / `I.flushSoftAssertions`.
|
|
21
|
+
- `--reporter mochawesome` in scripts/CI, or `mochawesome` in `package.json` / `mocha.reporterOptions`.
|
|
22
|
+
|
|
23
|
+
If none of these hint at 3.x, the project is likely on 4.x already — hand back to `codeceptjs-fundamentals`.
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
Phases run in order. Commit at each boundary so any regression is bisectable.
|
|
28
|
+
|
|
29
|
+
### 1. Bump Node and CodeceptJS
|
|
30
|
+
|
|
31
|
+
- Confirm Node ≥ 16 (recommended 20+); update `engines.node` and CI runners.
|
|
32
|
+
- `npm install codeceptjs@4`.
|
|
33
|
+
- TypeScript projects: `npm install --save-dev tsx`. Replaces `ts-node/esm`, which now warns.
|
|
34
|
+
|
|
35
|
+
### 2. Convert the project to ESM
|
|
36
|
+
|
|
37
|
+
- Add `"type": "module"` to `package.json`. **Without this, every `.js` file parses as CommonJS and ESM imports throw at load time.**
|
|
38
|
+
- Convert config, page objects, custom helpers, custom steps, programmatic usage:
|
|
39
|
+
- `const Helper = require('@codeceptjs/helper')` → `import Helper from '@codeceptjs/helper'`
|
|
40
|
+
- `module.exports = X` → `export default X` (or named exports)
|
|
41
|
+
- `const { codecept, container, event } = require('codeceptjs')` → `import codeceptjs, { container, event } from 'codeceptjs'`
|
|
42
|
+
- `Container.create()` and `Config.load()` are now async — `await` them.
|
|
43
|
+
- Files that genuinely need CJS (rare; usually third-party shims): rename to `.cjs`.
|
|
44
|
+
|
|
45
|
+
### 3. Remove or replace deleted helpers and plugins
|
|
46
|
+
|
|
47
|
+
| Old | Replacement |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Helper `Nightmare` / `Protractor` / `TestCafe` | `Playwright`, `Puppeteer`, or `WebDriver`. |
|
|
50
|
+
| Helper `AI` | Top-level `ai:` config + `aiTrace` plugin. |
|
|
51
|
+
| Helper `SoftExpectHelper` | `import { hopeThat } from 'codeceptjs/effects'`; call `hopeThat.noErrors()` at end of scenario. |
|
|
52
|
+
| Helper `Mochawesome` | **Stop and ask the user** — see "Mochawesome decision" below. Do not silently delete it. |
|
|
53
|
+
| Plugin `autoLogin` | `auth` plugin (see the `codeceptjs-auth` skill). |
|
|
54
|
+
| Plugin `tryTo` / `retryTo` | `import { tryTo, retryTo } from 'codeceptjs/effects'` |
|
|
55
|
+
| Plugin `eachElement` | `import { eachElement } from 'codeceptjs/els'` |
|
|
56
|
+
| Plugin `commentStep` | `import step from 'codeceptjs/steps'` → `step.section('name')` / `step.endSection()` |
|
|
57
|
+
| Plugin `fakerTransform` | `import { faker } from '@faker-js/faker'` directly in tests. |
|
|
58
|
+
| Plugin `enhancedRetryFailedStep` | Renamed to `retryFailedStep`. |
|
|
59
|
+
| Plugin `allure` / `htmlReporter` | `@testomatio/reporter` (HTML pipe). For JUnit XML, the `junitReporter` plugin. |
|
|
60
|
+
| Plugin `wdio` / `selenoid` | Configure via `helpers.WebDriver`, or run externally. |
|
|
61
|
+
| Plugin `screenshotOnFail` / `pauseOnFail` / `stepByStepReport` | Renamed `screenshot` / `pause` / `screenshot` with `slides: true`. Old names still resolve but emit a deprecation warning. |
|
|
62
|
+
|
|
63
|
+
#### Mochawesome decision
|
|
64
|
+
|
|
65
|
+
The bundled `Mochawesome` **helper** is removed in 4.x (the helper class, the `mochawesome` dependency, and the worker report-dir wiring). The `mochawesome` **reporter** itself still works — it is a stock Mocha reporter and never needed CodeceptJS to bundle it.
|
|
66
|
+
|
|
67
|
+
This is a **user choice — do not pick for them**. When you detect Mochawesome (the helper in `helpers:`, `--reporter mochawesome`, or `mochawesome` in `package.json`/`mocha.reporterOptions`), stop and ask which path they want:
|
|
68
|
+
|
|
69
|
+
1. **Switch to `@testomatio/reporter` (recommended).** Richer HTML report (steps, screenshots, videos, traces), worker-safe, no helper or internal coupling. `npm install --save-dev @testomatio/reporter`, enable the `testomatio` plugin, run with `TESTOMATIO_DISABLE_UPLOAD=1`. For JUnit XML add the `junitReporter` plugin. This is the path to recommend.
|
|
70
|
+
2. **Keep Mochawesome — report only.** Remove the `Mochawesome` helper from `helpers:`, keep `npm i -D mochawesome` and `--reporter mochawesome --reporter-options reportDir=output`. Loses the auto-embedded failure screenshots the helper provided.
|
|
71
|
+
3. **Keep Mochawesome — with embedded screenshots.** Remove the helper from `helpers:` and re-create it as a **project-local custom helper** that wraps `mochawesome/addContext` (a faithful port is in the migration guide, section "Keeping Mochawesome"). Flag the two caveats: it imports non-semver-stable `codeceptjs/lib/*` internals (pin the version), and the screenshot-plugin filename sync is no longer automatic (set `uniqueScreenshotNames` identically on the helper and the `screenshot` plugin).
|
|
72
|
+
|
|
73
|
+
In all cases also: remove `mochawesome` report-dir handling from any custom worker scripts, and replace any reliance on `I.addMochawesomeContext()` (only option 3 keeps it).
|
|
74
|
+
|
|
75
|
+
Present options 1–3 explicitly and let the user decide before changing anything. Default the recommendation to option 1. The full reference (before/after configs + the custom-helper port) is in `node_modules/codeceptjs/docs/migration-4.md` → "Mochawesome → Testomat.io Reporter".
|
|
76
|
+
|
|
77
|
+
### 4. Update changed APIs
|
|
78
|
+
|
|
79
|
+
- **AI config** — delete the `request` function. Install Vercel AI SDK + provider (`npm install ai @ai-sdk/openai`) and set `ai: { model: openai('gpt-5') }`. Same shape for `@ai-sdk/anthropic`, `@ai-sdk/google`, etc.
|
|
80
|
+
- **JSON schemas** — `I.seeResponseMatchesJsonSchema()` now uses Zod, not Joi. Rewrite (`Joi.object().keys({...})` → `z.object({...})`, `Joi.string().required()` → `z.string()`, etc.) and `npm uninstall joi`.
|
|
81
|
+
- **Playwright** — replace `restart: 'browser'` with `'session'` (default), `'context'`, or `'keep'`. Drop `customLocators` config; use the `customLocator` plugin or ARIA locators (`{ role: 'button', name: 'Submit' }`).
|
|
82
|
+
- **`I.retry()` / `I.limitTime()`** — **removed** (not just deprecated). Replace with the step options API: `import step from 'codeceptjs/steps'`, then pass the config as the **last argument** of the step. `I.retry(3).click('Submit')` → `I.click('Submit', step.retry(3))`; `I.limitTime(10).fillField('Email', x)` → `I.fillField('Email', x, step.timeout(10))`. Also `step.opts({ elementIndex: 2 })`. Behavior is unchanged except the option no longer leaks onto the following step. `recorder.retry()` is unaffected (custom helpers only).
|
|
83
|
+
- **`within` and `session`** — no longer global. `import { within, session } from 'codeceptjs'` (or `within` from `codeceptjs/effects`). Both return Promises — `await` when you need the return value.
|
|
84
|
+
- **Subpath imports** — `codeceptjs/effects`, `codeceptjs/els`, `codeceptjs/steps`, `codeceptjs/store`, `codeceptjs/assertions`. See the migration guide for the full list.
|
|
85
|
+
- **`tryTo` / `hopeThat`** — return `Promise<boolean>` (the 3.x `Promise<T | false>` shape is gone).
|
|
86
|
+
|
|
87
|
+
### 5. Adopt `noGlobals: true`
|
|
88
|
+
|
|
89
|
+
3.x leaked `Helper`, `actor`, `inject`, `share`, `secret`, `locate`, `dataTable`, `within`, `session`, `codecept_dir`, `output_dir` as globals. 4.x defaults `noGlobals: true` in new configs and warns for projects without it. Add it to config and replace globals with explicit imports from `codeceptjs` / `@codeceptjs/helper`. Test-runner globals (`Feature`, `Scenario`, `Before`, `After`, `BeforeSuite`, `AfterSuite`, `pause`, `inject`, `share`) and BDD step-definition globals (`Given`, `When`, `Then`, `And`) **stay** — they're scope-injected by the runner.
|
|
90
|
+
|
|
91
|
+
### 6. Bump dependent packages
|
|
92
|
+
|
|
93
|
+
If your project depends directly on these, verify nothing breaks: `chai` (4 → 6, ESM-only), `chai-as-promised` (7 → 8), `commander` (11 → 14), `@faker-js/faker` (9 → 10), `chokidar` (4 → 5), `@cucumber/gherkin` (35 → 38), `webdriverio` (9.12 → 9.23). `joi` and `testcafe` are removed. See migration guide §7 for the full table.
|
|
94
|
+
|
|
95
|
+
### 7. Verify
|
|
96
|
+
|
|
97
|
+
Run, in order:
|
|
98
|
+
|
|
99
|
+
1. `npx codeceptjs check -c <config>` — surfaces config / helper / plugin / page object issues without spinning up a browser.
|
|
100
|
+
2. `npx codeceptjs run --debug` on a small smoke scenario. Confirm steps execute and the report is sane.
|
|
101
|
+
3. `npx codeceptjs run-workers 2` — confirms the worker event dispatcher fires per-test events the same way it does in single-process mode (4.x change).
|
|
102
|
+
4. TypeScript users: confirm error stack traces point at `.ts` source lines (proves `tsx` is loaded, not `ts-node/esm`).
|
|
103
|
+
5. Grep the repo for `tryTo(`, `retryTo(`, `eachElement(`, `commentStep(`, `softExpect`, `I.softExpect`, `Joi.`, `restart: 'browser'`, `I.retry(`, `I.limitTime(`, and (unless the user chose to keep it) `Mochawesome` / `--reporter mochawesome` — none should remain. `step.retry(` / `step.timeout(` passed as a step argument is the expected replacement, not a leftover.
|
|
104
|
+
6. If the project used `autoLogin`: confirm the `auth` plugin restores sessions and roles.
|
|
105
|
+
|
|
106
|
+
## Pointers
|
|
107
|
+
|
|
108
|
+
- `node_modules/codeceptjs/docs/migration-4.md` — full reference (this skill is a workflow over it)
|
|
109
|
+
- `codeceptjs-auth` — replacement for the removed `autoLogin` plugin
|
|
110
|
+
- `codeceptjs-fundamentals` — run **after** migration to confirm the new setup is wired correctly
|