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
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "testeiya",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "AI Testing Agent - QA and testing focused AI assistant",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/testomatio/testeiya-app",
|
|
9
|
+
"directory": "cli"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"testeiya": "src/cli.ts"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src",
|
|
16
|
+
"skills",
|
|
17
|
+
"skills.yaml",
|
|
18
|
+
"skills.lock.json",
|
|
19
|
+
"models.catalog.json",
|
|
20
|
+
"testeiya.config.json",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"test": "bun test",
|
|
29
|
+
"start": "bun src/cli.ts",
|
|
30
|
+
"dev": "bun src/cli.ts",
|
|
31
|
+
"serve:app": "bun src/app-server.ts",
|
|
32
|
+
"serve:app:watch": "bun --watch src/app-server.ts",
|
|
33
|
+
"setup:env": "bun scripts/setup-env.ts",
|
|
34
|
+
"collect:models": "bun scripts/collect-models.ts",
|
|
35
|
+
"debug:trace": "bun scripts/langfuse-trace.ts",
|
|
36
|
+
"debug:snapshot": "bun scripts/debug-snapshot.ts",
|
|
37
|
+
"debug:layout": "bun scripts/debug-layout.ts"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"testing",
|
|
41
|
+
"qa",
|
|
42
|
+
"ai",
|
|
43
|
+
"agent"
|
|
44
|
+
],
|
|
45
|
+
"author": "",
|
|
46
|
+
"license": "ISC",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@langfuse/otel": "^5.4.1",
|
|
49
|
+
"@langfuse/tracing": "^5.4.1",
|
|
50
|
+
"@oh-my-pi/pi-ai": "^13.19.0",
|
|
51
|
+
"@oh-my-pi/pi-coding-agent": "^13.19.0",
|
|
52
|
+
"@oh-my-pi/pi-natives": "^13.19.0",
|
|
53
|
+
"@opentelemetry/api": "^1.9.1",
|
|
54
|
+
"@opentelemetry/sdk-node": "^0.218.0",
|
|
55
|
+
"@playwright/cli": "^0.1.13",
|
|
56
|
+
"@testomatio/mcp": "^2.1.1",
|
|
57
|
+
"check-tests": "^0.20.0",
|
|
58
|
+
"dedent": "^1.7.2",
|
|
59
|
+
"evlog": "^2.22.3",
|
|
60
|
+
"ignore": "^5.3.2",
|
|
61
|
+
"yaml": "^2.9.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@types/node": "^22.19.19",
|
|
65
|
+
"bun-types": "^1.3.14",
|
|
66
|
+
"typescript": "^5.9.3"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"bun": ">=1.3.5"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-fix-tests
|
|
3
|
+
description: "Use on CI in non-interactive mode when a CodeceptJS run failed — automatically attempt safe fixes (locator drift, missing waits), rerun only the failing scenarios, compare against the baseline, roll back any edit that didn't help, and always write a markdown report at `output/ci-fix.md` for the CI step to consume. Conservative by design: no refactors, no config edits, no auth fixes, no flake-masking retries. Trigger on \"ci fix tests\", \"auto-fix failing tests\", \"attempt repair on CI\", or as a CI step after a failed run."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Auto-fix CodeceptJS Tests on CI
|
|
7
|
+
|
|
8
|
+
A non-interactive auto-repair loop. Reads the failed-tests baseline from `output/` (where `aiTrace` left trace artifacts), attempts a small set of safe fixes, reruns only the failing scenarios, compares, and writes a report at `output/ci-fix.md`. Rolls back any edit that didn't help.
|
|
9
|
+
|
|
10
|
+
**Conservative by design.** CI is not the place to restructure tests, change abstractions, or fix anything that needs human judgement. The goal is "pass the run". Anything riskier is escalated through the report.
|
|
11
|
+
|
|
12
|
+
This skill assumes a working **git** checkout — rollback uses `git checkout -- <file>` to restore originals.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Read the baseline failures
|
|
17
|
+
Use the **codeceptjs-run-analysis** skill against the existing `output/trace_*/` artifacts to enumerate every failing scenario. Record:
|
|
18
|
+
|
|
19
|
+
- the **set** of failing tests (file path + scenario name)
|
|
20
|
+
- the failed step in each, and the locator / wait / assertion involved
|
|
21
|
+
- a cluster signature per failure (so unique vs systemic is clear)
|
|
22
|
+
|
|
23
|
+
Save this as the **baseline** — `count`, `failing_set`, `clusters`.
|
|
24
|
+
|
|
25
|
+
### 2. Pick safe fix candidates
|
|
26
|
+
Only attempt fixes from this allowed list:
|
|
27
|
+
|
|
28
|
+
- **Locator drift** — the failed locator no longer matches anything but a similar element exists. Use the **codeceptjs-exploration** skill (headless) to find candidates; pick one with high semantic stability (ARIA `{ role, name }` → visible text → `data-testid` → composed CSS). Replace the locator at the failing step only.
|
|
29
|
+
- **Missing wait for a spinner / loader / modal** — the failed step's ARIA snapshot shows a spinner or skeleton present, or the target element appears later. Add a single matching `I.waitFor*` immediately before the failing step.
|
|
30
|
+
- **`I.wait(N)` replacement** — when a hardcoded sleep is the only thing between a failing assertion and a passing one and the gating element is identifiable, replace the sleep with a specific `waitFor*`.
|
|
31
|
+
|
|
32
|
+
**Do not attempt:**
|
|
33
|
+
- Auth / credential / env-var fixes — those are CI configuration, not test code.
|
|
34
|
+
- Refactoring (extracting page objects, custom helpers, splitting scenarios).
|
|
35
|
+
- Renaming Scenarios or tags — CI's `--grep` and pipelines reference them.
|
|
36
|
+
- Adding `retries: N` to a Scenario — masking flake is a human decision.
|
|
37
|
+
- Anything outside the failing test file (no `codecept.conf.*`, no helper, no PO edits).
|
|
38
|
+
|
|
39
|
+
If a failure doesn't match any allowed-fix pattern, **skip it** and record it as `unresolved` for the report.
|
|
40
|
+
|
|
41
|
+
### 3. Apply edits and rerun
|
|
42
|
+
Track every modification: file path, line number, before/after snippet, fix kind. Then rerun **only the failing scenarios** under the same config CI used:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx codeceptjs run --grep '<scenario>|<scenario>|...'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Find the right config via `package.json` scripts or the CI workflow file. Match the worker count if `run-workers` was used originally.
|
|
49
|
+
|
|
50
|
+
### 4. Compare against the baseline
|
|
51
|
+
Use **codeceptjs-run-analysis** again to enumerate the failing set after the fix.
|
|
52
|
+
|
|
53
|
+
| New failing-set vs baseline | Status |
|
|
54
|
+
|---|---|
|
|
55
|
+
| Empty (zero failures) | `SUCCESS_FULL` |
|
|
56
|
+
| Strict subset of the baseline | `SUCCESS_PARTIAL` |
|
|
57
|
+
| Identical set | `NO_IMPROVEMENT` |
|
|
58
|
+
| Larger, or contains a test not in baseline | `REGRESSED` |
|
|
59
|
+
|
|
60
|
+
### 5. Decide: keep or roll back
|
|
61
|
+
|
|
62
|
+
- `SUCCESS_FULL` / `SUCCESS_PARTIAL` → **keep** the edits.
|
|
63
|
+
- `NO_IMPROVEMENT` / `REGRESSED` → **roll back every edit** with `git checkout -- <files>`. The on-disk state at the end of the skill must be identical to what it was at the start.
|
|
64
|
+
|
|
65
|
+
A regression is treated the same as no improvement — the attempt didn't work, the working state is what was on disk before. Don't try to "undo only the bad ones" — the whole batch goes.
|
|
66
|
+
|
|
67
|
+
### 6. Write the report (always)
|
|
68
|
+
Write `output/ci-fix.md` regardless of outcome — CI reads it to surface results.
|
|
69
|
+
|
|
70
|
+
## Report format
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
# CI Fix Report — <ISO timestamp>
|
|
74
|
+
|
|
75
|
+
**Status:** SUCCESS_FULL | SUCCESS_PARTIAL | NO_IMPROVEMENT | REGRESSED
|
|
76
|
+
|
|
77
|
+
## Baseline
|
|
78
|
+
Failing scenarios: N
|
|
79
|
+
- `tests/foo_test.js` — "user can log in"
|
|
80
|
+
- `tests/bar_test.js` — "checkout flow"
|
|
81
|
+
- ...
|
|
82
|
+
|
|
83
|
+
## Attempted fixes
|
|
84
|
+
- `tests/foo_test.js:42` — locator drift: `'Save'` → `{ role: 'button', name: 'Save' }`
|
|
85
|
+
- `tests/bar_test.js:15` — added `I.waitForInvisible('.spinner')` before checkout click
|
|
86
|
+
- `tests/baz_test.js:7` — replaced `I.wait(3)` with `I.waitForVisible('.confirmation-dialog', 10)`
|
|
87
|
+
|
|
88
|
+
## Result
|
|
89
|
+
Failing scenarios after fix: M (was N)
|
|
90
|
+
- Resolved: `tests/foo_test.js` — "user can log in"
|
|
91
|
+
- Still failing: `tests/bar_test.js` — "checkout flow"
|
|
92
|
+
- New failures (REGRESSED only): `tests/baz_test.js` — "edit profile"
|
|
93
|
+
|
|
94
|
+
## Failure clusters (NO_IMPROVEMENT / REGRESSED only)
|
|
95
|
+
- **Cluster A (3 scenarios)** — `Element not found: button.btn-primary`. Likely a deploy regression or design change.
|
|
96
|
+
- **Cluster B (1 scenario)** — `Navigation timeout to /checkout`. Possible backend issue.
|
|
97
|
+
|
|
98
|
+
## Discarded changes (NO_IMPROVEMENT / REGRESSED only)
|
|
99
|
+
- `tests/foo_test.js` — restored
|
|
100
|
+
- `tests/bar_test.js` — restored
|
|
101
|
+
- `tests/baz_test.js` — restored
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The first line of `Status:` is the machine-parseable signal. The rest is for the human reading the failed CI build.
|
|
105
|
+
|
|
106
|
+
## Things to avoid
|
|
107
|
+
|
|
108
|
+
- Editing files outside the failing test files. Config, helpers, page objects, and CI workflows are off-limits in this mode.
|
|
109
|
+
- Attempting more than one fix kind on the same scenario in one pass. Fix one thing, observe, then try another.
|
|
110
|
+
- `retries: N` to mask flakiness — human decision.
|
|
111
|
+
- Skipping rollback on `NO_IMPROVEMENT`. Even no-op edits can confuse the next run or the next reviewer.
|
|
112
|
+
- Writing a partial or missing `output/ci-fix.md`. CI depends on it; the absence of a report is itself a failure mode.
|
|
113
|
+
- Running the **whole** suite for the verification step — only the originally-failing scenarios, to keep CI time bounded.
|
|
114
|
+
|
|
115
|
+
## Pointers
|
|
116
|
+
|
|
117
|
+
- `codeceptjs-run-analysis` — read trace artifacts, cluster failures, build the baseline set.
|
|
118
|
+
- `codeceptjs-exploration` — find replacement locators when one has drifted.
|
|
119
|
+
- `codeceptjs-fundamentals` — confirm helper, config, which env the CI run used.
|
|
120
|
+
- `node_modules/codeceptjs/docs/aitrace.md` — trace format.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeceptjs-auth
|
|
3
|
+
description: Use when a CodeceptJS test needs login, when different user roles are involved, or when the writing-codeceptjs-tests skill identifies authorization is required. Configures the `auth` plugin for session reuse, derives the login flow from the actual login page HTML (not guesses), keeps the real flow inside `steps_file.js` so `I.login*()` is callable directly and the conf stays small, loads credentials from a `.env` file via the modern Node `process.loadEnvFile()` API (no `dotenv` dependency), and supports multiple roles. Trigger on mentions of login, sign-in, sign-up, authentication, sessions, "logged in", admin/editor/user roles, or auth-related test failures.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CodeceptJS Auth Plugin
|
|
7
|
+
|
|
8
|
+
The `auth` plugin logs each user in once, captures cookies (or local-storage / token via overrides), and restores the session for subsequent tests. Stale sessions trigger a fresh login automatically.
|
|
9
|
+
|
|
10
|
+
Source of truth: `node_modules/codeceptjs/lib/plugin/auth.js` — JSDoc lists every recipe. Reference doc: `node_modules/codeceptjs/docs/auth.md`.
|
|
11
|
+
|
|
12
|
+
## When to add it
|
|
13
|
+
|
|
14
|
+
Suggested if tests have repeatable authentication and session is needed to be persisted accross tests. Also optimizes start time of tests by saving previous sessision cookies in files.
|
|
15
|
+
|
|
16
|
+
Suggested as performance optimization, refactoring measure.
|
|
17
|
+
|
|
18
|
+
If `auth` plugin already exists in the project (check fundamentals' output), reuse the existing `inject` name and user keys.
|
|
19
|
+
|
|
20
|
+
## Decide first — ask the user
|
|
21
|
+
|
|
22
|
+
Four answers shape the plugin. Don't guess any. If the project or test plan doesn't make them obvious, ASK.
|
|
23
|
+
|
|
24
|
+
1. **Is a session needed at all?** Public flows (landing, signup) don't need one — skip the plugin.
|
|
25
|
+
2. **One user or many?** Default to one. Add more only when more than one is actually exercised.
|
|
26
|
+
3. **If many — what splits them?** Don't assume "admin / editor / viewer". Real systems split users by role, workspace / tenant, plan tier, sign-in provider (Google vs SSO vs password — same person), or per-test fixture. ASK the user; use the answer to name the `users.<key>` entries.
|
|
27
|
+
4. **What's the auth type?** Form login is the default; others need a different `login()` body:
|
|
28
|
+
- **Form** — `fillField` → `click Sign in`. Canonical shape below.
|
|
29
|
+
- **OAuth / SSO** — click provider button, drive the IdP page (often a separate origin).
|
|
30
|
+
- **Magic link / passwordless** — UI flow is rarely worth automating. Prefer a backdoor — API mint, or read the link from a test mailbox.
|
|
31
|
+
- **API token** — skip the form; `I.executeScript` to write the token into `localStorage`, or `I.setCookie(...)`.
|
|
32
|
+
- **2FA / OTP** — `async login`; fetch the code from a test mailbox / backdoor before submitting.
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
1. **Login flow must not be written in the conf.** Better to place it nto steps_file.js (if it is includded) or page object. The conf better to reference it like: `login: (I) => I.login()`.
|
|
37
|
+
2. **Credentials should not be stored in configs. Use `.env` via `process.loadEnvFile()`** (modern Node, no `dotenv` package). Passwords wrapped with `secret(...)`. No literal credentials anywhere — conf, steps file, test, or git history.
|
|
38
|
+
3. **`.env` is gitignored; `.env.example` is committed** with the var names and no values. `output/*_session.json` is gitignored too.
|
|
39
|
+
|
|
40
|
+
## Canonical shape
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
// codecept.conf.js — first line of the file
|
|
44
|
+
process.loadEnvFile() // or dotenv.load() if this package availble
|
|
45
|
+
// ...
|
|
46
|
+
|
|
47
|
+
export const config = {
|
|
48
|
+
// ...
|
|
49
|
+
include: { I: './steps_file.js' },
|
|
50
|
+
plugins: {
|
|
51
|
+
auth: {
|
|
52
|
+
enabled: true,
|
|
53
|
+
saveToFile: true,
|
|
54
|
+
users: {
|
|
55
|
+
admin: {
|
|
56
|
+
login: (I) => I.login(),
|
|
57
|
+
check: (I) => I.see('Welcome, User', '.navbar'),
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
// steps_file.js
|
|
67
|
+
import { secret } from 'codeceptjs'
|
|
68
|
+
const { I } = inject()
|
|
69
|
+
|
|
70
|
+
export default function () {
|
|
71
|
+
return actor({
|
|
72
|
+
login() {
|
|
73
|
+
I.amOnPage('/login')
|
|
74
|
+
I.fillField('Email', process.env.ADMIN_EMAIL)
|
|
75
|
+
I.fillField('Password', secret(process.env.ADMIN_PASSWORD))
|
|
76
|
+
I.click('Sign in')
|
|
77
|
+
},
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
# .env (gitignored) # .env.example (committed)
|
|
84
|
+
USER_EMAIL=USER@example.com USER_EMAIL=
|
|
85
|
+
USER_PASSWORD=<secret> USER_PASSWORD=
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Pre-flight (before writing config)
|
|
89
|
+
|
|
90
|
+
1. **Read the real login page HTML.** Don't guess locators. MCP: `run_code` to login page and inspect the ARIA snapshot. Field labels / `name` / `id` / submit control — from the actual page. It's ok to ask user about authorization if it is not clear how to makeit.
|
|
91
|
+
2. **Pick a role-specific post-login marker.** Something the page renders only for *this* user (navbar username, `data-user-role`).
|
|
92
|
+
3. **Confirm session storage.** Cookies (default) for server-rendered apps; `localStorage`/`sessionStorage` for SPAs — verify with `I.executeScript(() => Object.keys(localStorage))` after a manual login. Default cookie `fetch`/`restore` silently no-op for token storage.
|
|
93
|
+
|
|
94
|
+
## Verify
|
|
95
|
+
|
|
96
|
+
Or MCP `run_test` against a one-Scenario file that calls `login(<role>)` then asserts on the post-login marker.
|
|
97
|
+
|
|
98
|
+
Enable `saveToFile: true` only after the verification round-trip succeeds — a bad saved session masks a broken `login`.
|
|
99
|
+
|
|
100
|
+
## Refactor
|
|
101
|
+
|
|
102
|
+
Add to before hooks (if applied to all tests in suite) or to exact tests in syute
|
|
103
|
+
|
|
104
|
+
`Before(({ login }) => login())`
|
|
105
|
+
|
|
106
|
+
`login` was declared in auth plugin configuration
|
|
107
|
+
|
|
108
|
+
Run real, not dry:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx codeceptjs run --grep '<scenario>' --debug
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## Multi-session shape
|
|
116
|
+
|
|
117
|
+
Only after question 3 is answered. Name `users.<key>` after whatever splits them in *this* system; one matching login method per key in `steps_file.js`.
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
// keys named after the dimension (role / workspace / provider / …)
|
|
121
|
+
users: {
|
|
122
|
+
admin: { login: (I) => I.loginAsAdmin() },
|
|
123
|
+
workspaceB: { login: (I) => I.loginToWorkspaceB() },
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Don't parameterise into a single `login(key)` — the plugin keys sessions by name and explicit methods read better. Switching between sessions in one Scenario: `session('<key>')` opens a separate browser context (see `node_modules/codeceptjs/docs/sessions.md`).
|
|
128
|
+
|
|
129
|
+
## Token / local-storage auth
|
|
130
|
+
|
|
131
|
+
When sessions live outside cookies, override `fetch` and `restore`:
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
admin: {
|
|
135
|
+
login: (I) => I.loginAsAdmin(),
|
|
136
|
+
check: (I) => I.see('Admin', '.navbar'),
|
|
137
|
+
fetch: (I) => I.executeScript(() => localStorage.getItem('session_id')),
|
|
138
|
+
restore: (I, session) => {
|
|
139
|
+
I.amOnPage('/')
|
|
140
|
+
I.executeScript((s) => localStorage.setItem('session_id', s), session)
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`check(I, session)` receives whatever `fetch` returned — throw inside `check` to force a fresh login (e.g., when a `/me` endpoint shows the wrong user).
|
|
146
|
+
|
|
147
|
+
## Common pitfalls
|
|
148
|
+
|
|
149
|
+
- **Credentials inlined in conf or test.** Always env-driven. A code review showing a literal email or password = skill failed.
|
|
150
|
+
- **Forgetting to gitignore `.env` and `output/*_session.json`.** Both leak credentials.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## Pointers
|
|
154
|
+
|
|
155
|
+
- `node_modules/codeceptjs/lib/plugin/auth.js` — JSDoc recipes (cookie / multi-user / local-storage / async / session-validation)
|
|
156
|
+
- `node_modules/codeceptjs/docs/auth.md` — full reference
|
|
157
|
+
- `node_modules/codeceptjs/docs/sessions.md` — `session()` for multi-user Scenarios
|
|
158
|
+
- `node_modules/codeceptjs/docs/secrets.md` — the `secret()` wrapper
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeceptjs-exploration
|
|
3
|
+
description: Use to explore a page in CodeceptJS — read its ARIA tree, inspect candidate elements, pick a stable locator. Drives the live browser through MCP `run_code`, prefers ARIA over HTML, uses `I.grabWebElement` / `I.grabWebElements` with permissive XPaths to enumerate candidates and `toSimplifiedHTML` / `toAbsoluteXPath` to disambiguate. Other skills (`writing-codeceptjs-tests`, `debugging-codeceptjs-tests`, `refactoring-codeceptjs-tests`) invoke this whenever they need to learn what's on a page.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CodeceptJS Page Exploration
|
|
7
|
+
|
|
8
|
+
Authoring a test, debugging a failure, and refactoring a stale locator all share one task: open a page, find the right element, pick a stable locator. This skill is the playbook.
|
|
9
|
+
|
|
10
|
+
## How to look at a page
|
|
11
|
+
|
|
12
|
+
Drive everything through MCP. Two tools matter for exploration:
|
|
13
|
+
|
|
14
|
+
- **`run_code`** — runs CodeceptJS code and returns the value the code produced, captures `console.*` output, and saves a final-state snapshot. Use when you want to *do something and look at the result* (try a locator, grab a value, navigate).
|
|
15
|
+
- **`snapshot`** — captures the current state without performing any action: URL, cookies, localStorage, HTML, ARIA, screenshot, console. Use when you want to look at "what's on the page right now" between two actions, without re-running anything.
|
|
16
|
+
|
|
17
|
+
Three artifact sources, in order of preference:
|
|
18
|
+
|
|
19
|
+
1. **ARIA snapshot first.** Structured, free of styling noise, easy to scan for duplicates and accessibility names.
|
|
20
|
+
2. **Screenshot.** Visual confirmation — catches layout breaks, missing icons, "rendered but wrong" cases that ARIA can't show.
|
|
21
|
+
3. **HTML / outer markup.** Pull only when ARIA is missing crucial context: custom widgets without accessible names, attribute-driven behaviour, dynamic content with no roles.
|
|
22
|
+
|
|
23
|
+
## Inspect a known element
|
|
24
|
+
|
|
25
|
+
`I.grabWebElement(locator)` returns one WebElement; `I.grabWebElements(locator)` returns an array. Same cross-helper API on Playwright / Puppeteer / WebDriver, returns values back through MCP `run_code`.
|
|
26
|
+
|
|
27
|
+
| You want to … | Method on WebElement |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Confirm rendered / visible / enabled | `exists()`, `isVisible()`, `isEnabled()` |
|
|
30
|
+
| Read text / value / attribute / property | `getText()`, `getValue()`, `getAttribute(n)`, `getProperty(n)` |
|
|
31
|
+
| Where is it on the page | `getBoundingBox()` — flags offscreen / zero-sized |
|
|
32
|
+
| The actual rendered markup | `toOuterHTML()`, `toSimplifiedHTML(300)` (truncated, MCP-friendly) |
|
|
33
|
+
| Stable selector for a fix | `toAbsoluteXPath()` |
|
|
34
|
+
| Look inside an iframe | `inIframe(async (body) => { ... })` |
|
|
35
|
+
| Drill into children | `$(loc)`, `$$(loc)` |
|
|
36
|
+
| Run a browser-side function | `evaluate(fn, ...args)` |
|
|
37
|
+
|
|
38
|
+
## Discover candidates when the obvious locator misses
|
|
39
|
+
|
|
40
|
+
When `Edit` matches nothing, the control might say "Change", carry `aria-label="Edit user"`, or live in a `.btn-edit` class. Cast a wide net: pass a permissive XPath to `I.grabWebElements`, then disambiguate.
|
|
41
|
+
|
|
42
|
+
Build the XPath by ORing:
|
|
43
|
+
- visible text — `text()` (or `.` to match descendants too)
|
|
44
|
+
- relevant attributes — `@class`, `@aria-label`, `@title`, `@data-action`, `@id`
|
|
45
|
+
- **synonyms** — "edit" / "change" / "modify"; "delete" / "remove" / "trash"; "submit" / "send" / "save"
|
|
46
|
+
|
|
47
|
+
Wrap each match with `translate(...)` for case-insensitive `contains`:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
//*[contains(translate(., 'EDIT', 'edit'), 'edit')
|
|
51
|
+
or contains(translate(@class, 'EDIT', 'edit'), 'edit')
|
|
52
|
+
or contains(translate(@aria-label, 'EDIT', 'edit'), 'edit')
|
|
53
|
+
or contains(translate(., 'CHANGE', 'change'), 'change')]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then iterate `toSimplifiedHTML(150)` over the result, review the candidates, pick the right one, and commit a stable locator built from its discriminating attribute or text — or `toAbsoluteXPath()` if nothing else is stable.
|
|
57
|
+
|
|
58
|
+
## Pick a stable locator
|
|
59
|
+
|
|
60
|
+
Once the right element is identified, choose the locator with the highest semantic value that is still unique:
|
|
61
|
+
|
|
62
|
+
1. ARIA — `{ role: 'button', name: 'Edit user' }`. Survives CSS refactors.
|
|
63
|
+
2. Visible label / semantic text — `'Edit user'`. Easy to read.
|
|
64
|
+
3. `[data-testid="edit-user"]` if the team uses test attributes.
|
|
65
|
+
4. Composed CSS with a stable parent — `#user-row-42 button.edit`.
|
|
66
|
+
5. `toAbsoluteXPath()` from the candidate review — last resort; flag for the team to add a `data-testid`.
|
|
67
|
+
|
|
68
|
+
Don't commit a locator you didn't verify. After picking, run `I.seeElement(<locator>)` (or `grabWebElement(<locator>)`) through MCP `run_code` to confirm it matches exactly one element.
|
|
69
|
+
|
|
70
|
+
## Common patterns
|
|
71
|
+
|
|
72
|
+
- **Strict mode found 2 matches** — `grabWebElements('Save')`, `toSimplifiedHTML(200)` each, find a discriminator (parent class, `data-*`, surrounding text).
|
|
73
|
+
- **Button rendered but doesn't act** — `grabWebElement('Submit')`, then `isEnabled()` + `getBoundingBox()` — disabled? offscreen? zero-sized?
|
|
74
|
+
- **Wrong row in a list** — `grabWebElements('.user-row')`, `getText()` per row, identify, then `getAttribute('data-id')` for a stable hook.
|
|
75
|
+
- **Inside an iframe** — `(await I.grabWebElement('iframe.editor')).inIframe(async (body) => body.$('button'))`.
|
|
76
|
+
- **No semantic name on the element** — `toAbsoluteXPath()` for now; flag the team to add a `data-testid`.
|
|
77
|
+
|
|
78
|
+
## Things to avoid
|
|
79
|
+
|
|
80
|
+
- Choosing a locator without seeing the candidates first — you'll guess wrong and the test will be flaky.
|
|
81
|
+
- Committing `toAbsoluteXPath()` when a semantic locator is right there.
|
|
82
|
+
- Ignoring the screenshot — "element exists in HTML" doesn't mean "user can see it".
|
|
83
|
+
- Reaching for `usePlaywrightTo` / `useWebDriverTo` when WebElement methods cover the case (cross-helper code is preferred).
|
|
84
|
+
|
|
85
|
+
## Pointers
|
|
86
|
+
|
|
87
|
+
- `node_modules/codeceptjs/docs/web-element.md` — full WebElement API
|
|
88
|
+
- `node_modules/codeceptjs/docs/locators.md` — locator strategies and priorities
|
|
89
|
+
- `node_modules/codeceptjs/docs/element-selection.md` — `step.opts({ elementIndex })`, strict mode
|
|
90
|
+
- `node_modules/codeceptjs/docs/mcp.md` — MCP tool list
|
|
91
|
+
- `codeceptjs-fundamentals` skill — locator priority and the `await` rule
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeceptjs-fundamentals
|
|
3
|
+
description: "Run first when working with any CodeceptJS 4 project. Compact primer on the internals you must know — configuration, the `I` actor and helpers, the DI container and `inject()`, custom helpers (and the rule that `I` is unreachable from inside one), plugins as hook listeners, and the `await` rule. Then runs a four-step discovery against this project: `codeceptjs check` to verify the setup loads, read the config, run `codeceptjs list` to enumerate available `I.*` actions, run `codeceptjs dry-run` to enumerate existing tests — and reports which helper, plugins, env switching, page objects, custom actions, and test suites are actually active. Other CodeceptJS skills depend on this output."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CodeceptJS Fundamentals
|
|
7
|
+
|
|
8
|
+
Two jobs: teach the concepts you need to read CodeceptJS code without making things up, and report what *this* project has configured. Do both, in order.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Concepts
|
|
13
|
+
|
|
14
|
+
### Module system
|
|
15
|
+
CodeceptJS 4 is **ESM and TypeScript only**. Tests, configs, page objects, and helpers use `import`/`export`; `package.json` **must** have `"type": "module"` — if it isn't there yet, add it before doing anything else (without it, every `.js` file is parsed as CommonJS and imports fail). **TypeScript** is first-class: name the config `codecept.conf.ts`, add a loader entry like `require: ['tsx/cjs']` (or `ts-node/register`), and write tests as `.ts` files.
|
|
16
|
+
|
|
17
|
+
If the project is on **CodeceptJS 3.x or still uses CommonJS** (`require()` / `module.exports`, no `"type": "module"`, removed helpers/plugins like `autoLogin` or `Nightmare`), stop here and run the **`migrate-codeceptjs-4`** skill — it walks the full upgrade path (Node bump, ESM conversion, helper/plugin replacements, AI/Zod/effects API changes, `noGlobals`, dependency bumps, verify). Don't try to half-fix individual files; the migration is a whole-project change.
|
|
18
|
+
|
|
19
|
+
### Configuration
|
|
20
|
+
`codecept.conf.{js,ts,mjs,cjs}` at the repo root. Top-level keys: `helpers`, `plugins`, `include`, `ai`, `bootstrap`/`teardown`, `tests`, `output`, `timeout`. TypeScript configs declare a loader in `require: [...]` (`tsx/cjs`, `ts-node/register`, `ts-node/esm`). Multiple env-specific files (`codecept.ci.conf.js`, …) are selected via `--config <file>`. The `@codeceptjs/configure` package mutates the resolved config at load time (`setHeadlessWhen`, `setBrowser`, `setCommonPlugins`, `setWindowSize`) — static fields can lie until you grep for that import.
|
|
21
|
+
|
|
22
|
+
### `I` and helpers
|
|
23
|
+
`I` is the actor. Every `I.<method>(...)` is dispatched to whichever active helper provides that method. Built-in helpers contribute different surfaces: web (Playwright, Puppeteer, WebDriver — overlapping core actions plus helper-specific extras), API (REST, GraphQL), AI, mobile (Appium), utility (FileSystem). The active helpers are exactly the keys under `helpers` in config.
|
|
24
|
+
|
|
25
|
+
### `inject()` and the DI container
|
|
26
|
+
Everything testable lives in a global container — the actor, every helper, every page object listed in `include`, every custom step module, every support object. Inside a Scenario you destructure from the test signature: `Scenario('...', ({ I, loginPage }) => { ... })`. Inside a *file* (page object class, data factory, custom helper module) call `const { I } = inject()` once at the top to pull what you need from the container. The names available are exactly the keys in `include`.
|
|
27
|
+
|
|
28
|
+
### Custom helpers
|
|
29
|
+
Custom helpers extend `Helper` (from `codeceptjs`) and contribute new `I.<method>` calls. They register under `helpers` in config alongside built-ins. **You cannot call `I.*` from inside a custom helper — `I` does not exist in helper scope.** To compose with another helper, reach for it via `this.helpers['<Name>']` (e.g. `this.helpers['Playwright'].page` or `this.helpers['REST'].sendGetRequest(...)`). Helpers exist to expose new low-level capabilities; tests stay in the `I.*` vocabulary.
|
|
30
|
+
|
|
31
|
+
### Plugins and hooks
|
|
32
|
+
Plugins are event listeners. CodeceptJS emits lifecycle events on a global dispatcher; any plugin can subscribe. Events include `suite.before`/`after`, `test.before`/`started`/`passed`/`failed`/`after`, `step.before`/`started`/`passed`/`failed`/`after`, `hook.passed`/`failed`, `multiple.before`/`after`. Plugins react — taking screenshots, retrying, healing, writing artifacts, pausing. Built-ins live under `node_modules/codeceptjs/lib/plugin/`; the full event list is in `node_modules/codeceptjs/lib/event.js`. A plugin is registered under `plugins` with `enabled: true`. `setCommonPlugins()` from `@codeceptjs/configure` enables a recommended bundle silently.
|
|
33
|
+
|
|
34
|
+
### Plugins worth knowing
|
|
35
|
+
- `retryFailedStep` — re-runs a transient action failure
|
|
36
|
+
- `screenshot` — saves a screenshot when a step matches the trigger (default `on: 'fail'`); set `slides: true` to also produce a `output/records.html` slideshow (replaces the old `stepByStepReport`)
|
|
37
|
+
- `pageInfo` — dumps URL, HTML, console output on failure
|
|
38
|
+
- `auth` — session reuse for login (see the `codeceptjs-auth` skill)
|
|
39
|
+
- `aiTrace` — per-step screenshots/HTML/ARIA/console for AI debugging (default `on: 'step'`; set `on: 'fail'` to capture only failures)
|
|
40
|
+
- `pause` — interactive pause (replaces `pauseOn` / `pauseOnFail`; default `on: 'fail'`)
|
|
41
|
+
- `heal` — AI-suggested fixes for broken action steps (disabled in `--debug` mode)
|
|
42
|
+
- `screencast` — records a video / animated frames of the run (replaces `subtitles`)
|
|
43
|
+
- `browser` — CLI-only override of browser helper config; see the next section
|
|
44
|
+
|
|
45
|
+
### Running plugins from the CLI
|
|
46
|
+
Plugins are normally enabled in `codecept.conf.{js,ts}`, but any plugin can be turned on or reconfigured for a single run via `-p <plugin>` on the runner. Args chain with `:` (or `;` inside one arg):
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx codeceptjs run -p aiTrace # enable aiTrace for this run
|
|
50
|
+
npx codeceptjs run -p screenshot:on=step # screenshot every step
|
|
51
|
+
npx codeceptjs run -p pause:on=file:path=tests/login_test.js;line=43
|
|
52
|
+
npx codeceptjs run -p browser:hide:browser=firefox:windowSize=1280x800
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`screenshot`, `pause`, `aiTrace`, and `heal` share a unified **`on=` parameter** that picks when they fire:
|
|
56
|
+
|
|
57
|
+
| `on=` value | Fires when | Extra args |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `fail` | a step fails (default for screenshot / pause / heal) | — |
|
|
60
|
+
| `step` | every step (default for aiTrace) | — |
|
|
61
|
+
| `test` | after each test | — |
|
|
62
|
+
| `file` | execution reaches a file/line | `path=<file>[;line=<N>]` |
|
|
63
|
+
| `url` | browser URL matches a pattern | `pattern=<glob>` (`*` wildcards) |
|
|
64
|
+
|
|
65
|
+
The **`browser` plugin** is CLI-only and overrides the active browser helper without touching the config file — useful for one-off env variants and CI matrix legs:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx codeceptjs run -p browser:show # force visible
|
|
69
|
+
npx codeceptjs run -p browser:hide # force headless
|
|
70
|
+
npx codeceptjs run -p browser:browser=firefox # switch browser
|
|
71
|
+
npx codeceptjs run -p browser:windowSize=1024x768
|
|
72
|
+
npx codeceptjs run -p browser:hide:browser=webkit:windowSize=800x600
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Requires `@codeceptjs/configure` installed. It translates `browser=` per helper (Puppeteer's `product`, Playwright's `browser`) and injects `--headless` into WebDriver capability args when toggling `hide`.
|
|
76
|
+
|
|
77
|
+
### Test file structure
|
|
78
|
+
One `Feature(...)` per file with one or more `Scenario(...)` blocks inside it. CodeceptJS does **not** allow nested suites or multiple Features in the same file. Hooks: `Before`, `After`, `BeforeSuite`, `AfterSuite`, plus `Fail((test, err) => { ... })` for failure-only cleanup. Page objects can expose `_before`, `_after`, `_afterSuite` lifecycle methods so per-page setup lives next to the page.
|
|
79
|
+
|
|
80
|
+
### Locators
|
|
81
|
+
Most actions accept a locator as a plain string (semantic — visible text, label, placeholder, `name`) or an object (`{ css }`, `{ xpath }`, `{ role, name }`, `{ id }`, `{ aria }`). Prefer ARIA `{ role, name }` for resilience to markup changes; semantic strings for prototyping; CSS / XPath as fallback. The `locate(...)` builder composes complex queries (`.withClass`, `.withText`, `.inside`, `.and`, `.andNot`). Almost every action method takes an optional context arg that narrows the search to a subtree: `I.click('Save', '.modal')`.
|
|
82
|
+
|
|
83
|
+
### Auto-waiting
|
|
84
|
+
Action methods (`click`, `fillField`, `selectOption`, …) automatically wait for the element to exist and become interactable before acting. Explicit `I.waitFor*` calls are needed only when the next condition isn't tied to an interaction — a modal appearing after a network call, a spinner disappearing, a value updating. Avoid `I.wait(N)` (raw seconds) unless nothing else fits.
|
|
85
|
+
|
|
86
|
+
### Assertions
|
|
87
|
+
CodeceptJS ships built-in browser assertions: `I.see`, `I.dontSee`, `I.seeElement`, `I.dontSeeElement`, `I.seeInCurrentUrl`, `I.seeInTitle`, `I.seeInField`, `I.seeNumberOfElements`, `I.seeCookie`, `I.seeCheckboxIsChecked`, etc. Use these instead of an external `expect()` library — they produce clear failure messages and integrate with the recorder. For non-DOM assertions, use `grab*` plus any assertion library: `const title = await I.grabTitle(); expect(title).toEqual('My App')`.
|
|
88
|
+
|
|
89
|
+
### `await` inside tests
|
|
90
|
+
CodeceptJS queues steps onto an internal recorder; the framework chains them, you do not. **Use `await` only when you need a return value** — `await I.grabTextFrom(...)`, `await I.grabCookie(...)`, or when calling a user-defined `async` function. Plain action steps (`I.click`, `I.fillField`, `I.see`) do not need `await`. Same rule inside `within(...)` and `pause()` callbacks. Sprinkling unnecessary `await` doesn't break anything, but signals you don't trust the recorder.
|
|
91
|
+
|
|
92
|
+
### `secret()` for sensitive values
|
|
93
|
+
Wrap passwords, tokens, API keys so they're masked in logs, step output, and trace artifacts: `I.fillField('Password', secret(process.env.PASSWORD))`. Imported from `codeceptjs`. Use anywhere a value would otherwise leak through verbose output, trace files, or AI prompts.
|
|
94
|
+
|
|
95
|
+
### Sessions and `within`
|
|
96
|
+
- `session(name, fn)` runs `fn` in a parallel browser context — for multi-user Scenarios (chat, multi-tenant). Combined with the `auth` plugin, each session can log in as a different role.
|
|
97
|
+
- `within(locator, fn)` scopes locator resolution inside `fn` to the subtree under `locator`. `within({ frame: '#editor' }, fn)` switches into an iframe for the callback. Both can return values (`await within(..., () => I.grabTextFrom(...))`).
|
|
98
|
+
|
|
99
|
+
### Parallel runs
|
|
100
|
+
`npx codeceptjs run-workers <N>` splits Scenarios across N Node worker threads; results aggregate in the main process. The config can also describe **profiles** (different browsers, viewports, environments) via the `multiple` block; launch with `npx codeceptjs run-multiple <profile>`.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Discover this project
|
|
105
|
+
|
|
106
|
+
Four steps, in order. Don't skip — guesses about helpers, custom actions, or what tests exist will be wrong as often as they're right.
|
|
107
|
+
|
|
108
|
+
### 1. Verify the setup loads
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
npx codeceptjs check -c <config> # validates config, container, helpers, plugins, page objects, hooks, tests, defs
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Each item prints a pass/fail line, so the output doubles as a quick inventory of what the project has wired up. If anything fails here, fix it before running `list` or `dry-run` — a broken helper or unresolved page object will distort their output. Skipping this step also means you won't notice a missing dependency, an `auth` plugin pointed at a non-existent login route, or a custom helper that throws at construction.
|
|
115
|
+
|
|
116
|
+
### 2. Read the active config
|
|
117
|
+
|
|
118
|
+
Open `codecept.conf.{js,ts,mjs,cjs}` (resolve via `package.json` scripts and CI workflows if multiple files exist — note the path; you'll pass it to `-c` in steps 3 and 4). Extract: which helper(s) and any non-default behaviour (browser, strict, navigation, base URL, viewport, env-driven values); which plugins (incl. anything `setCommonPlugins()` injects); AI provider + the env var its key requires; how environments are selected (`--config` vs `process.env.*` branching, plus any `setHeadlessWhen`-style mutations); page object names from `include`; any custom helpers (entries pointing at local files).
|
|
119
|
+
|
|
120
|
+
### 3. List available actions
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
npx codeceptjs list -c <config> # every I.<method>, grouped by helper, with signature
|
|
124
|
+
npx codeceptjs list --docs -c <config> # adds JSDoc + docs/webapi/* prose under each action
|
|
125
|
+
npx codeceptjs list --action <name> -c <config> # single action; I. prefix optional; implies --docs
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Run `list` against the discovered config before suggesting any method — especially in projects with custom helpers, where the available `I.*` surface differs from the built-in catalog. The CodeceptJS MCP server's `list_actions` tool returns the same data programmatically.
|
|
129
|
+
|
|
130
|
+
### 4. List existing tests
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
npx codeceptjs dry-run -c <config> # suite + test names that the config would load
|
|
134
|
+
npx codeceptjs dry-run --steps -c <config> # also prints queued I.* steps inside each test
|
|
135
|
+
npx codeceptjs dry-run --grep "@smoke" -c <config> # filter by name; --features / --tests narrow file kind
|
|
136
|
+
npx codeceptjs dry-run --debug --grep '<test>' --numbers --no-ansi -c <config> # numbered steps, no ANSI
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
`dry-run` walks the test files the active config picks up and prints them without executing — confirming both **which tests exist** and (with `--steps`) **what each Scenario would do** before any browser spins up.
|
|
140
|
+
|
|
141
|
+
`--numbers` (paired with `--debug`, `--steps`, or `--verbose`) prefixes each leaf step with a per-test 1-based index. The numbering matches the `pauseAt: N` parameter on the MCP `run_test` tool — so this is the canonical way to discover step indices for programmatic breakpoints. `--no-ansi` strips colors / ANSI escapes so the output is clean for LLM consumption or piping to other tools.
|
|
142
|
+
|
|
143
|
+
For Gherkin step definitions specifically, `npx codeceptjs gherkin:steps -c <config>` lists registered step patterns.
|
|
144
|
+
|
|
145
|
+
## Report
|
|
146
|
+
|
|
147
|
+
Short prose summary covering the items above. Flag env-driven values explicitly — don't claim a fixed value when it's `process.env.BROWSER || 'chromium'`. Flag conflicts (static `show: true` overridden by `setHeadlessWhen(CI)`; `auth` configured but the credential env vars are missing from the current shell or `.env.example`). If no config exists at the repo root and no `--config` is referenced anywhere, recommend `npx codeceptjs init .` and stop. **If the project is on CodeceptJS 3.x or CommonJS, recommend the `migrate-codeceptjs-4` skill and stop** — discovery output for a pre-4 project will misrepresent the available APIs.
|
|
148
|
+
|
|
149
|
+
## Pointers
|
|
150
|
+
|
|
151
|
+
- `node_modules/codeceptjs/docs/configuration.md` — config reference
|
|
152
|
+
- `node_modules/codeceptjs/docs/typescript.md` — TS loader options
|
|
153
|
+
- `node_modules/codeceptjs/docs/helpers.md` — helper concepts and method catalogs
|
|
154
|
+
- `node_modules/codeceptjs/docs/custom-helpers.md` — writing your own
|
|
155
|
+
- `node_modules/codeceptjs/docs/plugins.md` — plugin authoring + built-ins
|
|
156
|
+
- `node_modules/codeceptjs/docs/hooks.md` — suite/test/step hook semantics
|
|
157
|
+
- `node_modules/codeceptjs/lib/event.js` — every event the dispatcher emits
|
|
158
|
+
- `@codeceptjs/configure` (npm) — the mutator API surface
|