24 lines
911 B
JavaScript
24 lines
911 B
JavaScript
|
|
import { test, expect } from '@playwright/test';
|
||
|
|
|
||
|
|
test('AutoForm comprehensive diagnostics', async ({ page }) => {
|
||
|
|
page.on('console', msg => console.log('BROWSER:', msg.text()));
|
||
|
|
await page.goto('/test/diagnostic_full.html');
|
||
|
|
await page.click('button:has-text("RUN COMPREHENSIVE DIAGNOSTIC")');
|
||
|
|
|
||
|
|
// Wait for completion (look for the "DIAGNOSTIC COMPLETE" log entry)
|
||
|
|
const log = page.locator('#log');
|
||
|
|
await expect(log).toContainText('DIAGNOSTIC COMPLETE', { timeout: 10000 });
|
||
|
|
|
||
|
|
// Check for any red "❌" marks
|
||
|
|
const failures = await page.evaluate(() => {
|
||
|
|
return Array.from(document.querySelectorAll('#log div'))
|
||
|
|
.filter(div => div.textContent.includes('❌'))
|
||
|
|
.map(div => div.textContent);
|
||
|
|
});
|
||
|
|
|
||
|
|
if (failures.length > 0) {
|
||
|
|
console.error('Diagnostic Failures:', failures);
|
||
|
|
}
|
||
|
|
expect(failures).toHaveLength(0);
|
||
|
|
});
|