- Orbs rise from below the bottom edge to above the top edge, each with its own 36-68s pass (slower on phones), a negative delay (scene already populated on load), own horizontal position, a gentle sway and a slight scale drift; opacity fades in/out at the edges so the loop never pops. - Only transform + opacity animate, each orb on its own composited layer (will-change: transform); no filter/backdrop-filter, nothing animates size/offsets/shadow. The glacier blobs are untouched. - Opacity lowered ~38% in both themes: 0.55->0.34 light, 0.8->0.5 dark, phone overrides 0.32->0.2 / 0.42->0.26. - prefers-reduced-motion: rise removed, orbs return to the old static placements (a paused-from-start CSS animation is not applied in Chrome and would park them below the fold); tab hidden: a visibility listener parks the whole scene (.ice-paused), blob drift included. - Measured with a CDP perf trace on a 4x throttled phone profile: p95 33.4ms, 0 frames over 34ms, no long tasks - identical to the pre-change baseline; ~0.6% extra main-thread CPU. Desktop stays compositor-bound from the pre-existing blob drift, as before. tests/bubble-perf.mjs keeps it repeatable. - New bubbles suite (34 checks) in the repo harness; the axe contrast matrix is now 16 runs (360/390/1280 x dark/light x EN/CS) and passes. - SW cache -> freezmo-v31; README decision 46. Full suite: 11/11 suites, 424 checks.
54 lines
3.3 KiB
Markdown
54 lines
3.3 KiB
Markdown
# Browser suites
|
||
|
||
End-to-end checks for Freezmo, driven by Playwright against a **running
|
||
production build**. Everything lives in this repo (nothing in `/tmp`), so a
|
||
reboot cannot wipe the harness.
|
||
|
||
## Requirements
|
||
|
||
- The app is running on `http://127.0.0.1:3207` (`systemctl --user start freezmo`).
|
||
- A Chromium build. The suites auto-detect the newest Playwright Chromium in
|
||
`~/.cache/ms-playwright/`; override with `CHROME=/path/to/chrome`.
|
||
- `npm install` (dev deps: `playwright-core`, `axe-core`).
|
||
|
||
## Running
|
||
|
||
```bash
|
||
npm run build && systemctl --user restart freezmo # fresh build first
|
||
npm run test:e2e # every suite, in order
|
||
npm run test:e2e -- phase1 # only suites whose name contains "phase1"
|
||
```
|
||
|
||
Each suite prints `PASS`/`FAIL` lines and exits non-zero on failure; the runner
|
||
prints a per-suite summary at the end.
|
||
|
||
## Suites
|
||
|
||
| Suite | Covers |
|
||
| --- | --- |
|
||
| `regression.mjs` | Library, deck card + menu, study feed to results, homework entry, desktop shell + settings/health panel. |
|
||
| `bubbles-test.mjs` | Ice-scene bubbles: stacking/layout contract, keyframes only transform+opacity, rise/sway/scale/fade phases, per-breakpoint counts (5/3/2), phone pacing, reduced motion, tab-hidden parking. |
|
||
| `mobile-test.mjs` | Five-tab bar at 360/390 × EN/CS × dark/light × reduced motion (labels, targets, no hamburger/drawer), the library ⋯ sheet (Import JSON / New folder), the settings sheet (touch targets, key flow, drag-to-close, backdrop), axe contrast audits. |
|
||
| `wizard-test.mjs` | Deck 3-step flow and homework flow, flat action bar, in-page mode switch, the loading lock, abort-on-leave. |
|
||
| `native-test.mjs` | Manifest/PWA head, offline banner + disabled generate, share target GET + POST, Back-gesture layers, undo toast, tab re-tap, haptics, draft restore. |
|
||
| `i18n-test.mjs` | EN/CS dictionary parity, locale switch, Czech desktop shell, Czech phone tab labels and plurals. |
|
||
| `freeze-loading-test.mjs` | The generation loading screen appears immediately, hides the action bar, Cancel returns with the notice. |
|
||
| `review-test.mjs` | Smart Review loading feedback under a stalled request, the session end-to-end, mistakes, and the health-probe cache. |
|
||
| `phase1-test.mjs` | Backup export/import, persistence row, nudge, encrypted sync (enable/join/push/delete + API validation), usage-limit handling (client + a stub Ollama). |
|
||
| `phase2-test.mjs` | Answer history + SRS from a real study run, review/mistakes, stats, exam mode, push reminders hidden without VAPID and validated with it. |
|
||
| `phase3-test.mjs` | Check my work (API + phone/desktop UI), follow-ups, guide step explain, turn-into-a-study-deck. |
|
||
|
||
## Extra instances
|
||
|
||
`phase1`, `phase2` and `phase3` start their own `next start` instance with a
|
||
stub Ollama (or VAPID keys) on a spare port (3208/3209). Each suite checks the
|
||
port is free first and kills the whole process group on exit, so ports do not
|
||
leak between suites. Scratch data for the VAPID test lives in `tests/.tmp/`
|
||
(gitignored).
|
||
|
||
## Diagnostics (not part of the run)
|
||
|
||
`node tests/bubble-perf.mjs [label]` measures the ice-scene frame cost with a
|
||
CDP performance trace (rAF frame timing, long tasks, main-thread busy time,
|
||
style recalcs) on a 4× throttled phone profile and a 2× desktop profile. It
|
||
always exits 0; the numbers are for tuning the bubble count/speed.
|