fix: R27-5 R27-6 收口本地回归基线与E2E适配
这个提交包含在:
@@ -1,5 +1,7 @@
|
||||
import { expect, test, type Locator, type Page } from "@playwright/test";
|
||||
|
||||
import { openNavLink } from "./helpers/navigation";
|
||||
|
||||
const EMPLOYEE = { identifier: "[email protected]", password: "EmployeePassword1234", name: "Employee" };
|
||||
const MANAGER = { identifier: "[email protected]", password: "ManagerPassword1234", name: "Manager" };
|
||||
const FINANCE_MGR = { identifier: "[email protected]", password: "FinanceMgrPassword1234", name: "Finance Manager" };
|
||||
@@ -45,7 +47,7 @@ test("E2E 采购主链路:员工提单→经理审批→财务归档", async (
|
||||
const title = `Playwright 采购 ${Date.now()}`;
|
||||
|
||||
await login(page, EMPLOYEE);
|
||||
await page.getByRole("link", { name: "采购申请", exact: true }).first().click();
|
||||
await (await openNavLink(page, "采购申请")).click();
|
||||
await page.getByTestId("purchase-requests-create").click();
|
||||
|
||||
await expect(page.getByTestId("purchase-title")).toBeVisible();
|
||||
@@ -74,7 +76,7 @@ test("E2E 采购主链路:员工提单→经理审批→财务归档", async (
|
||||
await logout(page, EMPLOYEE.name);
|
||||
|
||||
await login(page, MANAGER);
|
||||
await page.getByRole("link", { name: "待我处理" }).click();
|
||||
await (await openNavLink(page, "待我处理")).click();
|
||||
const managerTaskRow = page.getByTestId("workflow-task-row").filter({ hasText: currentTaskId }).first();
|
||||
await expect(managerTaskRow).toBeVisible({ timeout: 30_000 });
|
||||
await managerTaskRow.getByTestId("workflow-task-detail-link").click();
|
||||
@@ -85,7 +87,7 @@ test("E2E 采购主链路:员工提单→经理审批→财务归档", async (
|
||||
await logout(page, MANAGER.name);
|
||||
|
||||
await login(page, FINANCE_MGR);
|
||||
await page.getByRole("link", { name: "采购申请", exact: true }).first().click();
|
||||
await (await openNavLink(page, "采购申请")).click();
|
||||
await page.getByRole("button", { name: "全范围" }).click();
|
||||
await page.getByRole("combobox").first().selectOption("approved");
|
||||
const purchaseRow = page.getByRole("row").filter({ hasText: title }).first();
|
||||
|
||||
在新工单中引用
屏蔽一个用户