~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: remove duplicate api.js script tags and correct library test selectors (#2680)
LearningCircuit6e14341c90ab
diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.ymlindex aefaeab3e8..dec59cb7d1 100644--- a/.github/workflows/docker-tests.yml+++ b/.github/workflows/docker-tests.yml@@ -547,40 +547,16 @@ jobs:- name: Run UI testsrun: |- run_tests() {- docker run --rm \- -v "$PWD":/app \- -e LDR_USE_FALLBACK_LLM=true \- -e CI=true \- -e PUPPETEER_HEADLESS=true \- -e LDR_DB_KDF_ITERATIONS=1000 \- --network host \- -w /app/tests/ui_tests \- ${{ env.TEST_IMAGE }} \- sh -c "xvfb-run -a -s '-screen 0 1920x1080x24' node run_all_tests.js"- }-- if run_tests; then- echo "UI tests passed on first attempt"- else- echo "UI tests failed on first attempt — restarting server and retrying..."- docker restart ldr-server- SERVER_READY=false- for i in $(seq 1 30); do- if curl -f http://localhost:5000/api/v1/health 2>/dev/null; then- echo "Server ready after restart ($i seconds)"- SERVER_READY=true- break- fi- sleep 1- done- if [ "$SERVER_READY" = "false" ]; then- echo "Server failed to restart after 30 seconds"- docker logs ldr-server- exit 1- fi- run_tests || exit 1- fi+ docker run --rm \+ -v "$PWD":/app \+ -e LDR_USE_FALLBACK_LLM=true \+ -e CI=true \+ -e PUPPETEER_HEADLESS=true \+ -e LDR_DB_KDF_ITERATIONS=1000 \+ --network host \+ -w /app/tests/ui_tests \+ ${{ env.TEST_IMAGE }} \+ sh -c "xvfb-run -a -s '-screen 0 1920x1080x24' node run_all_tests.js"- name: Stop serverif: always()diff --git a/src/local_deep_research/web/templates/pages/benchmark.html b/src/local_deep_research/web/templates/pages/benchmark.htmlindex 9811b3165d..86e39119f9 100644--- a/src/local_deep_research/web/templates/pages/benchmark.html+++ b/src/local_deep_research/web/templates/pages/benchmark.html@@ -2934,9 +2934,6 @@ function saveEvaluationSetting(key, value) {{% block page_scripts %}<!-- Load required services for progress tracking --><script defer src="/static/js/services/audio.js"></script>-<script defer src="/static/js/services/formatting.js"></script>-<script defer src="/static/js/services/api.js"></script>-<script defer src="/static/js/services/socket.js"></script><!-- Load custom dropdown component for evaluation model selection --><script defer src="/static/js/components/custom_dropdown.js"></script>{% endblock %}diff --git a/src/local_deep_research/web/templates/pages/history.html b/src/local_deep_research/web/templates/pages/history.htmlindex 06b5d24f6b..19aec140e4 100644--- a/src/local_deep_research/web/templates/pages/history.html+++ b/src/local_deep_research/web/templates/pages/history.html@@ -42,9 +42,6 @@{% endblock %}{% block page_scripts %}-<!-- Load utilities first -->-<script defer src="/static/js/services/formatting.js"></script>-<script defer src="/static/js/services/api.js"></script><!-- Load URL utilities --><script defer src="/static/js/config/urls.js"></script><!-- Then load the component -->diff --git a/src/local_deep_research/web/templates/pages/progress.html b/src/local_deep_research/web/templates/pages/progress.htmlindex d5bb8ddcee..dd1b80229c 100644--- a/src/local_deep_research/web/templates/pages/progress.html+++ b/src/local_deep_research/web/templates/pages/progress.html@@ -57,9 +57,6 @@{% block page_scripts %}<!-- Load required services --><script defer src="/static/js/services/audio.js"></script>-<script defer src="/static/js/services/formatting.js"></script>-<script defer src="/static/js/services/api.js"></script>-<script defer src="/static/js/services/socket.js"></script><!-- Then load the component --><script defer src="/static/js/components/progress.js"></script>diff --git a/src/local_deep_research/web/templates/pages/results.html b/src/local_deep_research/web/templates/pages/results.htmlindex e9d9e122a4..1a9b79316d 100644--- a/src/local_deep_research/web/templates/pages/results.html+++ b/src/local_deep_research/web/templates/pages/results.html@@ -128,8 +128,6 @@<script defer src="/static/js/components/fallback/formatting.js"></script><!-- Main services -->-<script defer src="/static/js/services/formatting.js"></script>-<script defer src="/static/js/services/api.js"></script><script defer src="/static/js/services/pdf.js?v={{ range(1000, 9999) | random }}"></script><!-- Results component -->diff --git a/tests/ui_tests/test_history_page_ci.js b/tests/ui_tests/test_history_page_ci.jsindex 414e15fd19..832fb1e366 100644--- a/tests/ui_tests/test_history_page_ci.js+++ b/tests/ui_tests/test_history_page_ci.js@@ -39,51 +39,66 @@ const HistoryPageTests = {async historyTableStructure(page, baseUrl) {await page.goto(`${baseUrl}/history`, { waitUntil: 'networkidle2' });+ // Wait for JS to render history items from API+ await page.waitForFunction(+ () => document.querySelectorAll('.ldr-history-item, .history-item, [data-research-id], table tbody tr').length > 0+ || document.querySelector('.ldr-empty-state, .empty-state, .no-results'),+ { timeout: 5000 }+ ).catch(() => {});+const result = await page.evaluate(() => {const table = document.querySelector('table, .history-table');- if (!table) return { hasTable: false };+ if (table) {+ const headers = Array.from(table.querySelectorAll('th')).map(th => th.textContent?.toLowerCase().trim());+ const rows = table.querySelectorAll('tbody tr, .history-item');+ return {+ hasTable: true,+ hasQuery: headers.some(h => h.includes('query') || h.includes('question') || h.includes('topic')),+ hasMode: headers.some(h => h.includes('mode') || h.includes('type')),+ hasStatus: headers.some(h => h.includes('status')),+ hasDate: headers.some(h => h.includes('date') || h.includes('time') || h.includes('created')),+ hasDuration: headers.some(h => h.includes('duration') || h.includes('time')),+ headerCount: headers.length,+ rowCount: rows.length,+ headers: headers.slice(0, 8)+ };+ }- const headers = Array.from(table.querySelectorAll('th')).map(th => th.textContent?.toLowerCase().trim());- const rows = table.querySelectorAll('tbody tr, .history-item');+ // Check for list/card-based layout (ldr-history-list with ldr-history-item)+ const items = document.querySelectorAll('.ldr-history-item, .history-card, .research-card, [data-research-id]');+ if (items.length > 0) {+ return { hasTable: false, hasCards: true, cardCount: items.length };+ }- return {- hasTable: true,- hasQuery: headers.some(h => h.includes('query') || h.includes('question') || h.includes('topic')),- hasMode: headers.some(h => h.includes('mode') || h.includes('type')),- hasStatus: headers.some(h => h.includes('status')),- hasDate: headers.some(h => h.includes('date') || h.includes('time') || h.includes('created')),- hasDuration: headers.some(h => h.includes('duration') || h.includes('time')),- headerCount: headers.length,- rowCount: rows.length,- headers: headers.slice(0, 8)- };+ return { hasTable: false, hasCards: false };});- if (!result.hasTable) {- // Check for card-based layout instead- const cardResult = await page.evaluate(() => {- const cards = document.querySelectorAll('.history-card, .research-card, [data-research-id]');- return { hasCards: cards.length > 0, cardCount: cards.length };- });-- if (cardResult.hasCards) {- return { passed: true, message: `History uses card layout (${cardResult.cardCount} cards)` };- }+ if (result.hasTable) {+ return {+ passed: result.hasQuery || result.hasDate,+ message: `History table: ${result.headerCount} columns (${result.headers.join(', ')}), ${result.rowCount} rows`+ };+ }- return { passed: null, skipped: true, message: 'No history table or cards found' };+ if (result.hasCards) {+ return { passed: true, message: `History uses card layout (${result.cardCount} items)` };}- return {- passed: result.hasQuery || result.hasDate,- message: `History table: ${result.headerCount} columns (${result.headers.join(', ')}), ${result.rowCount} rows`- };+ return { passed: null, skipped: true, message: 'No history table or cards found' };},async historyItemActions(page, baseUrl) {await page.goto(`${baseUrl}/history`, { waitUntil: 'networkidle2' });+ // Wait for JS to render history items from API+ await page.waitForFunction(+ () => document.querySelectorAll('.ldr-history-item, .history-item, [data-research-id]').length > 0+ || document.querySelector('.ldr-empty-state, .empty-state'),+ { timeout: 5000 }+ ).catch(() => {});+const result = await page.evaluate(() => {- const items = document.querySelectorAll('.history-item, .research-item, tr[data-id], [data-research-id]');+ const items = document.querySelectorAll('.ldr-history-item, .history-item, .research-item, tr[data-id], [data-research-id]');if (items.length === 0) return { hasItems: false };const firstItem = items[0];diff --git a/tests/ui_tests/test_library_documents_ci.js b/tests/ui_tests/test_library_documents_ci.jsindex 6ca66fbc30..9325053ada 100644--- a/tests/ui_tests/test_library_documents_ci.js+++ b/tests/ui_tests/test_library_documents_ci.js@@ -15,7 +15,7 @@ const { setupTest, teardownTest, TestResults, log, delay } = require('./test_lib// ============================================================================const LibraryPageTests = {async libraryPageLoads(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const hasContent = document.body.textContent.length > 100;@@ -38,13 +38,13 @@ const LibraryPageTests = {},async libraryHeaderStats(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {// Look for statistics in headerconst statsArea = document.querySelector('.stats, .library-stats, .header-stats, [class*="statistics"]');- const pdfCount = document.querySelector('[class*="pdf-count"], [class*="total-docs"], .doc-count');- const storageSize = document.querySelector('[class*="storage"], [class*="size"]');+ const pdfCount = document.querySelector('#total-pdfs');+ const storageSize = document.querySelector('#total-size');// Look for any numbers that might be statsconst pageText = document.body.textContent;@@ -69,7 +69,7 @@ const LibraryPageTests = {},async storageModeDisplay(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const pageText = document.body.textContent.toLowerCase();@@ -114,7 +114,7 @@ const LibraryPageTests = {// ============================================================================const FilterControlsTests = {async filterControlsExist(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });await delay(500);const result = await page.evaluate(() => {@@ -185,9 +185,9 @@ const FilterControlsTests = {},async searchFilterFunctionality(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });- const searchInput = await page.$('input[type="search"], input[placeholder*="search"], #search, .search-input');+ const searchInput = await page.$('#search-documents, input[type="search"], input[placeholder*="search" i], #search, .search-input');if (!searchInput) {return { passed: null, skipped: true, message: 'No search input found' };@@ -215,7 +215,7 @@ const FilterControlsTests = {},async dateFilterButtons(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, [class*="filter-btn"]'));@@ -254,7 +254,7 @@ const FilterControlsTests = {// ============================================================================const ViewToggleTests = {async viewToggleExists(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const gridBtn = document.querySelector(@@ -301,7 +301,7 @@ const ViewToggleTests = {},async viewToggleFunctionality(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const gridBtn = document.querySelector('[data-view="grid"], .grid-view, #grid-view');@@ -344,7 +344,7 @@ const ViewToggleTests = {// ============================================================================const DocumentCardTests = {async documentCardsDisplay(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const cards = document.querySelectorAll(@@ -398,7 +398,7 @@ const DocumentCardTests = {},async documentCardActions(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const card = document.querySelector('.document-card, .doc-card, .library-item, .card');@@ -436,7 +436,7 @@ const DocumentCardTests = {// ============================================================================const PdfViewerTests = {async pdfViewerModalExists(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });// Try to click view PDF buttonconst clicked = await page.evaluate(() => {@@ -491,7 +491,7 @@ const PdfViewerTests = {},async pdfViewerCloseButton(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });// Open PDF viewerawait page.evaluate(() => {@@ -538,7 +538,7 @@ const PdfViewerTests = {// ============================================================================const TextViewerTests = {async textViewerModalExists(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });// Try to click view text buttonconst clicked = await page.evaluate(() => {@@ -591,7 +591,7 @@ const TextViewerTests = {},async textViewerCopyButton(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });// Open text viewerawait page.evaluate(() => {@@ -639,7 +639,7 @@ const TextViewerTests = {// ============================================================================const BulkActionsTests = {async getAllPdfsButton(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, a.btn'));@@ -666,7 +666,7 @@ const BulkActionsTests = {},async syncLibraryButton(page, baseUrl) {- await page.goto(`${baseUrl}/library`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/library`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, a.btn'));diff --git a/tests/ui_tests/test_news_feed_ci.js b/tests/ui_tests/test_news_feed_ci.jsindex f89798d9ea..84e9d4f512 100644--- a/tests/ui_tests/test_news_feed_ci.js+++ b/tests/ui_tests/test_news_feed_ci.js@@ -15,7 +15,7 @@ const { setupTest, teardownTest, TestResults, log, delay } = require('./test_lib// ============================================================================const NewsFeedPageTests = {async newsFeedPageLoads(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const hasContent = document.body.textContent.length > 100;@@ -38,7 +38,7 @@ const NewsFeedPageTests = {},async searchFunctionality(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const searchInput = document.querySelector(@@ -68,7 +68,7 @@ const NewsFeedPageTests = {},async refreshFeedButton(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn'));@@ -96,7 +96,7 @@ const NewsFeedPageTests = {},async autoRefreshToggle(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const toggle = document.querySelector(@@ -140,7 +140,7 @@ const NewsFeedPageTests = {// ============================================================================const NewsFiltersTests = {async subscriptionFilter(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const filter = document.querySelector(@@ -174,7 +174,7 @@ const NewsFiltersTests = {},async timeFilterButtons(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, .filter-btn'));@@ -202,7 +202,7 @@ const NewsFiltersTests = {},async impactSlider(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const slider = document.querySelector(@@ -236,7 +236,7 @@ const NewsFiltersTests = {// ============================================================================const NewsCardsTests = {async newsCardsDisplay(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const cards = document.querySelectorAll(@@ -294,7 +294,7 @@ const NewsCardsTests = {},async loadMoreButton(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, a.btn'));@@ -326,7 +326,7 @@ const NewsCardsTests = {// ============================================================================const NewsTemplatesTests = {async templatesSidebarExists(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const sidebar = document.querySelector(@@ -361,7 +361,7 @@ const NewsTemplatesTests = {},async templateClickable(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const template = document.querySelector(@@ -404,7 +404,7 @@ const NewsTemplatesTests = {},async trendingTopics(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const trending = document.querySelector(@@ -443,7 +443,7 @@ const NewsTemplatesTests = {// ============================================================================const SubscriptionTests = {async createSubscriptionButton(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, a.btn'));@@ -470,7 +470,7 @@ const SubscriptionTests = {},async manageSubscriptionsButton(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, a.btn, a'));@@ -498,7 +498,7 @@ const SubscriptionTests = {},async subscriptionsModalOpens(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });// Click manage subscriptionsconst clicked = await page.evaluate(() => {@@ -553,7 +553,7 @@ const SubscriptionTests = {},async subscriptionFormFields(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });// Try to open create subscription formawait page.evaluate(() => {@@ -616,7 +616,7 @@ const SubscriptionTests = {// ============================================================================const RecentSearchesTests = {async recentSearchesSection(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const section = document.querySelector(@@ -650,7 +650,7 @@ const RecentSearchesTests = {},async clearSearchHistoryButton(page, baseUrl) {- await page.goto(`${baseUrl}/news`, { waitUntil: 'networkidle2' });+ await page.goto(`${baseUrl}/news`, { waitUntil: 'domcontentloaded' });const result = await page.evaluate(() => {const buttons = Array.from(document.querySelectorAll('button, .btn, a'));diff --git a/tests/ui_tests/test_register_full_flow.js b/tests/ui_tests/test_register_full_flow.jsindex 4c7f2a042e..95abc89f3e 100644--- a/tests/ui_tests/test_register_full_flow.js+++ b/tests/ui_tests/test_register_full_flow.js@@ -54,8 +54,8 @@ async function testRegisterFullFlow() {await page.waitForSelector('input[name="username"]', { timeout: 10000 });console.log('✅ Registration page loaded\n');- // Test 1: Username validation (minlength is 1)- console.log('📋 Test 1: Username with 1 char should be valid');+ // Test 1: Username validation (minlength is 3)+ console.log('📋 Test 1: Username with 1 char should be too short');const usernameInput = await page.$('input[name="username"]');await page.type('input[name="username"]', 'a', { delay: 50 });@@ -68,11 +68,11 @@ async function testRegisterFullFlow() {console.log(` Value: "a" (1 char), tooShort: ${validity.tooShort}`);- if (!validity.tooShort) {- console.log('✅ Username with 1 char passes minlength check');+ if (validity.tooShort) {+ console.log('✅ Username with 1 char correctly fails minlength check');testsPassed++;} else {- console.log('❌ Username with 1 char should pass minlength check');+ console.log('❌ Username with 1 char should fail minlength check (minlength=3)');testsFailed++;}@@ -122,15 +122,15 @@ async function testRegisterFullFlow() {// Clear passwordawait page.evaluate(() => document.querySelector('input[name="password"]').value = '');- // Test weak password (only lowercase, < 8 chars doesn't count)- await page.type('input[name="password"]', 'weakpass', { delay: 50 });+ // Test weak password (short lowercase-only, scores strength=1: only lowercase match)+ await page.type('input[name="password"]', 'abcdefg', { delay: 50 });await new Promise(resolve => setTimeout(resolve, 200));let strengthBar = await page.$('#password-strength');let strengthVisible = await page.evaluate(el => el.style.display !== 'none', strengthBar);let strengthClasses = await page.evaluate(el => el.className, strengthBar);- console.log(` Weak password "weakpass" - visible: ${strengthVisible}, classes: "${strengthClasses}"`);+ console.log(` Weak password "abcdefg" - visible: ${strengthVisible}, classes: "${strengthClasses}"`);if (strengthVisible) {console.log('✅ Password strength indicator is visible');diff --git a/tests/ui_tests/test_research_form_ci.js b/tests/ui_tests/test_research_form_ci.jsindex 94155787d3..4065770a68 100644--- a/tests/ui_tests/test_research_form_ci.js+++ b/tests/ui_tests/test_research_form_ci.js@@ -371,6 +371,7 @@ const AdvancedOptionsTests = {await delay(300);const result = await page.evaluate(() => {+ // Check for standard <select>const engineSelect = document.querySelector('select[name*="engine"], ' +'select[name*="search"], ' +@@ -378,15 +379,21 @@ const AdvancedOptionsTests = {'#engine');- if (!engineSelect) return { hasSelect: false };+ if (engineSelect && engineSelect.tagName === 'SELECT') {+ const options = Array.from(engineSelect.options).map(o => o.text);+ return { hasSelect: true, optionCount: options.length, options: options.slice(0, 10) };+ }- const options = Array.from(engineSelect.options).map(o => o.text);+ // Check for custom dropdown component (used by LDR)+ const customInput = document.querySelector('#search_engine, input[id="search_engine"]');+ if (customInput) {+ const dropdown = customInput.closest('.ldr-custom-dropdown') || customInput.parentElement;+ const items = dropdown ? dropdown.querySelectorAll('.ldr-custom-dropdown-item, [data-value]') : [];+ const options = Array.from(items).map(i => i.textContent?.trim());+ return { hasSelect: true, isCustom: true, optionCount: options.length, options: options.slice(0, 10) };+ }- return {- hasSelect: true,- optionCount: options.length,- options: options.slice(0, 10)- };+ return { hasSelect: false };});if (!result.hasSelect) {@@ -395,7 +402,7 @@ const AdvancedOptionsTests = {return {passed: result.optionCount > 0,- message: `Search engine dropdown: ${result.optionCount} options (${result.options.join(', ')})`+ message: `Search engine dropdown${result.isCustom ? ' (custom)' : ''}: ${result.optionCount} options (${result.options.join(', ')})`};},diff --git a/tests/ui_tests/test_settings_interactions_ci.js b/tests/ui_tests/test_settings_interactions_ci.jsindex 931ce323bc..1a4cd8fedd 100644--- a/tests/ui_tests/test_settings_interactions_ci.js+++ b/tests/ui_tests/test_settings_interactions_ci.js@@ -68,7 +68,10 @@ const SettingsPageTests = {async settingsSearchFiltering(page, baseUrl) {await page.goto(`${baseUrl}/settings`, { waitUntil: 'networkidle2' });- const searchInput = await page.$('input[type="search"], input[placeholder*="search"], input[placeholder*="filter"]');+ // Wait for settings to load dynamically+ await delay(1000);++ const searchInput = await page.$('#settings-search, input[type="search"], input[placeholder*="search" i], input[placeholder*="filter" i]');if (!searchInput) {return { passed: null, skipped: true, message: 'No search input to test filtering' };@@ -76,7 +79,7 @@ const SettingsPageTests = {// Count initial settingsconst initialCount = await page.evaluate(() => {- const settings = document.querySelectorAll('.setting, .setting-item, [class*="setting-row"]');+ const settings = document.querySelectorAll('.ldr-settings-item, .setting, .setting-item, [class*="setting-row"]');return settings.length;});@@ -85,7 +88,7 @@ const SettingsPageTests = {await delay(300);const afterSearchCount = await page.evaluate(() => {- const visibleSettings = Array.from(document.querySelectorAll('.setting, .setting-item, [class*="setting-row"]'))+ const visibleSettings = Array.from(document.querySelectorAll('.ldr-settings-item, .setting, .setting-item, [class*="setting-row"]')).filter(s => window.getComputedStyle(s).display !== 'none');return visibleSettings.length;});@@ -249,8 +252,10 @@ const SettingsControlsTests = {const result = await page.evaluate(() => {const numberInputs = document.querySelectorAll(+ '.ldr-settings-item input[type="number"], ' +'.settings input[type="number"], ' +- '.setting input[type="number"]'+ '.setting input[type="number"], ' ++ 'input[type="number"][name]');const firstInput = numberInputs[0];@@ -330,8 +335,10 @@ const SettingsControlsTests = {const result = await page.evaluate(() => {const selects = document.querySelectorAll(+ '.ldr-settings-item select, ' +'.settings select, ' +- '.setting select'+ '.setting select, ' ++ 'select[name]');const firstSelect = selects[0];@@ -360,9 +367,11 @@ const SettingsControlsTests = {const result = await page.evaluate(() => {const toggle = document.querySelector(+ '.ldr-settings-item input[type="checkbox"], ' +'.settings input[type="checkbox"], ' +'.toggle-switch input, ' +- '.switch input'+ '.switch input, ' ++ 'input[type="checkbox"][name]');if (!toggle) return { hasToggle: false };diff --git a/tests/ui_tests/test_settings_pages_ci.js b/tests/ui_tests/test_settings_pages_ci.jsindex d4f0367b10..97abb5630f 100644--- a/tests/ui_tests/test_settings_pages_ci.js+++ b/tests/ui_tests/test_settings_pages_ci.js@@ -132,7 +132,7 @@ const SettingsInputTests = {'[name="llm.provider"]');- if (!providerSelect) return { exists: false };+ if (!providerSelect || providerSelect.tagName !== 'SELECT') return { exists: false };const options = Array.from(providerSelect.options);return {