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.

fix(tests): two release-pipeline failures — UA assertions + WebKit budget (#4232)

LearningCircuit4b5f8f03db3e
diff --git a/tests/search_engines/test_search_engine_gutenberg.py b/tests/search_engines/test_search_engine_gutenberg.py
index c2be9d5626..1822341f72 100644
--- a/tests/search_engines/test_search_engine_gutenberg.py
+++ b/tests/search_engines/test_search_engine_gutenberg.py
@@ -61,7 +61,7 @@ class TestGutenbergSearchEngineInit:
engine = GutenbergSearchEngine()
assert "User-Agent" in engine.headers
- assert "LocalDeepResearch" in engine.headers["User-Agent"]
+ assert "Local-Deep-Research" in engine.headers["User-Agent"]
class TestGutenbergQueryBuilding:
diff --git a/tests/search_engines/test_search_engine_openlibrary.py b/tests/search_engines/test_search_engine_openlibrary.py
index 69b2904acc..adf67ab6de 100644
--- a/tests/search_engines/test_search_engine_openlibrary.py
+++ b/tests/search_engines/test_search_engine_openlibrary.py
@@ -62,7 +62,7 @@ class TestOpenLibrarySearchEngineInit:
engine = OpenLibrarySearchEngine()
assert "User-Agent" in engine.headers
- assert "LocalDeepResearch" in engine.headers["User-Agent"]
+ assert "Local-Deep-Research" in engine.headers["User-Agent"]
class TestOpenLibraryQueryBuilding:
diff --git a/tests/search_engines/test_search_engine_pubchem.py b/tests/search_engines/test_search_engine_pubchem.py
index 2407187dd1..d86efc76a7 100644
--- a/tests/search_engines/test_search_engine_pubchem.py
+++ b/tests/search_engines/test_search_engine_pubchem.py
@@ -58,7 +58,7 @@ class TestPubChemSearchEngineInit:
engine = PubChemSearchEngine()
assert "User-Agent" in engine.headers
- assert "LocalDeepResearch" in engine.headers["User-Agent"]
+ assert "Local-Deep-Research" in engine.headers["User-Agent"]
class TestPubChemSearchExecution:
diff --git a/tests/search_engines/test_search_engine_zenodo.py b/tests/search_engines/test_search_engine_zenodo.py
index e6836dcbd5..752e28c027 100644
--- a/tests/search_engines/test_search_engine_zenodo.py
+++ b/tests/search_engines/test_search_engine_zenodo.py
@@ -64,7 +64,7 @@ class TestZenodoSearchEngineInit:
engine = ZenodoSearchEngine()
assert "User-Agent" in engine.headers
- assert "LocalDeepResearch" in engine.headers["User-Agent"]
+ assert "Local-Deep-Research" in engine.headers["User-Agent"]
class TestZenodoQueryBuilding:
diff --git a/tests/ui_tests/playwright/tests/all-pages-mobile.spec.js b/tests/ui_tests/playwright/tests/all-pages-mobile.spec.js
index f1406b6dbc..e21549a05d 100644
--- a/tests/ui_tests/playwright/tests/all-pages-mobile.spec.js
+++ b/tests/ui_tests/playwright/tests/all-pages-mobile.spec.js
@@ -336,6 +336,14 @@ test.describe('All Pages - Touch Targets', () => {
// ============================================
test.describe('All Pages - Content Above Mobile Nav', () => {
+ // WebKit on CI is markedly slower than Chromium/Firefox at firing `load`
+ // and at running cross-process page.evaluate against `/`. The defensive
+ // waits below + the chunked DOM walk legitimately need more than the
+ // default 30s budget when the runner is under load. Raise the per-test
+ // budget so the test reflects real WebKit timing rather than misleadingly
+ // failing with "Target page... has been closed" on the first evaluate.
+ test.describe.configure({ timeout: 60000 });
+
for (const pageInfo of PAGES) {
test(`${pageInfo.name} content not hidden behind mobile nav`, async ({ page, isMobile }) => {
if (!isMobile) {
@@ -361,7 +369,9 @@ test.describe('All Pages - Content Above Mobile Nav', () => {
await page.waitForSelector('#benchmark-form input, #benchmark-form select, #benchmark-form textarea', { timeout: 10000 }).catch(() => {});
}
- // Collapse all help panels before checking - they can expand from localStorage state
+ // Collapse all help panels before checking - they can expand from localStorage state.
+ // The evaluate runs synchronously in-page, so panels are already hidden when it returns
+ // — no need for a follow-up waitForFunction that previously ate up to 5s of budget.
await page.evaluate(() => {
if (window.HelpService && typeof window.HelpService.collapseAll === 'function') {
window.HelpService.collapseAll();
@@ -371,11 +381,6 @@ test.describe('All Pages - Content Above Mobile Nav', () => {
el.style.display = 'none';
});
});
- // Wait for help panels to finish collapsing
- await page.waitForFunction(() => {
- const panels = document.querySelectorAll('.ldr-help-panel-content');
- return panels.length === 0 || Array.from(panels).every(el => el.style.display === 'none' || el.offsetHeight === 0);
- }, { timeout: 5000 }).catch(() => {});
// Ensure page is fully loaded before heavy DOM operations (WebKit stability).
// Cap with an explicit short timeout: without it, the default navigationTimeout
@@ -383,12 +388,12 @@ test.describe('All Pages - Content Above Mobile Nav', () => {
// `load`, leaving zero time for the DOM walk below.
await page.waitForLoadState('load', { timeout: 3000 }).catch(() => {});
- // Scroll to bottom to check last content
+ // Scroll to bottom to check last content. scrollTo() is synchronous inside
+ // page.evaluate(): the browser commits the scroll before the evaluate resolves,
+ // so an additional `waitForFunction(scrollY >= scrollHeight)` poll is redundant.
+ // The old poll could also never resolve on `/` when lazy-loaded content kept
+ // growing `document.body.scrollHeight`, eating its full 5s timeout on every run.
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
- // Wait for scroll to settle at the bottom
- await page.waitForFunction(() => {
- return (window.innerHeight + window.scrollY) >= document.body.scrollHeight - 1;
- }, { timeout: 5000 }).catch(() => {});
const hiddenElements = await findElementsBehindMobileNav(page, MOBILE_NAV_SELECTOR);