test: fix pinchtab v0.7.x api drifts in verify_browser harness
`make review` was fully broken against pinchtab v0.7.x. Four distinct
drifts, fixed together so the harness becomes deterministic again:
1. Port env var renamed upstream from BRIDGE_PORT to PINCHTAB_PORT —
rename the key in PinchTab.start()'s env dict. Without this,
pinchtab silently bound its default port (9867) and the harness
timed out waiting on /health at 19867.
2. /screenshot now returns raw image/* bytes instead of
{"base64": ...} JSON. PinchTab.screenshot() inspects Content-Type
and returns response.content directly for image/*, falling back
to the legacy base64 path otherwise (forward+backward compat).
3. /health returns status=ok before the default instance is ready —
first POSTs get 503s during warmup. PinchTab.start() now requires
defaultInstance.status == "running" in addition to status=ok
before declaring the bridge live.
4. Pinchtab persists cookies/Local Storage/Session Storage in
~/.pinchtab/profiles/default/ across sessions, so state from one
scenario leaked into every subsequent scenario (and across runs).
PinchTab.start() now rmtrees that profile dir before launching.
extro-linkedin uses a separate `linkedin` profile, so this nuke
is isolated to test state.
Also adds three first-time visual baselines under tests/baselines/visual/:
graph/smoke.jpg, graph/load.jpg, observer/smoke.jpg. Harness has been
dead long enough these scenarios never captured baselines; these are
first-time artifacts to be eyeballed post-ship, not replacements of
known-good images.
Result: `make review` goes from 0/19 to 19/19 PASS, verified from a
deliberately-polluted profile state to confirm the isolation holds.
Refs req_7yqrvikr.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.