Docs

zitadel tests add

Add end-to-end tests of the sign-in to this app.

Writes playwright.config.mts, a test of the sign-in (e2e/sign-in.spec.ts) and a test that starts signed in (e2e/signed-in.spec.ts), wired to @zitadel/testing. Adds it and @playwright/test as dev dependencies, and a test:e2e script unless the app has one. Each test run boots its own Zitadel server and project. Supports Next.js apps. A file that differs from this CLI's version of it, including one an earlier CLI wrote, is refused unless --force replaces it.

Usage

npx @zitadel/cli@latest tests add [flags]

Flags

FlagDescription
-f, --forceReplace a test file that differs from this CLI's version of it.
--skip-installDo not install the new dev dependencies.
--dry-runPreview without mutating files or the platform.

It also takes the global flags.

Examples

npx @zitadel/cli@latest tests add
npx @zitadel/cli@latest tests add --skip-install

Was this helpful?

On this page