const fs = require('fs'); const path = require('path'); const HISTORY_FILE = path.join(__dirname, 'test-history.json'); const testFiles = [ 'smoke/navigation.smoke.spec.ts', 'admin/news-management.spec.ts', 'api/admin.api.spec.ts', ]; console.log('šŸ“Š Testing test scheduler...'); console.log('Test files:', testFiles); if (fs.existsSync(HISTORY_FILE)) { const data = fs.readFileSync(HISTORY_FILE, 'utf-8'); const history = JSON.parse(data); console.log('āœ… History loaded'); console.log('Records:', history.records.length); const schedule = testFiles.map(file => ({ file, testId: file.replace(/[^a-zA-Z0-9]/g, '-'), priority: file.includes('smoke') ? 1 : file.includes('api') ? 2 : 3, estimatedDuration: 60000, dependencies: [], })); console.log('\nšŸ“‹ Scheduled tests:'); schedule.forEach((test, index) => { console.log(` ${index + 1}. ${test.file} (Priority: ${test.priority})`); }); console.log('\nāœ… Scheduler test completed'); } else { console.log('āŒ History file not found'); }