cy. Momentic tests are YAML steps that a
runner executes with built-in waiting and AI assertion. The porting unit is the
user flow, not the command chain. A coding agent with the
MCP server and
coding agent skills ports a spec file in one pass.
Before and after
A representative Cypress spec:checkout.cy.js
checkout.test.yaml
API mapping
Fixture and plugin mapping
What does not map
- The command queue and
cyobject. Steps are data, not a chained API. Anything you built oncy.wrap, subjects, or custom queue manipulation needs ajavascriptstep. cy.spy/cy.stubon window functions. There is no step for spying on app internals.mockcovers network interception; reach forjavascriptwithenvironment: browserfor the rest.cypress-real-eventsand raw Chrome DevTools Protocol (CDP). Momentic abstracts the driver. Device trust and CDP-specific tricks have no direct equivalent.- Time-travel snapshots UI. The local editor and run viewer show the same evidence (video, per-step screenshots, DOM state) but it is not a scrubbable command log.
Incremental strategy
- Install
momenticnext to Cypress in the same repo:npm install -D momenticplus a minimalmomentic.config.yaml. The two tools do not share files or ports. - Port
cy.session/login first as a module orauthLoadfile; every other port depends on it. - Port the specs that hurt the most to maintain: the ones with the most
selector churn. Label them
migratedand run them with--labels migrated. - Run both suites in CI. Keep Cypress gating until the Momentic suite covers the same critical paths.
- Retire specs one at a time after several consecutive passing Momentic runs.
Remove
@cypress/*dependencies and thecypressfolder last.
Porting at scale with a coding agent
Point your coding agent at the spec files and themomentic-test skill. A prompt that works well: