Skip to content

First run

Test discovery executes the workspace’s Playwright configuration and test files, so it only runs in folders you trust. On Zed 0.218 or newer, Zed asks whether you trust a folder (Restricted Mode) and starts language servers only after you do. That answer is the only question: the Playwright server discovers tests at once and Zed remembers the trust across restarts.

Zed asking whether to trust the sample-project folder before any language server starts.
On Zed 0.218 or newer the worktree trust question is the only question; older Zed shows the Playwright notification instead. (Zed 1.26.2, Playwright Runner 0.8.0, Linux (Ubuntu 26.04, GNOME))

Older Zed releases and other editors get one notification from the extension instead; see Discovery consent.

Code lenses and inlay hints are off by default in Zed. The run buttons above tests are code lenses, and the step labels are inlay hints, so add to your Zed settings:

{
"code_lens": "on",
"inlay_hints": { "enabled": true }
}

Without them the extension runs tests exactly the same; only the buttons and labels are absent. See Settings for the per-language form and the extension’s own defaults.

Open any spec file. After discovery, ▶ Run test appears above each test and ▶ Run describe above each group. Click one, or press ctrl-. (cmd-. on macOS) and choose Playwright: Run test at cursor.

A Playwright spec file in Zed with a "Run test" code lens above every test and a "Run describe" lens above each describe block.
Lenses above each test and describe block after discovery. (Zed 1.26.2, Playwright Runner 0.8.0, Linux (Ubuntu 26.04, GNOME))

The result arrives as a progress indicator, a pass or fail notification, an error marker on each failing line, and the full output in a tab. Everything else is on the Run tests page.

Screenshots on this site show Zed 1.26.2 on Linux with Playwright Runner 0.8.0; the window chrome differs per platform.