MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / run

Function run

tests/screenshot_all_pages.mjs:10–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const PAGES = ['HOME','PLAYGROUND','EXPLAIN','ROUTING','MODELS','ACTIVITY','CONNECTIONS','BUDGET','FEEDBACK'];
9
10async function run() {
11 const browser = await chromium.launch({ headless: true });
12 const page = await (await browser.newContext({ viewport: { width: 1440, height: 900 } })).newPage();
13 await page.goto(BASE, { waitUntil: 'networkidle', timeout: 30000 });
14 await page.waitForTimeout(2000);
15
16 for (const name of PAGES) {
17 await page.click(`button:has-text("${name}")`, { timeout: 5000 });
18 await page.waitForTimeout(1500);
19 // For playground, type a complex prompt so we see results
20 if (name === 'PLAYGROUND') {
21 await page.locator('textarea').fill('Implement a B-tree with concurrent access, crash recovery, and MVCC support');
22 await page.waitForTimeout(10000); // wait for embedding model + prediction
23 }
24 await page.screenshot({ path: `${DIR}/${name.toLowerCase()}.png`, fullPage: true });
25 console.log(`✓ ${name}`);
26 }
27 await browser.close();
28}
29run().catch(e => { console.error(e); process.exit(1); });

Callers 1

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected