~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: improve metrics UI tests for CI reliability (#2036)
LearningCircuit7682ac7a0946
diff --git a/tests/ui_tests/test_metrics_browser.js b/tests/ui_tests/test_metrics_browser.jsindex c68a824846..c2d0e8ac7b 100644--- a/tests/ui_tests/test_metrics_browser.js+++ b/tests/ui_tests/test_metrics_browser.js@@ -87,10 +87,14 @@ async function testMetricsPage() {} catch (error) {console.log(`❌ Error during test: ${error.message}`);+ process.exitCode = 1;} finally {await browser.close();console.log('🏁 Browser test completed');}}-testMetricsPage().catch(console.error);+testMetricsPage().catch(err => {+ console.error('❌ Unhandled error:', err);+ process.exitCode = 1;+});diff --git a/tests/ui_tests/test_metrics_display.js b/tests/ui_tests/test_metrics_display.jsindex 53ba6179e3..06c2df56be 100644--- a/tests/ui_tests/test_metrics_display.js+++ b/tests/ui_tests/test_metrics_display.js@@ -16,7 +16,7 @@ async function testMetricsDisplay() {try {// Step 1: Create and authenticate userconst username = `metrics_test_${Date.now()}`;- const password = `test'pass"with$pecial`;+ const password = 'T3st!Secure#2024$LDR';console.log(`📝 Creating user: ${username}`);console.log(` Password has special characters: ${password}\n`);@@ -119,14 +119,17 @@ async function testMetricsDisplay() {console.log('❌ No numeric values found on page');}+ console.log('\n✅ Test completed successfully!');} catch (error) {console.error('❌ Test error:', error.message);+ process.exitCode = 1;+ } finally {+ // Close browser properly+ await browser.close();}-- console.log('\n✅ Test completed successfully!');-- // Close browser properly- await browser.close();}-testMetricsDisplay().catch(console.error);+testMetricsDisplay().catch(err => {+ console.error('❌ Unhandled error:', err);+ process.exitCode = 1;+});diff --git a/tests/ui_tests/test_metrics_verification.js b/tests/ui_tests/test_metrics_verification.jsindex 3594010060..99a6859346 100644--- a/tests/ui_tests/test_metrics_verification.js+++ b/tests/ui_tests/test_metrics_verification.js@@ -234,11 +234,11 @@ async function testMetricsVerification() {// Create unique userconst timestamp = Date.now();const username = `metrics_test_${timestamp}`;- const password = `test'pass"with$pecial`;+ const password = 'T3st!Secure#2024$LDR';log(`\n=== METRICS VERIFICATION TEST ===`, 'section');log(`Username: ${username}`, 'info');- log(`Password: ${password} (with special characters)`, 'info');+ log(`Password: (secure password with special characters)`, 'info');// Authenticateawait ensureAuthenticated(page, username, password);@@ -298,7 +298,7 @@ async function testMetricsVerification() {} catch (error) {log(`\n❌ Test failed: ${error.message}`, 'error');console.error(error);-+ process.exitCode = 1;} finally {// Close browser properlyawait browser.close();@@ -306,4 +306,7 @@ async function testMetricsVerification() {}// Run the test-testMetricsVerification().catch(console.error);+testMetricsVerification().catch(err => {+ console.error('❌ Unhandled error:', err);+ process.exitCode = 1;+});diff --git a/tests/ui_tests/test_metrics_with_llm.js b/tests/ui_tests/test_metrics_with_llm.jsindex d0650fd908..b43d723724 100644--- a/tests/ui_tests/test_metrics_with_llm.js+++ b/tests/ui_tests/test_metrics_with_llm.js@@ -303,8 +303,12 @@ const { setupDefaultModel } = require('./model_helper');} catch (error) {console.error('Test failed:', error);+ process.exitCode = 1;} finally {console.log('\n=== TEST COMPLETE ===\n');await browser.close();}-})();+})().catch(err => {+ console.error('Unhandled error:', err);+ process.exitCode = 1;+});diff --git a/tests/ui_tests/test_simple_cost.js b/tests/ui_tests/test_simple_cost.jsindex 671c22d663..666c7ebfc6 100644--- a/tests/ui_tests/test_simple_cost.js+++ b/tests/ui_tests/test_simple_cost.js@@ -25,6 +25,11 @@ const { getPuppeteerLaunchOptions } = require('./puppeteer_config');}});+ try {+ // Authenticate first+ console.log('🔐 Ensuring authentication...');+ await authHelper.ensureAuthenticated();+console.log('Loading page...');// Clear cache and reloadawait page.setCacheEnabled(false);@@ -147,6 +152,11 @@ const { getPuppeteerLaunchOptions } = require('./puppeteer_config');console.log('Final element states:', finalStates);- console.log('Done');- await browser.close();+ console.log('✅ Done');+ } catch (error) {+ console.error('❌ Test failed:', error.message);+ process.exitCode = 1;+ } finally {+ await browser.close();+ }})();diff --git a/tests/ui_tests/test_simple_metrics.js b/tests/ui_tests/test_simple_metrics.jsindex 3b89f3550c..caa1a684ee 100644--- a/tests/ui_tests/test_simple_metrics.js+++ b/tests/ui_tests/test_simple_metrics.js@@ -14,7 +14,7 @@ async function testMetricsDashboard() {// Login with test userconst username = 'test_' + Date.now();- const password = 'testpass123';+ const password = 'T3st!Secure#2024$LDR';// Register firstconsole.log('📝 Registering user:', username);@@ -23,6 +23,13 @@ async function testMetricsDashboard() {await page.type('#username', username);await page.type('#password', password);await page.type('#confirm_password', password);++ // Check acknowledgment checkbox if present+ const acknowledgeCheckbox = await page.$('input[name="acknowledge"]');+ if (acknowledgeCheckbox) {+ await page.click('input[name="acknowledge"]');+ }+await page.click('button[type="submit"]');// Wait for redirect to home@@ -76,9 +83,13 @@ async function testMetricsDashboard() {} catch (error) {console.error('❌ Test failed:', error.message);+ process.exitCode = 1;} finally {await browser.close();}}-testMetricsDashboard().catch(console.error);+testMetricsDashboard().catch(err => {+ console.error('❌ Unhandled error:', err);+ process.exitCode = 1;+});diff --git a/tests/ui_tests/test_star_reviews.js b/tests/ui_tests/test_star_reviews.jsindex 5982aeed08..340846f28a 100644--- a/tests/ui_tests/test_star_reviews.js+++ b/tests/ui_tests/test_star_reviews.js@@ -149,9 +149,13 @@ async function testStarReviews() {} catch (error) {console.error('❌ Test error:', error);+ process.exitCode = 1;+ } finally {+ await browser.close();}-- await browser.close();}-testStarReviews();+testStarReviews().catch(err => {+ console.error('❌ Unhandled error:', err);+ process.exitCode = 1;+});