同步前端重构后的视觉测试基线(05-28-frontend-ux-redesign)
这个提交包含在:
@@ -3,7 +3,7 @@ import { expect, type Locator, type Page } from "@playwright/test";
|
||||
import { TEST_IDS } from "./testIds";
|
||||
|
||||
export async function openBackupModulesIfNeeded(page: Page) {
|
||||
const summary = page.locator("summary").filter({ hasText: "备用模块" }).first();
|
||||
const summary = page.locator("summary").filter({ hasText: "更多" }).first();
|
||||
if (await summary.count()) {
|
||||
const details = summary.locator("xpath=ancestor::details[1]");
|
||||
const isOpen = await details.evaluate((node) => (node as HTMLDetailsElement).open);
|
||||
|
||||
@@ -36,7 +36,7 @@ export class AppShell {
|
||||
}
|
||||
|
||||
async assertBackupModulesCollapsed() {
|
||||
const summary = this.page.locator("summary").filter({ hasText: "备用模块" }).first();
|
||||
const summary = this.page.locator("summary").filter({ hasText: "更多" }).first();
|
||||
if (await summary.count()) {
|
||||
const details = summary.locator("xpath=ancestor::details[1]");
|
||||
await expect(details).not.toHaveAttribute("open", "");
|
||||
|
||||
@@ -39,12 +39,12 @@ export async function assertMainNavVisible(page: Page) {
|
||||
}
|
||||
|
||||
export async function assertBackupModulesCollapsed(page: Page) {
|
||||
const summary = page.locator("summary").filter({ hasText: "备用模块" }).first();
|
||||
const summary = page.locator("summary").filter({ hasText: "更多" }).first();
|
||||
await expect(summary).toBeVisible();
|
||||
const details = summary.locator("xpath=ancestor::details[1]");
|
||||
const isOpen = await details.evaluate((node) => (node as HTMLDetailsElement).open);
|
||||
expect(isOpen).toBe(false);
|
||||
await expect(page.getByRole("link", { name: "采购申请" })).not.toBeVisible();
|
||||
await expect(page.getByRole("link", { name: "差旅申请" })).not.toBeVisible();
|
||||
}
|
||||
|
||||
export async function assertWecomBindingCardVisible(page: Page) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户