QAOPS9/P2D 执行收口与测试门禁稳定

这个提交包含在:
2026-05-16 01:35:34 +08:00
父节点 cce0ecc8a3
当前提交 522589493b
共修改 11 个文件,包含 46 行新增和 29 行删除
+1 -1
查看文件
@@ -48,7 +48,7 @@ test("E2E 轻交互 OCR:报销详情上传后自动添加并提交", async ({
await expect(page.getByTestId(TEST_IDS.reimbursement.invoiceDialog)).toHaveCount(0);
await reimbursementDetail.submitReimbursement();
await expect(page.getByText(/状态:(reviewing|审批中)/)).toBeVisible({ timeout: 30_000 });
await expect(page.getByText(/reviewing|审批中/).first()).toBeVisible({ timeout: 30_000 });
await logout(page, EMPLOYEE.name);
});
+4 -2
查看文件
@@ -153,7 +153,8 @@ test("E2E 请假主链路:草稿 → 提交 → 撤回 + 提交 → 审批", a
await page.goto(`/workflow/tasks/${secondSubmit.currentTaskId}`);
await workflowDetail.assertLoaded();
await workflowDetail.approve();
await expect(workflowDetail.summary).toContainText(/状态:(已处理|completed|已完成)/);
await expect(page.getByRole("main")).toContainText("已完成", { timeout: 30_000 });
await expect(page.getByRole("main")).toContainText("业务状态:已通过", { timeout: 30_000 });
await logout(page, MANAGER.name);
@@ -188,7 +189,8 @@ test("E2E 请假退回说明:审批退回后员工可看到处理意见", asyn
await page.goto(`/workflow/tasks/${submitResult.currentTaskId}`);
await workflowDetail.assertLoaded();
await workflowDetail.returnTask(returnComment);
await expect(workflowDetail.summary).toContainText(/状态:(已处理|completed|已完成)/);
await expect(page.getByRole("main")).toContainText("已完成", { timeout: 30_000 });
await expect(page.getByRole("main")).toContainText("业务状态:已终止", { timeout: 30_000 });
await logout(page, MANAGER.name);
@@ -132,7 +132,7 @@ test("E2E 移动审批:离线草稿冲突态可见", async ({ page }) => {
await expect(page.getByRole("main").getByText(/草稿同步完成:成功 0,失败 0,冲突 1/)).toBeVisible({ timeout: 30_000 });
await returnToMobileApprovalList(page);
await expect(page.getByTestId("mobile-approvals-queue")).toContainText("存在冲突", { timeout: 30_000 });
await expect(page.getByTestId("mobile-approvals-queue")).toContainText("最近错误:", { timeout: 30_000 });
await expect(page.getByTestId("mobile-approvals-queue")).toContainText("最近错误", { timeout: 30_000 });
await expect(page.getByRole("button", { name: "查看任务" })).toBeVisible();
await expect(page.getByRole("button", { name: "丢弃草稿" })).toBeVisible();
} finally {
+5 -3
查看文件
@@ -89,12 +89,14 @@ test("E2E 采购主链路:员工提单→经理审批→财务归档", async (
await (await openNavLink(page, "待我处理")).click();
await expect(page.locator(`a[href="/workflow/tasks/${currentTaskId}"]`).first()).toHaveCount(1, { timeout: 30_000 });
await page.goto(`/workflow/tasks/${currentTaskId}`);
await expect(page.getByTestId("workflow-task-summary")).toContainText("对象类型:采购申请");
await expect(page.getByTestId("workflow-task-summary")).toContainText("申请人:Employee");
await expect(page.getByTestId("workflow-task-overview")).toContainText("采购申请");
await expect(page.getByTestId("workflow-task-summary")).toContainText("申请人");
await expect(page.getByTestId("workflow-task-summary")).toContainText("Employee");
await page.getByTestId("workflow-task-approve").click();
await expect(page.getByTestId("workflow-action-confirm-dialog")).toContainText("确认后将进入下一审批节点");
await page.getByTestId("workflow-action-confirm-submit").click();
await expect(page.getByTestId("workflow-task-summary")).toContainText(/状态:(已处理|已完成|completed)/);
await expect(page.getByRole("main")).toContainText("已完成", { timeout: 30_000 });
await expect(page.getByRole("main")).toContainText("业务状态:已通过", { timeout: 30_000 });
await logout(page, MANAGER.name);
@@ -323,11 +323,10 @@ test.describe("R102 reimbursement main flow", () => {
await expect(page.getByTestId("reimbursement-row").getByText(formNumber)).toBeVisible();
await expect(page.getByText(reimbursementId)).toHaveCount(0);
page.once("dialog", async (dialog) => {
expect(dialog.message()).toContain(formNumber);
await dialog.accept();
});
await page.getByRole("button", { name: "删除" }).first().click();
await expect(page.getByTestId("action-confirm-dialog")).toContainText(formNumber);
await page.getByTestId("action-confirm-submit").click();
await expect(page.getByTestId("reimbursement-row")).toHaveCount(0);
await expect(page.getByRole("cell", { name: "暂无数据" })).toBeVisible();
});