Files
claude-code-viewer/e2e/example.ts
2025-10-13 14:38:44 +09:00

23 lines
586 B
TypeScript

import { resolve } from "node:path";
import { withPlaywright } from "./utils/withPlaywright";
import { testDevices } from "./testDevices";
for (const { device, name } of testDevices) {
await withPlaywright(
async ({ context, cleanUp }) => {
const page = await context.newPage();
await page.goto("http://localhost:4000/projects");
await page.screenshot({
path: resolve("e2e", "snapshots", "projects", `_${name}.png`),
fullPage: true,
});
await cleanUp();
},
{
contextOptions: {
...device,
},
},
);
}