~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix: Fix Puppeteer configuration and test_metrics_browser.js syntax errors
LearningCircuit000dd6654a0e
diff --git a/tests/ui_tests/puppeteer_config.js b/tests/ui_tests/puppeteer_config.jsindex fe27afcb6d..b1628457d4 100644--- a/tests/ui_tests/puppeteer_config.js+++ b/tests/ui_tests/puppeteer_config.js@@ -4,7 +4,7 @@function getPuppeteerLaunchOptions(additionalOptions = {}) {const defaultOptions = {- headless: process.env.CI ? true : false,+ headless: true,args: ['--no-sandbox','--disable-setuid-sandbox',diff --git a/tests/ui_tests/test_metrics_browser.js b/tests/ui_tests/test_metrics_browser.jsindex 3a504f4da6..f2b998752e 100644--- a/tests/ui_tests/test_metrics_browser.js+++ b/tests/ui_tests/test_metrics_browser.js@@ -1,5 +1,87 @@-const puppeteer = require('puppeteer'));+const puppeteer = require('puppeteer');const { getPuppeteerLaunchOptions } = require('./puppeteer_config');async function testMetricsPage() {- console.log('🚀 Starting browser test of metrics page...'));+ console.log('🚀 Starting browser test of metrics page...');++ const browser = await puppeteer.launch(getPuppeteerLaunchOptions());++ const page = await browser.newPage();++ // Listen to console logs from the page+ page.on('console', msg => {+ const type = msg.type();+ const text = msg.text();+ console.log(`📝 [${type.toUpperCase()}] ${text}`);+ });++ // Listen to JavaScript errors+ page.on('pageerror', error => {+ console.log(`❌ [ERROR] ${error.message}`);+ });++ // Listen to failed requests+ page.on('requestfailed', request => {+ console.log(`🔴 [REQUEST FAILED] ${request.url()} - ${request.failure().errorText}`);+ });++ try {+ console.log('📄 Navigating to metrics page...');+ await page.goto('http://127.0.0.1:5000/metrics/', {+ waitUntil: 'networkidle0',+ timeout: 5000+ });++ console.log('✅ Page loaded successfully');++ // Wait a bit for JavaScript to execute+ await new Promise(resolve => setTimeout(resolve, 2000));++ // Check if specific elements are visible+ const loadingVisible = await page.evaluate(() => {+ const loading = document.getElementById('loading');+ return loading ? window.getComputedStyle(loading).display !== 'none' : false;+ });++ const contentVisible = await page.evaluate(() => {+ const content = document.getElementById('metrics-content');+ return content ? window.getComputedStyle(content).display !== 'none' : false;+ });++ const errorVisible = await page.evaluate(() => {+ const error = document.getElementById('error');+ return error ? window.getComputedStyle(error).display !== 'none' : false;+ });++ console.log(`🔍 Element visibility check:`);+ console.log(` Loading: ${loadingVisible}`);+ console.log(` Content: ${contentVisible}`);+ console.log(` Error: ${errorVisible}`);++ // Check if token values are populated+ const tokenValues = await page.evaluate(() => {+ const totalTokens = document.getElementById('total-tokens');+ const totalResearches = document.getElementById('total-researches');+ return {+ totalTokens: totalTokens ? totalTokens.textContent : 'NOT FOUND',+ totalResearches: totalResearches ? totalResearches.textContent : 'NOT FOUND'+ };+ });++ console.log(`📊 Token values:`);+ console.log(` Total Tokens: ${tokenValues.totalTokens}`);+ console.log(` Total Researches: ${tokenValues.totalResearches}`);++ // Take a screenshot for debugging+ await page.screenshot({ path: './metrics_screenshot.png' });+ console.log('📸 Screenshot saved as metrics_screenshot.png');++ } catch (error) {+ console.log(`❌ Error during test: ${error.message}`);+ } finally {+ await browser.close();+ console.log('🏁 Browser test completed');+ }+}++testMetricsPage().catch(console.error);