From a6962eeaba1be42930c296c9406eba56a6a1aeb1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 21 May 2026 09:07:21 +0530 Subject: [PATCH] docs(examples): mention local compare API endpoint --- examples/README.md | 3 ++- tests/test_metadata.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index f661f98e..44a87de5 100644 --- a/examples/README.md +++ b/examples/README.md @@ -107,7 +107,8 @@ 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 UI is running, scripts and dashboards can +fetch the same first-divergence JSON payload via `GET /api/compare//` for automation checks. ## Example Matrix diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 1fa1234b..6ae1dfb9 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -3207,6 +3207,8 @@ def test_examples_readme_includes_command_cheat_sheet(): assert "status: failed" in examples_readme assert "error: upload preview did not appear" in examples_readme assert "`browsertrace compare --json`" in examples_readme + assert "GET /api/compare//" in examples_readme + assert "first-divergence JSON payload" in examples_readme assert "structured comparison output" in " ".join(examples_readme.split()) assert 'pip install "browsertrace[ui]"' in examples_readme assert "hosted sharing" not in examples_readme