Files
rustguac/tests/e2e
Jad Seifeddine be866264bd pages: shared facet filters and one list toolbar on every list page
reports: show entry names as host over a tenant subline

Session history and the most-used table showed "host (Tenant)" names
wrapped across three lines; they now read as the host over a quieter
tenant line, as on Connections and Recordings.

Part of #254

sessions, recordings: show the session type with the shared badge (#254)

The sessions page printed the type as plain text and the recordings page
as a coloured word; connections and reports already used .type-badge
from rustguac.css. All four now use the same badge. The Proxmox badge
colour moves into the shared stylesheet with the others.

Shared facet filters (static/filters.js) on the sessions, recordings,
reports and connections pages: a dropdown per facet (Type, Folder, User,
Owner, Status as each page has them), multi-select with counts that narrow
as other facets apply, All/None, a find box for long lists, a Clear filters
link, and selections kept per page in sessionStorage. They sit beside the
existing text search and combine with it; the buttons are compacted to the
height and padding of the other controls and the dropdown reserves room for
its scrollbar so it no longer sits over the counts.

The list pages share one toolbar: a borderless row with the search box, the
facets and the page action on the right (New ad-hoc session, Export CSV),
placeholders standardised to 'Search <noun> (fields…)'. Sessions gains a
search (user, host, owner, ID, type) and a User facet; Reports moves from
its own .filter-bar to the shared one. The redundant page titles go — the
nav already names and marks the active page — and section headings centre
their heading and action button on one line.

Connections: the folder header is sticky at the top of the entries pane, so
it stays under the nav and the active-sessions strip while a long table
scrolls. All four pages show the session type with the shared .type-badge
(the Proxmox colour moves into rustguac.css), reports and recordings show
"host (Tenant)" names as the host over a quieter tenant line, and the key
glyph before Credentials in the nav is sized to the text.

Part of #254

tests: shared facet filters and the list toolbar on every list page
2026-10-16 16:51:36 +07:00
..

End-to-end tests

Playwright specs that drive the real pages in static/ against a stubbed API. Nothing here needs Vault, guacd, Docker or a browser session: serve.mjs serves the static tree over HTTP and every spec installs lib/api.mjs, which answers /api/* from a small fixture address book (two named tenants and twenty generic ones, two sessions, two recordings) and records every request the page makes so a spec can assert on what was sent.

cd tests/e2e
npm ci
npx playwright install chromium   # once
npm test                          # all specs
npx playwright test specs/global-search.spec.mjs
npx playwright test --ui          # step through a spec

PW_CHROMIUM=/path/to/chrome runs against an already installed Chromium instead of the one Playwright downloads. CI runs the suite in the e2e job.

One spec per change, named after the branch that introduced it:

spec pins
tables-1710 #252: no horizontal overflow at 1710px on Connections, Recordings and Reports, with short and with long unbreakable names
connections-app-shell #254: clipped body, two scroll panes, folder change scrolls the pane not the page
role-nav one nav on every page, gated by data-role-level
sessions-adhoc-modal ad-hoc form opens as a modal
facet-filters shared facets narrow lists, persist, combine with search

The fixture suppresses the first-visit onboarding tour (options.onboarding re-enables it) and defaults to the admin role; pass role to test gating.