From ae6db8ed87dc66f980afeeb5a6672d06ef246f21 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 May 2026 07:55:50 +0530 Subject: [PATCH] docs: mention local compare API in examples guide --- examples/README.md | 4 +++- tests/test_metadata.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index f661f98e..cff6c0da 100644 --- a/examples/README.md +++ b/examples/README.md @@ -107,7 +107,9 @@ good: Use `browsertrace compare --json` when a script, CI check, or AI/coding-agent troubleshooting flow needs structured -comparison output. +comparison output. While the local BrowserTrace UI is running, local scripts, +dashboards, or automation checks can request the same first-divergence JSON +payload via `GET /api/compare//`. ## Example Matrix diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 1fa1234b..2440f2a1 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 "local BrowserTrace UI is running" in examples_readme + assert "same first-divergence JSON payload" in examples_readme + assert "GET /api/compare//" in examples_readme assert 'pip install "browsertrace[ui]"' in examples_readme assert "hosted sharing" not in examples_readme