migrate-cypress-to-codeceptjs
Installation
SKILL.md
Migrate Cypress → CodeceptJS 4
Cypress and CodeceptJS share a goal — browser end-to-end testing — but differ in three foundational ways:
- Step queueing vs command chains. CodeceptJS auto-queues every
I.*call onto an internal recorder; tests look synchronous andawaitis only needed for grabs (await I.grabTextFrom(...)). There is no.then()chain to thread state through. - Helpers, not a bundled browser.
I.*dispatches to a configured helper. Cypress is single-browser by design; CodeceptJS lets you pick Playwright (recommended for Cypress migrators — Chromium parity plus cross-browser), Puppeteer, or WebDriver, and the test code stays the same. - First-class abstractions. Page objects, multi-user
session(...), theauthplugin, and custom helpers are built in. Cypress projects accumulate ad-hoc versions of these; the migration consolidates them onto the framework's idioms.
Authoritative references: node_modules/codeceptjs/docs/basics.md, locators.md, playwright.md, custom-helpers.md, pageobjects.md.
When to trigger
Any of:
cypress.config.{js,ts,mjs}at the repo root.- A
cypress/directory withe2e/,support/,fixtures/,plugins/, orcomponent/subdirs. cypresslisted indevDependencies.- Test code calls
cy.*(cy.visit,cy.get,cy.contains,cy.session,cy.intercept,cy.request,cy.task,cy.fixture,cy.origin,cy.mount), usesCypress.Commands.add(...), or readsCypress.env(...). - The user says "migrate / port / convert from Cypress".