Repository Public
1import { chromium } from "@playwright/test"2const b = await chromium.launch()3for (const [name, w, scheme] of [["light", 700, "light"], ["dark", 700, "dark"], ["mobile", 390, "light"]]) {4 const p = await b.newPage({ viewport: { width: w, height: 900 }, colorScheme: scheme, javaScriptEnabled: false })5 await p.goto("file:///tmp/spmail-tpl/out.html")6 await p.screenshot({ path: `/tmp/spmail-tpl/${name}.png`, fullPage: true })7}8await b.close()9