fix: 财务本人报销由总经理独立审批(09-04-reimbursement-state-gap-finance-view)
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-09-12 20:03:29 +08:00
父节点 31ab9fbb2b
当前提交 229867f5fd
共修改 18 个文件,包含 629 行新增和 20 行删除
@@ -160,17 +160,22 @@ module.exports = async function verifyRetainedDeletion(context) {
await page.goto(target);
if (!mobile) await page.getByTestId("reimbursement-more-toggle").click();
else await page.getByTestId("mobile-reimbursement-more").click();
await page.getByRole("button", { name: "删除报销单", exact: true }).click();
const deleteAction = page.getByRole(mobile ? "button" : "menuitem", { name: "删除报销单", exact: true });
await expect(deleteAction).toHaveCount(1);
await deleteAction.click();
await expect(page.getByTestId("action-confirm-dialog")).toContainText("审批记录仍保留");
await page.getByTestId("action-confirm-cancel").click();
assert.equal((await prisma.reimbursementForm.findUnique({ where: { id: fixture.form.id } })).deleted_at, null);
await page.getByRole("button", { name: "删除报销单", exact: true }).click();
if (!mobile) await page.getByTestId("reimbursement-more-toggle").click();
await deleteAction.click();
await page.getByTestId("action-confirm-submit").click();
await expect.poll(async () => Boolean((await prisma.reimbursementForm.findUnique({ where: { id: fixture.form.id } })).deleted_at)).toBe(true);
await page.goto(target);
await expect(page.getByText("已删除", { exact: true }).first()).toBeVisible();
await expect(page.getByTestId("reimbursement-submit")).toHaveCount(0);
await expect(page.getByTestId("reimbursement-invoice-add")).toHaveCount(0);
if (!mobile && await page.getByTestId("reimbursement-more-toggle").count()) await page.getByTestId("reimbursement-more-toggle").click();
await expect(page.getByRole("menuitem", { name: "删除报销单", exact: true })).toHaveCount(0);
await expect(page.getByRole("button", { name: "删除报销单", exact: true })).toHaveCount(0);
await verify(fixture, "reject");
} finally { await browserContext.close(); }