From 483aa5fd9108d457143e19ed16190676f888ad3e Mon Sep 17 00:00:00 2001 From: Photon101 <123910806+Photon101@users.noreply.github.com> Date: Thu, 28 May 2026 23:55:32 +0100 Subject: [PATCH] docs: mention compare API in examples guide --- examples/README.md | 3 +++ tests/test_metadata.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/README.md b/examples/README.md index f661f98e..bcc53473 100644 --- a/examples/README.md +++ b/examples/README.md @@ -108,6 +108,9 @@ good: Use `browsertrace compare --json` when a script, CI check, or AI/coding-agent troubleshooting flow needs structured comparison output. +While the local UI is running, scripts, dashboards, or automation checks can +also call `GET /api/compare//` for the same +first-divergence JSON payload. ## Example Matrix diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 1fa1234b..e761b974 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -3208,6 +3208,9 @@ def test_examples_readme_includes_command_cheat_sheet(): assert "error: upload preview did not appear" in examples_readme assert "`browsertrace compare --json`" in examples_readme assert "structured comparison output" in " ".join(examples_readme.split()) + assert "`GET /api/compare//`" in examples_readme + assert "scripts, dashboards, or automation checks" in examples_readme + assert "same first-divergence JSON payload" in " ".join(examples_readme.split()) assert 'pip install "browsertrace[ui]"' in examples_readme assert "hosted sharing" not in examples_readme