Files
wehub-resource-sync 7a0da7932b
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
chore: import upstream snapshot with attribution
2026-07-13 13:08:55 +08:00

99 lines
3.4 KiB
JavaScript

const { spawn } = require('child_process');
const fs = require('fs');
// Tests from the CI configuration
const tests = [
{ name: 'Research Submit', file: 'test_research_submit.js' },
{ name: 'Research Cancellation', file: 'test_research_cancellation.js' },
{ name: 'Export Functionality', file: 'test_export_functionality.js' },
{ name: 'Complete Workflow', file: 'test_complete_workflow.js' },
{ name: 'Concurrent Limit', file: 'test_concurrent_limit.js' },
{ name: 'Multi Research', file: 'test_multi_research.js' },
{ name: 'Research Simple', file: 'test_research_simple.js' },
{ name: 'Research Form', file: 'test_research_form.js' },
{ name: 'Research API', file: 'test_research_api.js' },
{ name: 'History Page', file: 'test_history_page.js' },
{ name: 'Full Navigation', file: 'test_full_navigation.js' },
{ name: 'Queue Simple', file: 'test_queue_simple.js' },
{ name: 'Direct Mode', file: 'test_direct_mode.js' }
];
async function checkTest(test) {
if (!fs.existsSync(test.file)) {
console.log(`⚠️ ${test.name}: FILE NOT FOUND`);
return 'missing';
}
console.log(`Checking ${test.name}...`);
return new Promise((resolve) => {
const testProcess = spawn('node', [test.file], {
stdio: 'pipe',
env: { ...process.env, HEADLESS: 'true' }
});
let output = '';
testProcess.stdout.on('data', (data) => {
output += data.toString();
});
testProcess.stderr.on('data', (data) => {
output += data.toString();
});
const timeout = setTimeout(() => {
testProcess.kill();
console.log(`⏱️ ${test.name}: TIMEOUT`);
resolve('timeout');
}, 60000); // 60 second timeout
testProcess.on('close', (code) => {
clearTimeout(timeout);
if (code === 0) {
console.log(`✅ ${test.name}: PASSED`);
resolve('passed');
} else {
console.log(`❌ ${test.name}: FAILED (exit code ${code})`);
// Show last 5 lines of output for failed tests
const lines = output.split('\n').filter(l => l.trim());
console.log(' Last output:', lines.slice(-5).join('\n '));
resolve('failed');
}
});
});
}
async function checkAll() {
console.log('Checking Extended UI Tests\n');
console.log('Note: Each test has a 60-second timeout\n');
const results = {
passed: [],
failed: [],
missing: [],
timeout: []
};
for (const test of tests) {
const result = await checkTest(test);
results[result].push(test.name);
}
console.log('\n📊 Summary:');
console.log(` Passed: ${results.passed.length}`);
console.log(` Failed: ${results.failed.length}`);
console.log(` Missing: ${results.missing.length}`);
console.log(` Timeout: ${results.timeout.length}`);
if (results.failed.length > 0) {
console.log('\n❌ Failed tests:', results.failed.join(', '));
}
if (results.missing.length > 0) {
console.log('\n⚠️ Missing tests:', results.missing.join(', '));
}
// Exit with error if any tests failed or timed out
const exitCode = (results.failed.length > 0 || results.timeout.length > 0) ? 1 : 0;
process.exit(exitCode);
}
checkAll();