// Screenshots of Radicale's own web UI for the catalog card (checklist 8.3), taken on bench 9401 with headless Chrome // (ghcr.io/puppeteer/puppeteer). The app runs from the template with throwaway credentials and two seeded collections. const puppeteer = require('puppeteer'); const sleep = ms => new Promise(r => setTimeout(r, ms)); (async () => { const b = await puppeteer.launch({args: ['--no-sandbox', '--lang=hu-HU']}); const p = await b.newPage(); await p.setViewport({width: 1280, height: 800, deviceScaleFactor: 1}); await p.goto(process.env.URL + '/.web/', {waitUntil: 'networkidle0'}); await sleep(800); await p.screenshot({path: '/out/1.png'}); await p.type('input[data-name=user]', process.env.U); await p.type('input[data-name=password]', process.env.P); await p.keyboard.press('Enter'); // the login form's own submit (the first submit in the scene is InfCloud's link) await p.waitForSelector('#collectionsscene:not(.hidden)', {timeout: 15000}); await sleep(1500); await p.screenshot({path: '/out/2.png'}); await p.setViewport({width: 390, height: 844, deviceScaleFactor: 2}); // the same list at phone width await sleep(1000); await p.screenshot({path: '/out/3.png'}); await b.close(); })().catch(e => { console.error(e); process.exit(1); });