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): move registration script to tests/ui_tests

LearningCircuit75387b1f3ee8
diff --git a/.github/workflows/mobile-ui-tests.yml b/.github/workflows/mobile-ui-tests.yml
index b8e5c5fdb8..c81baf9d57 100644
--- a/.github/workflows/mobile-ui-tests.yml
+++ b/.github/workflows/mobile-ui-tests.yml
@@ -104,7 +104,7 @@ jobs:
- name: Register CI test user
working-directory: tests/ui_tests
- run: node ../../scripts/ci/register_test_user.cjs http://127.0.0.1:5000
+ run: node register_ci_user.js http://127.0.0.1:5000
- name: Run Mobile Navigation Tests
working-directory: tests/ui_tests
diff --git a/.github/workflows/responsive-ui-tests-enhanced.yml b/.github/workflows/responsive-ui-tests-enhanced.yml
index 0eb9fbc37e..9ea9153464 100644
--- a/.github/workflows/responsive-ui-tests-enhanced.yml
+++ b/.github/workflows/responsive-ui-tests-enhanced.yml
@@ -143,7 +143,7 @@ jobs:
- name: Register CI test user
working-directory: tests/ui_tests
- run: node ../../scripts/ci/register_test_user.cjs http://127.0.0.1:5000
+ run: node register_ci_user.js http://127.0.0.1:5000
- name: Run responsive UI tests - ${{ matrix.viewport }}
id: run-tests
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 6af52a689e..bf13e02bd2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -361,7 +361,7 @@ jobs:
--network host \
-w /app/tests/ui_tests \
ldr-test \
- node /app/scripts/ci/register_test_user.cjs http://localhost:5000
+ node register_ci_user.js http://localhost:5000
- name: Run UI tests
run: |
diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml
index 42a234fbde..222970a0f9 100644
--- a/.github/workflows/ui-tests.yml
+++ b/.github/workflows/ui-tests.yml
@@ -126,7 +126,7 @@ jobs:
- name: Register CI test user
working-directory: tests/ui_tests
- run: node ../../scripts/ci/register_test_user.cjs http://localhost:5000
+ run: node register_ci_user.js http://localhost:5000
- name: Run UI tests
run: |
diff --git a/tests/ui_tests/register_ci_user.js b/tests/ui_tests/register_ci_user.js
new file mode 100644
index 0000000000..be0c6ed4cf
--- /dev/null
+++ b/tests/ui_tests/register_ci_user.js
@@ -0,0 +1,67 @@
+#!/usr/bin/env node
+/**
+ * Register CI test user via the real registration flow
+ *
+ * This script uses the same auth_helper.js that tests use,
+ * ensuring we test the actual registration flow.
+ *
+ * Usage: node register_ci_user.js [base_url]
+ */
+
+const puppeteer = require('puppeteer');
+const AuthHelper = require('./auth_helper.js');
+const { CI_TEST_USER } = AuthHelper;
+
+const BASE_URL = process.argv[2] || process.env.TEST_BASE_URL || 'http://127.0.0.1:5000';
+
+async function main() {
+ console.log(`Registering CI test user (${CI_TEST_USER.username}) at ${BASE_URL}...`);
+
+ let browser;
+ try {
+ browser = await puppeteer.launch({
+ headless: 'new',
+ args: [
+ '--no-sandbox',
+ '--disable-setuid-sandbox',
+ '--disable-dev-shm-usage',
+ '--disable-gpu'
+ ]
+ });
+
+ const page = await browser.newPage();
+ const auth = new AuthHelper(page, BASE_URL);
+
+ // Try to register the CI test user
+ try {
+ await auth.register(CI_TEST_USER.username, CI_TEST_USER.password);
+ console.log('Registration successful');
+ } catch (regError) {
+ // User might already exist, try to login to verify
+ console.log(`Registration note: ${regError.message}`);
+ console.log('Attempting login to verify user exists...');
+
+ try {
+ await auth.login(CI_TEST_USER.username, CI_TEST_USER.password);
+ console.log('Login successful - user already exists');
+ } catch (loginError) {
+ console.log(`Login also failed: ${loginError.message}`);
+ console.log('Warning: Could not register or login CI test user');
+ console.log('Tests will fall back to creating their own users');
+ }
+ }
+
+ console.log('CI test user setup complete');
+
+ } catch (error) {
+ console.error('Error during CI test user setup:', error.message);
+ // Don't fail the workflow - tests have their own fallback
+ console.log('Tests will fall back to creating their own users');
+ } finally {
+ if (browser) {
+ await browser.close();
+ }
+ }
+}
+
+main().catch(console.error);