> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# e2e:create

> Generate a new Playwright e2e test.

Scaffold a Playwright end-to-end test inside a module's `e2e/` folder, alongside a `playwright.config.ts`. `@playwright/test` is installed at the project root as a dev dependency when missing, and the Playwright browsers are downloaded via `bunx playwright install`.

## Usage

```bash theme={null}
talos e2e:create [options]
```

## Examples

```bash theme={null}
# Interactive: prompts for the test name
talos e2e:create

# Provide the name
talos e2e:create --name=Checkout

# Target a module and overwrite an existing spec
talos e2e:create --name=Checkout --module=billing --override
```

## Options

| Option       | Description                                                                           | Default             |
| ------------ | ------------------------------------------------------------------------------------- | ------------------- |
| `--name`     | E2e test name. Normalized to PascalCase with trailing `Spec`/`E2e` suffixes stripped. | Prompted if omitted |
| `--module`   | Target module the spec is generated into.                                             | `shared`            |
| `--override` | Overwrite an existing spec without prompting.                                         | `false`             |

## Behavior

The command writes `modules/<module>/e2e/<Name>.spec.ts`. If the module has no `playwright.config.ts` yet, one is created alongside the spec — an existing config is never overwritten. It also adds an `e2e` script (`bunx playwright test`) to the module's `package.json` when one isn't already defined.

Finally, it installs `@playwright/test` at the project root if missing and runs `bunx playwright install` to download the browsers needed to execute the test.

See [`e2e:run`](/cli/commands/e2e-run) to execute the generated tests across the workspace.
