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(ci): use real registration flow in extended and critical UI tests

LearningCircuit20ac245acff4
diff --git a/.github/workflows/critical-ui-tests.yml b/.github/workflows/critical-ui-tests.yml
index 62ae0ad0ce..7338b4ab6d 100644
--- a/.github/workflows/critical-ui-tests.yml
+++ b/.github/workflows/critical-ui-tests.yml
@@ -65,43 +65,6 @@ jobs:
# Use consistent path for both init and server
mkdir -p "$PWD/data/encrypted_databases"
- - name: Initialize database
- env:
- TEST_ENV: true
- LDR_DATA_DIR: ${{ github.workspace }}/data
- run: |
- cd src
- cat > init_db.py << 'EOF'
- import os
- from pathlib import Path
-
- # Use LDR_DATA_DIR if set, otherwise default
- data_dir = Path(os.environ.get('LDR_DATA_DIR', Path.home() / '.local' / 'share' / 'local-deep-research'))
- print(f'Using data directory: {data_dir}')
- data_dir.mkdir(parents=True, exist_ok=True)
- (data_dir / 'encrypted_databases').mkdir(parents=True, exist_ok=True)
-
- from local_deep_research.database.auth_db import init_auth_database, get_auth_db_session
- from local_deep_research.database.models.auth import User
- from local_deep_research.database.encrypted_db import db_manager
-
- # Initialize auth database
- init_auth_database()
-
- # Create test user in auth database (no password stored)
- session = get_auth_db_session()
- user = User(username='test_admin')
- session.add(user)
- session.commit()
- session.close()
-
- # Create user's encrypted database with password
- engine = db_manager.create_user_database('test_admin', 'testpass123')
- print('Database initialized successfully')
- print(f'Encrypted databases in: {data_dir / "encrypted_databases"}')
- EOF
- pdm run python init_db.py
-
- name: Start test server
env:
CI: true
@@ -154,6 +117,10 @@ jobs:
run: |
mkdir -p tests/ui_tests/screenshots
+ - name: Register CI test user
+ working-directory: tests/ui_tests
+ run: node register_ci_user.js http://127.0.0.1:5000
+
- name: Run critical UI tests
env:
CI: true
diff --git a/.github/workflows/extended-ui-tests.yml b/.github/workflows/extended-ui-tests.yml
index b8e7acd05f..ebe3d2ea36 100644
--- a/.github/workflows/extended-ui-tests.yml
+++ b/.github/workflows/extended-ui-tests.yml
@@ -78,50 +78,6 @@ jobs:
mkdir -p tests/ui_tests/screenshots
mkdir -p tests/ui_tests/results
- # Pre-create test_admin user to speed up tests (avoids slow registration).
- # IMPORTANT: LDR_DATA_DIR must match between this step and "Start server"!
- # Without this consistency, login fails with 401 because the user's
- # encrypted database is created in a different directory than where
- # the server looks for it.
- - name: Initialize database with test user
- env:
- TEST_ENV: true
- LDR_DATA_DIR: ${{ github.workspace }}/data
- run: |
- cat > init_db.py << 'EOF'
- import os
- from pathlib import Path
-
- # Use LDR_DATA_DIR if set, otherwise default
- data_dir = Path(os.environ.get('LDR_DATA_DIR', Path.home() / '.local' / 'share' / 'local-deep-research'))
- print(f'Using data directory: {data_dir}')
- data_dir.mkdir(parents=True, exist_ok=True)
- (data_dir / 'encrypted_databases').mkdir(parents=True, exist_ok=True)
-
- import sys
- sys.path.insert(0, 'src')
-
- from local_deep_research.database.auth_db import init_auth_database, get_auth_db_session
- from local_deep_research.database.models.auth import User
- from local_deep_research.database.encrypted_db import db_manager
-
- # Initialize auth database
- init_auth_database()
-
- # Create test user in auth database (no password stored)
- session = get_auth_db_session()
- user = User(username='test_admin')
- session.add(user)
- session.commit()
- session.close()
-
- # Create user's encrypted database with password
- engine = db_manager.create_user_database('test_admin', 'testpass123')
- print('Database initialized successfully')
- print(f'Encrypted databases in: {data_dir / "encrypted_databases"}')
- EOF
- pdm run python init_db.py
-
- name: Start server
env:
LDR_DATA_DIR: ${{ github.workspace }}/data
@@ -144,6 +100,10 @@ jobs:
sleep 1
done
+ - name: Register CI test user
+ working-directory: tests/ui_tests
+ run: node register_ci_user.js http://localhost:5000
+
- name: Run critical UI tests
run: |
export DISPLAY=:99