refactor(workbench): simplify appointment tasks
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { mockHierarchicalWorkOrder } from "./support/mock-hierarchical-work-order";
|
||||
import { mockFlatWorkOrder } from "./support/mock-hierarchical-work-order";
|
||||
|
||||
test.describe("mobile workbench sheet", () => {
|
||||
test.use({ viewport: { width: 390, height: 844 } });
|
||||
@@ -138,12 +138,13 @@ test.describe("mobile workbench sheet", () => {
|
||||
});
|
||||
|
||||
test("keeps the waiting-for-reply state readable in the narrow sheet", async ({ page }) => {
|
||||
await mockHierarchicalWorkOrder(page, "reply");
|
||||
await mockFlatWorkOrder(page, "reply");
|
||||
await page.goto("/", { waitUntil: "domcontentloaded" });
|
||||
await page.getByRole("button", { name: "打开工况任务" }).click();
|
||||
const sheet = page.getByRole("region", { name: "工况任务抽屉" });
|
||||
await sheet.getByRole("button", { name: "展开工况任务" }).click();
|
||||
await sheet.getByRole("button", { name: /预约任务/ }).click();
|
||||
await expect(sheet.getByText("最近工况", { exact: true })).toHaveCount(1);
|
||||
await sheet.getByRole("button", { name: "收起工况任务" }).click();
|
||||
const awaitingReplyWorkOrder = sheet
|
||||
.locator('button[aria-pressed]')
|
||||
@@ -152,8 +153,8 @@ test.describe("mobile workbench sheet", () => {
|
||||
|
||||
await expect(awaitingReplyWorkOrder.getByText("待复令", { exact: true })).toBeVisible();
|
||||
await awaitingReplyWorkOrder.click();
|
||||
await expect(sheet.getByText("2/3 完成", { exact: true })).toBeVisible();
|
||||
await expect(sheet.getByText("确认模型边界已同步更新 · 待复令", { exact: true })).toBeVisible();
|
||||
await expect(sheet.getByText("确认模型边界已同步更新", { exact: true })).toBeVisible();
|
||||
await expect(sheet.getByText("活动记录", { exact: true })).toBeVisible();
|
||||
});
|
||||
|
||||
test("clears mobile sheet state when crossing into the desktop layout", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user