Skip to content

Documentation

Collection Builder Tests — Control Map

Testing 2026: shell + one golden E2E; structure/utils/persistence in unit + integration.

7/18/2026
2 min read Edit on GitHub

Follows ADR: Testing 2026one domain, shell + golden, same pattern as webhooks.

Important

Do not re-grow a multi-file Playwright suite for builder. Structure persistence, empty board, widget catalog, and federation belong in unit/integration (or plugin-specific tests).

Layer map

Layer What it proves Where
E2E shell Title, board / add-collection, new editor tabs builder.spec.tsshell: page title and new collection control
E2E golden Schema (Input field) → save → entry → list → API body + default unpublish builder.spec.tsgolden: schema → entry → API
Unit Pure tree/slug utils; page.server permission + structure shape collectionbuilder-utils, collectionbuilder-page-server
Integration Collections list auth; structure persistence matrix / code-gui parity collection-structure.test.ts, tests/integration/collectionbuilder/*

Demoted (removed from E2E)

Former E2E file Replacement
journey.spec.ts Merged into golden
collection-create.spec.ts Covered by golden
collection-entry-status.spec.ts Default status via golden API assert; publish UI not P0
structure-persistence.spec.ts tests/integration/collectionbuilder/structure-persistence*.test.ts
empty-state.spec.ts Destructive reset + empty UI — not golden; unit/integration structure
content-smoke.spec.ts Shell + golden
collection.spec.ts Was noop shim
federation-enrichment.spec.ts Plugin (UDH) — restore under plugin E2E if needed

Control → test matrix

Control Unit Integration E2E
Admin open builder page.server session-page-load /config/collectionbuilder shell
Add collection → editor shell
Name + Input field + save utils / helpers collections HTTP golden
Entry create + list collections golden
Entry value + status API in golden golden (API)
Org structure save structure unit structure-persistence matrix
Widget catalog / extensions widgets list surface extensions golden (not builder)

Run

# Golden + shell only
bun x playwright test tests/e2e/routes/collection-builder/builder.spec.ts --project=chromium

# Unit
bun run test:unit -- tests/unit/collectionbuilder/collectionbuilder-utils.test.ts tests/unit/routes/collectionbuilder-page-server.test.ts

# Integration structure
# bun test tests/integration/api/collection-structure.test.ts tests/integration/collectionbuilder/

Helpers

Shared stable flow: tests/e2e/helpers/collection-builder-flow.ts (testids, dialog-safe Input pick).

testinge2eplaywrightcollectionsbuilderadr
Was this page helpful?