Sign-in look: screenshots (before, after, an unedited 1.16.7 site, IAWL for comparison) and the capture script
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
b6c91a3a11
commit
3ceeab8469
@@ -59,6 +59,8 @@ const browser = await chromium.launch()
|
||||
async function shot(name, { colorScheme = 'light', locale = 'en-US', viewport = DESKTOP } = {}, steps) {
|
||||
const context = await browser.newContext({ baseURL: base, colorScheme, deviceScaleFactor: 1, locale, reducedMotion: 'reduce', viewport })
|
||||
if (colorScheme === 'dark') {await context.addCookies([{ name: 'payload-theme', url: base, value: 'dark' }])}
|
||||
// nothing is asked of another host while the pictures are taken
|
||||
await context.route((url) => url.origin !== new URL(base).origin, (route) => route.abort())
|
||||
const page = await context.newPage()
|
||||
try {
|
||||
await steps(page)
|
||||
|
||||
Reference in New Issue
Block a user