.cursor/skills/qa-codeceptjs-writer/SKILL.md
Generate CodeceptJS scenario-driven E2E and BDD tests for TypeScript with human-readable syntax, multi-backend support (Playwright/WebDriver/Puppeteer), and Gherkin integration.
npx skillsauth add AZANIR/qa-skills qa-codeceptjs-writerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write CodeceptJS BDD/scenario-driven E2E tests from test case specifications. Transform structured test cases into executable scenarios using human-readable syntax (I.click, I.see, I.fillField), multi-backend support, and optional Gherkin BDD integration.
Feature/Scenario blocks or .feature filescodecept.conf.ts has correct helper (Playwright, WebDriver, Puppeteer)| Feature | Description |
|---------|-------------|
| Scenario-driven syntax | I.click, I.see, I.fillField, I.grabTextFrom — human-readable, framework-agnostic |
| Multi-backend | Playwright, WebDriver, Puppeteer — switch via config without changing test code |
| BDD Gherkin | .feature files + step definitions; Given/When/Then; Background, Examples, tables |
| Page Objects | Encapsulate page logic; inject via inject() |
| Custom helpers | Extend I with custom methods |
| Data-driven | Data().Scenario for parameterized scenarios |
| within() | Scope locators to a container element |
| Type | Scope | Approach |
|------|-------|----------|
| Scenario | E2E user flows | Feature/Scenario blocks; I actor |
| BDD Gherkin | Business-readable acceptance | .feature files + step definitions |
| Data-driven | Same flow, multiple data sets | Data(table).Scenario with current |
Feature('name') / Scenario('title', ({ I }) => { ... })I.amOnPage('/path')I.click('Submit'), I.fillField('Email', '[email protected]'), I.selectOption('Country', 'US')I.see('Welcome'), I.seeElement('.user'), I.dontSee('Error')within('.modal', () => { I.click('OK'); })Data(accounts).Scenario('Login', ({ I, current }) => { ... })pause() — interactive console during executionautoLogin plugin — login once, reuse sessionSee references/patterns.md for full pattern reference.
features/*.feature — human-readable scenariosstep_definitions/steps.ts — Given/When/Then implementationsnpx codeceptjs gherkin:initnpx codeceptjs gherkin:snippets — generate stubs for undefined stepsnpx codeceptjs run --featuresSee references/patterns.md for Gherkin patterns.
See references/config.md for full configuration guide.
Uses Context7 MCP to fetch CodeceptJS documentation when needed. Query for CodeceptJS API, helpers, or configuration when patterns are unclear.
Can do (autonomous):
inject()Data().Scenario for data-driven testscodecept.conf.ts (helpers, plugins, include)within() for scoped interactionsCannot do (requires confirmation):
Will not do (out of scope):
npx codeceptjs run)references/patterns.md — Scenario syntax, BDD Gherkin, Page Objects, custom helpers, data-drivenreferences/config.md — codecept.conf.ts, helpers, plugins, outputreferences/best-practices.md — Readable scenarios, step granularity, helper selectioninject()I.waitForVisibleData().Scenario with current| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| Element not found | Locator too specific, dynamic content | Use semantic locators (text, label); add data-test with customLocator |
| I is undefined | Wrong inject/context | Ensure ({ I }) => in Scenario; use inject() in step defs |
| Step definition not matched | Regex/string mismatch | Run gherkin:snippets; check Cucumber expressions |
| Backend-specific failure | Helper API differs | Playwright/WebDriver/Puppeteer have different methods; check helper docs |
| autoLogin not working | Config or TypeScript | Ensure plugin enabled; check login function export |
| Data().Scenario fails | current not passed | Use ({ I, current }); access current.columnName |
| within() scope wrong | Nested structure | Verify container selector; use strict locators { css: '...' } |
tools
Analyze OpenAPI/Swagger spec (JSON or YAML) against existing test files and generate an HTML coverage report with QA automation tasks. Use when user provides an OpenAPI spec file and wants to know test coverage status.
testing
Universal QA plan generator supporting 10 plan types including test plans, sprint plans, regression plans, release plans, UAT plans, performance plans, migration plans, onboarding plans, and custom plans.
development
Generate consumer-driven contract tests using Pact for JavaScript and Python to verify microservice API compatibility between consumer and provider.
development
Master skill coordinating all QA skills through pipeline modes (full-cycle, docs-only, testcases-only, write-tests, report), formalized handoff chains, scheduler rules, and framework/language selection based on project context.