Write Baserow E2E Tests
Use this skill when a task involves adding, fixing, reviewing, debugging, or
executing end-to-end tests in e2e-tests.
Canonical repo docs live in docs/development/e2e-testing.md. Read that file
again if commands or environment details may have changed.
First Step
Before editing, identify the user-facing flow and inspect the closest existing
spec, fixture, and page object in the same area.
Useful searches:
find e2e-tests/tests -type f -name '*.spec.ts' | sort
rg -n "test\\.describe|test\\(|test\\.before|@fast|@slow|@enterprise" e2e-tests/tests
rg -n "class .*Page|async .*\\(" e2e-tests/pages e2e-tests/fixtures
rg -n "getByRole|getByLabel|getByText|locator\\(" e2e-tests/tests e2e-tests/pages
Local Test Architecture
The suite uses Playwright with Nuxt test utilities:
- Specs live under
e2e-tests/tests/**.
- Import
test and expect from e2e-tests/tests/baserowTest.ts when the
test should use the repo fixtures.
- Reuse API fixtures from
e2e-tests/fixtures/** for setup instead of creating
state through the UI when setup is not the behavior under test.
- Reuse or add page objects in
e2e-tests/pages/** for repeated navigation or
complex UI operations.
- The Playwright config is
e2e-tests/playwright.config.ts; default projects
are chrome and firefox, with chrome used by yarn test.
Important fixture behavior:
workspacePage creates a fresh user and workspace, authenticates, suppresses
the cookie notice, closes the AI sidebar, and cleans up with removeAll().
builderPagePage creates a builder and default page in that workspace.
automationWorkflowPage creates an automation and default workflow.
- Staff-only setup can use
getStaffUser() from e2e-tests/fixtures/user.ts,
which logs in as e2e@baserow.io from the e2e database dump.
Writing Tests
Prefer a focused test that proves one visible behavior or one integration
boundary.
- Put the spec in the existing feature directory, for example
e2e-tests/tests/database/**, e2e-tests/tests/builder/**, or
e2e-tests/tests/automation/**.
- Use API fixtures for initial data and reserve UI steps for the behavior being
tested.
- Use role, label, placeholder, and text locators when stable. Use CSS class
locators when matching existing page objects or when the app has no better
accessible hook.
- Wait with Playwright assertions such as
await expect(locator).toBeVisible(),
toHaveText(), toHaveURL(), or toHaveTitle() instead of fixed sleeps.
- If multiple tests share expensive setup, follow nearby specs that use
beforeAll plus reset helpers, and use serial mode only when the shared
state makes parallel execution unsafe.
- For network-sensitive behavior, use
page.waitForResponse,
page.waitForRequest, or existing helpers in e2e-tests/fixtures/network.ts.
Keep docs/testing/*-test-plan.md files in sync when editing a spec that is
explicitly mapped to a test plan, such as grid view tests.
Running Tests
Use root just e2e commands. They delegate to e2e-tests/justfile.
Full clean cycle:
just e2e run
Step-by-step:
just e2e build
just e2e up
just e2e test
Run a narrow target:
just e2e up
just e2e test tests/builder/builderPage.spec.ts
just e2e test tests/database/grid/
just e2e test --grep "login"
Debug:
just e2e up
just e2e test tests/path/to/spec.ts --headed
just e2e test tests/path/to/spec.ts --ui
just e2e test tests/path/to/spec.ts --trace on
just e2e logs
just e2e logs backend
just e2e logs frontend
just e2e logs celery
Important command behavior:
just e2e test requires the e2e stack to already be running.
just e2e test tears down the e2e containers when it exits, even for a
narrow test.
- The default e2e URLs are frontend
http://localhost:3070 and backend
http://localhost:8070.
- Override ports with
E2E_FRONTEND_PORT and E2E_BACKEND_PORT, or set values
in e2e-tests/.env.
- If migrations changed and the dump is stale, run
just e2e db-dump and commit
e2e-tests/fixtures/e2e-db.dump.
Guardrails
- Do not use the deprecated
e2e-tests/run-e2e-tests-locally.sh workflow unless
the user explicitly asks to run against a manually managed dev environment.
- Do not create broad UI journeys when a fixture plus focused UI assertion proves
the behavior.
- Do not use arbitrary
waitForTimeout in specs. Existing page objects may have
narrow compatibility sleeps; avoid adding new ones unless there is no better
observable condition.
- Do not leave
test.only or debug-only traces/headed settings in committed
specs.
- Do not assume
page.title() is immediately updated after navigation. For
asynchronous public/builder page titles, use await expect(page).toHaveTitle(...).
- Do not update non-English locale files while supporting an e2e test change.
1---2name: write-e2e-test3description: Write, update, debug, or run Baserow end-to-end tests in e2e-tests using Playwright, the repo's e2e fixtures, page objects, Docker stack, and just e2e commands.4---56# Write Baserow E2E Tests78Use this skill when a task involves adding, fixing, reviewing, debugging, or9executing end-to-end tests in `e2e-tests`.1011Canonical repo docs live in `docs/development/e2e-testing.md`. Read that file12again if commands or environment details may have changed.1314## First Step1516Before editing, identify the user-facing flow and inspect the closest existing17spec, fixture, and page object in the same area.1819Useful searches:2021- `find e2e-tests/tests -type f -name '*.spec.ts' | sort`22- `rg -n "test\\.describe|test\\(|test\\.before|@fast|@slow|@enterprise" e2e-tests/tests`23- `rg -n "class .*Page|async .*\\(" e2e-tests/pages e2e-tests/fixtures`24- `rg -n "getByRole|getByLabel|getByText|locator\\(" e2e-tests/tests e2e-tests/pages`2526## Local Test Architecture2728The suite uses Playwright with Nuxt test utilities:2930- Specs live under `e2e-tests/tests/**`.31- Import `test` and `expect` from `e2e-tests/tests/baserowTest.ts` when the32 test should use the repo fixtures.33- Reuse API fixtures from `e2e-tests/fixtures/**` for setup instead of creating34 state through the UI when setup is not the behavior under test.35- Reuse or add page objects in `e2e-tests/pages/**` for repeated navigation or36 complex UI operations.37- The Playwright config is `e2e-tests/playwright.config.ts`; default projects38 are `chrome` and `firefox`, with `chrome` used by `yarn test`.3940Important fixture behavior:4142- `workspacePage` creates a fresh user and workspace, authenticates, suppresses43 the cookie notice, closes the AI sidebar, and cleans up with `removeAll()`.44- `builderPagePage` creates a builder and default page in that workspace.45- `automationWorkflowPage` creates an automation and default workflow.46- Staff-only setup can use `getStaffUser()` from `e2e-tests/fixtures/user.ts`,47 which logs in as `e2e@baserow.io` from the e2e database dump.4849## Writing Tests5051Prefer a focused test that proves one visible behavior or one integration52boundary.53541. Put the spec in the existing feature directory, for example55 `e2e-tests/tests/database/**`, `e2e-tests/tests/builder/**`, or56 `e2e-tests/tests/automation/**`.572. Use API fixtures for initial data and reserve UI steps for the behavior being58 tested.593. Use role, label, placeholder, and text locators when stable. Use CSS class60 locators when matching existing page objects or when the app has no better61 accessible hook.624. Wait with Playwright assertions such as `await expect(locator).toBeVisible()`,63 `toHaveText()`, `toHaveURL()`, or `toHaveTitle()` instead of fixed sleeps.645. If multiple tests share expensive setup, follow nearby specs that use65 `beforeAll` plus reset helpers, and use serial mode only when the shared66 state makes parallel execution unsafe.676. For network-sensitive behavior, use `page.waitForResponse`,68 `page.waitForRequest`, or existing helpers in `e2e-tests/fixtures/network.ts`.6970Keep `docs/testing/*-test-plan.md` files in sync when editing a spec that is71explicitly mapped to a test plan, such as grid view tests.7273## Running Tests7475Use root `just e2e` commands. They delegate to `e2e-tests/justfile`.7677Full clean cycle:7879```bash80just e2e run81```8283Step-by-step:8485```bash86just e2e build87just e2e up88just e2e test89```9091Run a narrow target:9293```bash94just e2e up95just e2e test tests/builder/builderPage.spec.ts96just e2e test tests/database/grid/97just e2e test --grep "login"98```99100Debug:101102```bash103just e2e up104just e2e test tests/path/to/spec.ts --headed105just e2e test tests/path/to/spec.ts --ui106just e2e test tests/path/to/spec.ts --trace on107just e2e logs108just e2e logs backend109just e2e logs frontend110just e2e logs celery111```112113Important command behavior:114115- `just e2e test` requires the e2e stack to already be running.116- `just e2e test` tears down the e2e containers when it exits, even for a117 narrow test.118- The default e2e URLs are frontend `http://localhost:3070` and backend119 `http://localhost:8070`.120- Override ports with `E2E_FRONTEND_PORT` and `E2E_BACKEND_PORT`, or set values121 in `e2e-tests/.env`.122- If migrations changed and the dump is stale, run `just e2e db-dump` and commit123 `e2e-tests/fixtures/e2e-db.dump`.124125## Guardrails126127- Do not use the deprecated `e2e-tests/run-e2e-tests-locally.sh` workflow unless128 the user explicitly asks to run against a manually managed dev environment.129- Do not create broad UI journeys when a fixture plus focused UI assertion proves130 the behavior.131- Do not use arbitrary `waitForTimeout` in specs. Existing page objects may have132 narrow compatibility sleeps; avoid adding new ones unless there is no better133 observable condition.134- Do not leave `test.only` or debug-only traces/headed settings in committed135 specs.136- Do not assume `page.title()` is immediately updated after navigation. For137 asynchronous public/builder page titles, use `await expect(page).toHaveTitle(...)`.138- Do not update non-English locale files while supporting an e2e test change.