chore: import upstream snapshot with attribution
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Has been cancelled
Docker Tests (Consolidated) / Accessibility Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Unit Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Example Tests (push) Has been cancelled
Docker Tests (Consolidated) / Production Image Smoke Test (push) Has been cancelled
Docker Tests (Consolidated) / Infrastructure Tests (push) Has been cancelled
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Has been cancelled
Backwards Compatibility / Verify Encryption Constants (push) Has been cancelled
Backwards Compatibility / PyPI Version Compatibility (push) Has been cancelled
Backwards Compatibility / Database Migration Tests (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Docker Tests (Consolidated) / detect-changes (push) Has been cancelled
Docker Tests (Consolidated) / Build Test Image (push) Has been cancelled
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Has been cancelled
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Has been cancelled
Docker Tests (Consolidated) / Accessibility Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Unit Tests (push) Has been cancelled
Docker Tests (Consolidated) / LLM Example Tests (push) Has been cancelled
Docker Tests (Consolidated) / Production Image Smoke Test (push) Has been cancelled
Docker Tests (Consolidated) / Infrastructure Tests (push) Has been cancelled
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Has been cancelled
Backwards Compatibility / Verify Encryption Constants (push) Has been cancelled
Backwards Compatibility / PyPI Version Compatibility (push) Has been cancelled
Backwards Compatibility / Database Migration Tests (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Docker Tests (Consolidated) / detect-changes (push) Has been cancelled
Docker Tests (Consolidated) / Build Test Image (push) Has been cancelled
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Has been cancelled
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
/**
|
||||
* Check User Database Test
|
||||
* Verifies what tables exist in the user's database
|
||||
*/
|
||||
|
||||
const puppeteer = require('puppeteer');
|
||||
const AuthHelper = require('./auth_helper');
|
||||
const { getPuppeteerLaunchOptions } = require('./puppeteer_config');
|
||||
|
||||
async function checkUserDatabase() {
|
||||
const browser = await puppeteer.launch(getPuppeteerLaunchOptions());
|
||||
|
||||
const page = await browser.newPage();
|
||||
const baseUrl = 'http://127.0.0.1:5000';
|
||||
const authHelper = new AuthHelper(page, baseUrl);
|
||||
|
||||
console.log('🗄️ Checking User Database\n');
|
||||
|
||||
try {
|
||||
// Login
|
||||
await authHelper.ensureAuthenticated();
|
||||
console.log('✅ Logged in\n');
|
||||
|
||||
// Check database tables via settings page
|
||||
await page.goto(`${baseUrl}/settings/`, { waitUntil: 'domcontentloaded' });
|
||||
|
||||
// Try to get some indication of what's in the database
|
||||
const pageContent = await page.evaluate(() => {
|
||||
return {
|
||||
title: document.title,
|
||||
hasSettingsForm: !!document.querySelector('form'),
|
||||
settingsCount: document.querySelectorAll('.setting-item, input[type="text"], select').length,
|
||||
bodyText: document.body.innerText.substring(0, 500)
|
||||
};
|
||||
});
|
||||
|
||||
console.log('Settings page info:');
|
||||
console.log(`Title: ${pageContent.title}`);
|
||||
console.log(`Has settings form: ${pageContent.hasSettingsForm}`);
|
||||
console.log(`Settings elements: ${pageContent.settingsCount}`);
|
||||
|
||||
// Try to check research history to see if research table exists
|
||||
console.log('\n📋 Checking history page...');
|
||||
await page.goto(`${baseUrl}/history/`, { waitUntil: 'domcontentloaded' });
|
||||
|
||||
const historyContent = await page.evaluate(() => {
|
||||
return {
|
||||
hasHistory: !!document.querySelector('.ldr-history-list, .research-item, #history-container'),
|
||||
itemCount: document.querySelectorAll('.history-item, .research-item, .ldr-card').length,
|
||||
hasError: !!document.querySelector('.alert-danger'),
|
||||
errorText: document.querySelector('.alert-danger')?.textContent || '',
|
||||
bodyPreview: document.body.innerText.substring(0, 300)
|
||||
};
|
||||
});
|
||||
|
||||
console.log('\nHistory page info:');
|
||||
console.log(`Has history container: ${historyContent.hasHistory}`);
|
||||
console.log(`History items: ${historyContent.itemCount}`);
|
||||
if (historyContent.hasError) {
|
||||
console.log(`Error: ${historyContent.errorText}`);
|
||||
}
|
||||
|
||||
// Try a simple research submission to see what error we get
|
||||
console.log('\n🧪 Testing research submission for database errors...');
|
||||
|
||||
await page.goto(baseUrl, { waitUntil: 'domcontentloaded' });
|
||||
|
||||
const testResult = await page.evaluate(async () => {
|
||||
try {
|
||||
const response = await fetch('/api/start_research', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
query: 'test',
|
||||
mode: 'quick'
|
||||
})
|
||||
});
|
||||
|
||||
const text = await response.text();
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(text);
|
||||
} catch {
|
||||
data = { parseError: true, text };
|
||||
}
|
||||
|
||||
return {
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
data
|
||||
};
|
||||
} catch (error) {
|
||||
return { error: error.message };
|
||||
}
|
||||
});
|
||||
|
||||
console.log('\nResearch API response:');
|
||||
console.log(`Status: ${testResult.status} ${testResult.statusText}`);
|
||||
console.log('Data:', JSON.stringify(testResult.data, null, 2));
|
||||
|
||||
// Check server logs for SQLAlchemy errors
|
||||
console.log('\n💡 To see database errors, check:');
|
||||
console.log('tail -f /tmp/ldr_server_ui_tests.log | grep -E "(table|Table|CREATE|research_sessions)"');
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error.message);
|
||||
}
|
||||
|
||||
console.log('\n⏸️ Browser open for inspection...');
|
||||
await new Promise(resolve => setTimeout(resolve, 30000));
|
||||
|
||||
await browser.close();
|
||||
console.log('✅ Done');
|
||||
}
|
||||
|
||||
checkUserDatabase().catch(console.error);
|
||||
Reference in New Issue
Block a user