mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-24 16:54:21 +01:00
23 lines
586 B
TypeScript
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,
|
|
},
|
|
},
|
|
);
|
|
}
|