writing-codeceptjs-tests
Installation
SKILL.md
Writing CodeceptJS 4 Tests
A test that was never executed during authoring is unreliable. Drive the real browser via the CodeceptJS MCP server, verify every locator against the live page, commit only steps that passed.
Two modes, picked by how much of the flow you already know:
- Mode A — incremental
run_code: send one or twoI.*lines per call, read response, repeat. For extending existing tests, known flows, porting manual plans. - Mode B — scaffold-and-pause (recommended for greenfield / unknown flows): write a stub Scenario containing
I.amOnPage('/...'); pause();, run via MCPrun_test. The browser opens and yields control atpause()— drive the live page viarun_code, then replacepause()with the verified sequence.
Both share the same discovery / locator / commit steps; the difference is where the in-flight exploration happens.