migrate-testcafe-to-codeceptjs
Installation
SKILL.md
Migrate TestCafe → CodeceptJS 4
TestCafe and CodeceptJS share a lot at the surface — both expose a single test-controller verb-set (t.* / I.*), both have lazy chainable selectors, both ship with role-based auth and screenshot/video support. The migration is mostly mechanical, but three foundational differences drive the work:
- CodeceptJS does not need
awaiton actions. The recorder auto-queues everyI.*call. TestCafe forcesawaiton every action (await t.click(...)); CodeceptJS forbids it on actions and reserves it for grabs (await I.grabTextFrom(...)). This is the single biggest mechanical edit during spec conversion — strip everyawaitfrom beforeI.click,I.fillField,I.see*,I.waitFor*, and page-object method calls that return void. - Helpers, not a bundled proxy. TestCafe runs as an HTTP/HTTPS proxy that injects automation into pages; CodeceptJS dispatches
I.*to a configured helper. Playwright recommended — closest feel, fastest, supports all three engines (Chromium / Firefox / WebKit) the same way TestCafe did. - First-class abstractions. Page objects, multi-user
session(...), theauthplugin, custom helpers, and thecustomLocatorplugin are built in. TestCafe projects accumulate ad-hoc versions of these (Selector-property classes,Rolefactories,ClientFunctionfactories) — the migration consolidates them onto framework idioms.
Authoritative references: node_modules/codeceptjs/docs/basics.md, locators.md, playwright.md, custom-helpers.md, pageobjects.md.
When to trigger
Any of: