Files
Portfolio/tests/browser/README.md

54 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Browser characterization tests
These Playwright tests lock the observable portfolio behavior at the browser
boundary. Ordinary suites exercise the built `dist/` output through the local
preview server. The resilience suite additionally creates an authenticated,
ephemeral test client: Playwright owns the raw per-run token, while only its
SHA-256 digest enters that temporary bundle. Global fault hooks are absent from
and rejected in production artifacts.
## Run
Build the preview artifacts, then run the whole browser suite:
```bash
npm run build:preview
npm run test:browser
```
Run only the Phase 2 journey gate:
```bash
npm run test:browser -- tests/browser/journey-integration.spec.ts tests/browser/reduced-motion.spec.ts tests/browser/static-fallback.spec.ts tests/browser/bfcache-lifecycle.spec.ts
```
## Add a case
1. Name the concrete regression the case catches.
2. Use literal inputs and expected browser-visible results.
3. Install `scene-instrumentation.ts` before navigation when resource counts or
platform calls are the observable boundary.
4. Prefer browser-owned `page.addInitScript()` or routing. A lifecycle fault
that requires an application seam must use one of the closed F1–F13 hook
names and the authenticated helper.
5. Run the new case against both configured Chromium profiles, then run the
full suite.
Never copy credentials, private project identifiers, or private URLs into a
fixture. Use clearly fake values when a credential-shaped input is required.
## Browser evidence status
- Executable here: current Playwright Chromium 151, desktop and a simulated
mobile viewport. The simulated viewport is responsive evidence only and is
not described as a physical Pixel result.
- Pending because no runnable binary/channel is installed: current Firefox,
WebKit/Safari, Edge, and the actual previous-stable desktop majors. Installed
Chromium 148/145 builds are older retained binaries, not the required
previous-stable 150 evidence, so they are not mislabeled or substituted.
- Pending physical release evidence: current iOS Safari on iPhone 13 and
Android Chromium on Pixel 6, including `physical-drive.v1`.
These pending cells remain release checkpoints; this repository does not turn
missing hardware or browser binaries into passing emulation results.