|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
If Chromium fails to launch with missing .so libraries (e.g. libnspr4.so), install Playwright’s OS deps from the frontend directory:
That is the usual failure when the test exits before opening the page (not an assertion on Sensor Info). CI uses npx playwright install --with-deps chromium, which pulls these in automatically.
test/e2e_sensor_info.sh with guitest: if something already serves the GUI on :3000 (normally the backend's static listener), the script reuses it and does not start a second server or kill your guitest pane on exit. (Its comments still mention NEXT_PUBLIC_* / "start Next" — pre-Vite fossils; those env vars are no-ops now.)
Since the Vite migration the frontend derives API/WS URLs from window.location at runtime — there is no env baking and no NEXT_PUBLIC_*. The only knob Playwright reads is PLAYWRIGHT_BASE_URL (default http://127.0.0.1:3000, the backend's static GUI listener).
From repo root:
This starts the simulated stack (USE_SIM=1, detached tmux — no interactive attach), waits for :8081 and :3000, runs the Sensor Info Playwright spec, then runs deploy/startup/stop_tmux.sh (what ./dev.sh --stop does). Use SKIP_STOP_GUI=1 to leave the stack running after tests.
e2e/sensor-info.spec.ts — ingest header cards (packet count, Ingest Rate, board scan grid), and columns 2–4 on every data row (raw ADC / counts, converted values, Frontend Rate Hz) with no --- or empty text. Uses innerText in the page. Waits for PT/HPT loading rows to clear, then E2E_SETTLE_MS (default 5000 ms), then one snapshot.
e2e/boards-heartbeats.spec.ts — /boards (“Boards / Heartbeats”): every card must have State ACTIVE (only that state passes), plus CONNECTED, Heartbeat numeric Hz (not —), and Self Test: ALL PASSED. Environmental boards must show N/A instead, because their firmware does not support self-tests. Same settle delay as Sensor Info.
e2e/environmental.spec.ts checks /environmental against the live guitest stack without replacing API or WebSocket traffic. It requires repeated samples for all three ENV25 measurements, visible readouts in the simulator's expected ranges, and plotted traces. It checks desktop and mobile layouts. The frozen test config must keep environmental board 25 enabled on connector 1.
e2e/00-load-time.spec.ts — load-time budget guard (named 00- so it runs first — cold OS/page caches, so it measures true first-open, not a warmed rerun) (regression tripwire for the pre-Vite ~20s cold loads). Asserts / and /sensor-info are interactive (<main> visible) within E2E_LOAD_BUDGET_MS (default 2 s; local baseline ~250 ms) and that Sensor Info shows first live data (Packets card loses its --- placeholder) within E2E_DATA_BUDGET_MS (default 10 s; local baseline ~275 ms). Budgets are generous because CI runners are slow; measured times ([load-benchmark] lines: interactive / DCL / load / FCP / first-data) are logged every run so trends are visible in CI history before the budget ever trips.
No long “wait until good” polling beyond the settle delay.