Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

test: locate favorites fetch without line numbers (#7003)

LearningCircuitfa3b222717f8
diff --git a/tests/web/test_js_fetch_parity.py b/tests/web/test_js_fetch_parity.py
index 2ca3ad2d2b..f6b77133c3 100644
--- a/tests/web/test_js_fetch_parity.py
+++ b/tests/web/test_js_fetch_parity.py
@@ -946,6 +946,20 @@ class LiveCase:
return f"{self.method} {self.url.split('?')[0]}"
+def _unique_js_ref(rel_path: str, url_expr: str) -> str:
+ """Locate a unique fetch by its source and URL expression, not its line."""
+ matches = [
+ call.where
+ for call in all_fetch_calls()
+ if call.rel_path == rel_path and call.url_expr == url_expr
+ ]
+ if len(matches) != 1:
+ raise AssertionError(
+ f"expected one {url_expr} fetch in {rel_path}, found {matches}"
+ )
+ return matches[0]
+
+
LIVE_CASES = (
LiveCase(
js_ref="components/settings_sync.js:16",
@@ -955,7 +969,10 @@ LIVE_CASES = (
bad={"val": 0.5},
),
LiveCase(
- js_ref="components/research.js:3083",
+ js_ref=_unique_js_ref(
+ "components/research.js",
+ "URLS.SETTINGS_API.SEARCH_FAVORITES_TOGGLE",
+ ),
method="POST",
url="/settings/api/search-favorites/toggle",
good={"engine_id": "zzz_no_such_engine"},