add-e2e-test
Installation
SKILL.md
add-e2e-test
The e2e tier exists to run the built dist/cli.mjs against a real Metabase, with no mocks. Subtle violations of the harness contract corrupt shared state for every other test in the run. Reading this is required before generating any e2e file.
Step 0 — Pre-flight (mandatory, do not skip)
Before generating anything, anchor to the existing harness:
ls tests/e2e/— see the layout and existing nouns.- Read one existing e2e test end-to-end (e.g.
tests/e2e/auth.e2e.test.ts). - Read
tests/e2e/run-cli.ts(helpers) andtests/e2e/bootstrap-data.ts(theBootstrapschema you must NOT redeclare).
Skip this and you will reinvent harness pieces that already exist, or redeclare the bootstrap schema and silently drift from the writer.
When to add an e2e test
- A new command was added under
src/commands/<noun>/<verb>.ts. Every new command needs an e2e test. - An existing command grew a flag, output mode, or behavior that unit tests cannot exercise (real network round-trip, real auth flow, real polling).