R28-1 R28-4: 收口网页门禁与公网 smoke

这个提交包含在:
2026-03-23 09:59:54 +08:00
父节点 7e183c0cdc
当前提交 c17a72830c
共修改 10 个文件,包含 456 行新增和 63 行删除
+35
查看文件
@@ -0,0 +1,35 @@
import { expect, test, type Page, type TestInfo } from "@playwright/test";
import { EMPLOYEE, login } from "./helpers/auth";
async function attachScreenshot(page: Page, testInfo: TestInfo, name: string) {
await testInfo.attach(name, {
body: await page.screenshot({ fullPage: true }),
contentType: "image/png",
});
}
test.describe("visual shell", () => {
test("登录页入口布局基线", async ({ page }, testInfo) => {
await page.setViewportSize({ width: 1440, height: 1024 });
await page.goto("/login");
await expect(page.getByRole("heading", { name: "登录海音达工作台" })).toBeVisible();
await expect(page.getByText("统一入口").first()).toBeVisible();
await expect(page.getByTestId("login-password-primary-panel")).toBeVisible();
await attachScreenshot(page, testInfo, "login-shell.png");
});
test("登录后壳层布局基线", async ({ page }, testInfo) => {
await page.setViewportSize({ width: 1440, height: 1024 });
await login(page, EMPLOYEE);
await expect(page.locator("aside")).toBeVisible();
await expect(page.getByTestId("topbar-profile-trigger")).toBeVisible();
await expect(page.locator("aside").getByRole("link", { name: "Portal", exact: true })).toBeVisible();
await expect(page.locator("summary").filter({ hasText: "备用模块" })).toBeVisible();
await attachScreenshot(page, testInfo, "app-shell.png");
});
});