import { chromium } from 'playwright'; import { mkdir } from 'fs/promises'; const URL = 'http://localhost:4321/?viz=true'; const OUTPUT_DIR = './test-screenshots'; const DEVICE_SCALE_FACTOR = 2; const MAX_EMBEDS = 5; async function main() { await mkdir(OUTPUT_DIR, { recursive: true }); console.log('šŸš€ Launching browser...'); const browser = await chromium.launch({ headless: false }); const context = await browser.newContext({ deviceScaleFactor: DEVICE_SCALE_FACTOR, viewport: { width: 1200, height: 800 } }); const page = await context.newPage(); console.log(`šŸ“„ Navigating to ${URL}...`); await page.goto(URL, { waitUntil: 'domcontentloaded', timeout: 60000 }); await page.waitForTimeout(3000); const embeds = await page.locator('.html-embed:has(select)').all(); console.log(`\nšŸ” Found ${embeds.length} embeds with