Testing Seed web app (collection/query UI)
When to use
Use this skill when verifying the Seed web app's collection pages, query blocks, or shared QueryBlockContent component
end-to-end.
Devin Secrets Needed
None for the fixture-account read-only path. Authenticated editing requires an account whose signing keys are available
in the test environment; this machine's Chrome does not support Web Crypto Ed25519, so publish/draft-flow UI cannot be
exercised in the browser.
One-time per session
- Build the daemon if
plz-out/bin/backend/seed-daemon-* is missing:
./pleasew build //backend/cmd/seed-daemon (or equivalent for your platform).
- Build the web app if
frontend/apps/web/build is missing or stale:
cd frontend/apps/web && pnpm --filter @shm/web build
- The build embeds
VITE_COMMIT_HASH; confirm it matches the commit under test.
- Start the integration test environment:
bun tests/integration/seed-collection-ui.ts seeds a fixture account with /collection, /collection/alpha,
/collection/beta, and /query-demo.
- It spawns
seed-daemon, builds the web app, and serves it on http://localhost:3399.
- Data dirs are created under
/tmp/seed-integration-*.
Fixture manipulation
- The fixture account DID is
z6MkhMSRCyK9KkAzTmzTKSfuNMaEuYZUJacWmbqiHYkCQgSW.
- Use
bun tests/integration/update-style.ts (or a temporary copy) with createDocumentUpdate from
frontend/apps/cli/src/test/account-helpers.ts to mutate a document's query block style (Table/List/Card)
without needing browser auth.
- For a collection document,
query.includes should be [{space:"", path:"", mode:"Children"}] to match
createDefaultCollectionQueryBlock semantics.
Useful UI selectors
- Collection header:
[aria-label="Search documents"], buttons Filter, Sort, Attributes.
- View toggle:
button text Table, List, Cards (note: no Graph).
- Query settings:
button[aria-label="Query settings"].
- Filter popover:
button text Add filter, input[aria-label="Filter value"].
- Sort popover:
button Asc/Desc.
- Attributes popover: switches with column labels.
Known limitations and workarounds
- Browser auth / publish flow: The bundled Chrome on this machine lacks Web Crypto
Ed25519. Don't try to log in or
publish from the web app. Test draft/publish flows in the desktop app or another environment.
- Radix
Select in popovers: Programmatic .click() on [aria-selected] options is unreliable. Prefer
SelectField value/onValue changes or keyboard navigation.
- Controlled
Input in FilterPopover: Setting input.value and dispatching input/change events works for the
search input but may not trigger onChangeText inside the filter popover. If filter UI manipulation is critical, use
native keyboard typing or set query props server-side and reload.
- Coordinate scaling: The desktop is 1600×1069 but the
computer tool uses a 1024×768 coordinate space. Coordinates
are mapped automatically; prefer querying elements from the DOM and dispatching trusted events over fragile pixel
clicks.
Verification checklist for collection/query PRs
- Collection header: Table/List/Cards toggle (no Graph), Filter/Sort/Attributes, search, settings menu.
- Table/List/Card views render the expected documents.
- Search and sort update results.
- Filter model (
filterQueryTableItems) handles date/number comparisons.
- Query block inside a document renders the same views without the collection header.
- Query-block Card view whole-card link navigates; collection Card view must pass
navigateCards to
QueryBlockContent to be clickable.
1---
2name: testing-seed-web-app-collection-query-ui
3description: How to run end-to-end UI tests against the Seed web app for collection and query block features.
4metadata:
5 source: https://skillmd.com/skills/seed-hypermedia/testing-seed-web-app-collection-query-ui
6---
7
8# Testing Seed web app (collection/query UI)
9
10## When to use
11
12Use this skill when verifying the Seed web app's collection pages, query blocks, or shared `QueryBlockContent` component
13end-to-end.
14
15## Devin Secrets Needed
16
17None for the fixture-account read-only path. Authenticated editing requires an account whose signing keys are available
18in the test environment; this machine's Chrome does not support Web Crypto `Ed25519`, so publish/draft-flow UI cannot be
19exercised in the browser.
20
21## One-time per session
22
231. Build the daemon if `plz-out/bin/backend/seed-daemon-*` is missing:
24 - `./pleasew build //backend/cmd/seed-daemon` (or equivalent for your platform).
252. Build the web app if `frontend/apps/web/build` is missing or stale:
26 - `cd frontend/apps/web && pnpm --filter @shm/web build`
27 - The build embeds `VITE_COMMIT_HASH`; confirm it matches the commit under test.
283. Start the integration test environment:
29 - `bun tests/integration/seed-collection-ui.ts` seeds a fixture account with `/collection`, `/collection/alpha`,
30 `/collection/beta`, and `/query-demo`.
31 - It spawns `seed-daemon`, builds the web app, and serves it on `http://localhost:3399`.
32 - Data dirs are created under `/tmp/seed-integration-*`.
33
34## Fixture manipulation
35
36- The fixture account DID is `z6MkhMSRCyK9KkAzTmzTKSfuNMaEuYZUJacWmbqiHYkCQgSW`.
37- Use `bun tests/integration/update-style.ts` (or a temporary copy) with `createDocumentUpdate` from
38 `frontend/apps/cli/src/test/account-helpers.ts` to mutate a document's query block `style` (`Table`/`List`/`Card`)
39 without needing browser auth.
40- For a collection document, `query.includes` should be `[{space:"", path:"", mode:"Children"}]` to match
41 `createDefaultCollectionQueryBlock` semantics.
42
43## Useful UI selectors
44
45- Collection header: `[aria-label="Search documents"]`, buttons `Filter`, `Sort`, `Attributes`.
46- View toggle: `button` text `Table`, `List`, `Cards` (note: no `Graph`).
47- Query settings: `button[aria-label="Query settings"]`.
48- Filter popover: `button` text `Add filter`, `input[aria-label="Filter value"]`.
49- Sort popover: `button` `Asc`/`Desc`.
50- Attributes popover: switches with column labels.
51
52## Known limitations and workarounds
53
54- **Browser auth / publish flow**: The bundled Chrome on this machine lacks Web Crypto `Ed25519`. Don't try to log in or
55 publish from the web app. Test draft/publish flows in the desktop app or another environment.
56- **Radix `Select` in popovers**: Programmatic `.click()` on `[aria-selected]` options is unreliable. Prefer
57 `SelectField` `value`/`onValue` changes or keyboard navigation.
58- **Controlled `Input` in `FilterPopover`**: Setting `input.value` and dispatching `input`/`change` events works for the
59 search input but may not trigger `onChangeText` inside the filter popover. If filter UI manipulation is critical, use
60 native keyboard typing or set query props server-side and reload.
61- **Coordinate scaling**: The desktop is 1600×1069 but the `computer` tool uses a 1024×768 coordinate space. Coordinates
62 are mapped automatically; prefer querying elements from the DOM and dispatching trusted events over fragile pixel
63 clicks.
64
65## Verification checklist for collection/query PRs
66
671. Collection header: Table/List/Cards toggle (no Graph), Filter/Sort/Attributes, search, settings menu.
682. Table/List/Card views render the expected documents.
693. Search and sort update results.
704. Filter model (`filterQueryTableItems`) handles date/number comparisons.
715. Query block inside a document renders the same views without the collection header.
726. Query-block Card view whole-card link navigates; collection Card view must pass `navigateCards` to
73 `QueryBlockContent` to be clickable.