add-e2e-test
Installation
SKILL.md
add-e2e-test
The e2e tier exists to run the built packages/cli/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.
The tier is workspace-wide: it lives at the repo root under tests/e2e/, not inside either package, because it exercises the shipped binary rather than a package's source. Unit tests are the mirror image — they sit beside the code under packages/<p>/src/**/*.test.ts.
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 the harness modules every later step reaches for:
tests/e2e/run-cli.ts— the only sanctioned way to invoke the CLI.tests/e2e/bootstrap-data.ts— theBootstrapschema you must NOT redeclare.tests/e2e/cli-error.ts—cliErrorMessage/cliErrorCategory, how you assert on stderr.tests/e2e/defaults.ts— base URL, stack id, snapshot name.tests/e2e/server-gate.ts—requireServer/serverVersionBelow, how a suite skips.tests/e2e/seed/seeded.tsandtests/e2e/seed/ids.ts— discovered and fixed entity ids.