Files
watchman/web/apps/console/scripts/ui-review-login-shots.mjs
T
unknownandCursor 9dffeae667 fix(web): 收敛控制台列表主按钮、报警可读性与焦点环
按 UI 评审闭环 UI-02~UI-07(查询降权、对象/处理人可读化、筛选分层、数据源名映射、焦点外环);概览与登录壳按约定暂缓。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 19:04:54 +08:00

23 lines
1.1 KiB
JavaScript

import { chromium } from "@playwright/test";
import path from "node:path";
import { fileURLToPath } from "node:url";
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../../../");
const outDir = path.join(root, "docs/evidence/ui-review/2026-11-19-console-full/screenshots");
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
await page.goto("http://127.0.0.1:5173/", { waitUntil: "networkidle" });
await page.waitForTimeout(600);
await page.screenshot({ path: path.join(outDir, "login-1440x900-default-01.png"), fullPage: true });
await page.setViewportSize({ width: 1280, height: 800 });
await page.screenshot({ path: path.join(outDir, "login-1280x800-default-02.png"), fullPage: true });
const theme = page.getByRole("button", { name: "切换昼夜" });
if (await theme.count()) {
await theme.click();
await page.waitForTimeout(400);
await page.screenshot({ path: path.join(outDir, "login-1280x800-dark-03.png"), fullPage: true });
}
await browser.close();
console.log("login screenshots ok");