vibe coded maxx
This commit is contained in:
@@ -214,6 +214,32 @@ app.get('/api/export/json', (req, res) => {
|
||||
res.sendFile(DATA_FILE);
|
||||
});
|
||||
|
||||
// Export Automated Playwright Tests (uses the generator script)
|
||||
app.post('/api/export/automated-tests', (req, res) => {
|
||||
try {
|
||||
const { group } = req.body;
|
||||
|
||||
if (!group) {
|
||||
return res.status(400).json({ error: 'Group is required for now' });
|
||||
}
|
||||
|
||||
const { execSync } = require('child_process');
|
||||
const scriptPath = path.join(__dirname, 'scripts', 'generate-playwright-tests.js');
|
||||
|
||||
// Generate for the specific group
|
||||
execSync(`node ${scriptPath} --group ${group}`, { stdio: 'inherit' });
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
message: `Automated tests generated for group ${group}`,
|
||||
group
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
res.status(500).json({ error: 'Failed to export automated tests: ' + e.message });
|
||||
}
|
||||
});
|
||||
|
||||
// Health
|
||||
app.get('/api/health', (req, res) => res.json({ status: 'ok' }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user