feat: PLANNING体系首版(00路线图/02任务总表/03执行协议/I-03/I-04/registry42口径)+M1止血交付
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
const { chromium } = require('./node_modules/playwright');
|
||||
(async () => {
|
||||
const browser = await chromium.launch();
|
||||
const page = await browser.newPage({ viewport: { width: 1226, height: 800 } });
|
||||
const errors = [];
|
||||
page.on('console', m => { if (m.type() === 'error') errors.push(m.text()); });
|
||||
page.on('pageerror', e => errors.push('[pageerror] ' + e.message));
|
||||
try {
|
||||
await page.goto('http://localhost:5173/', { waitUntil: 'networkidle', timeout: 15000 });
|
||||
} catch (e) {
|
||||
errors.push('[nav] ' + e.message);
|
||||
}
|
||||
await page.waitForTimeout(2000);
|
||||
await page.screenshot({ path: '/tmp/navbar_check.png' });
|
||||
const title = await page.title();
|
||||
const bodyLen = await page.evaluate(() => document.body?.innerText?.trim().length || 0);
|
||||
const childCount = await page.evaluate(() => document.body?.children?.length || 0);
|
||||
const preview = await page.evaluate(() => document.body?.innerText?.trim().substring(0, 500) || '');
|
||||
console.log(JSON.stringify({ title, bodyLen, childCount, errors, preview }));
|
||||
await browser.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user