统一付款详情与批次短编号(08-01-reimbursement-notification-progress-clarity)
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-08-02 09:02:40 +08:00
父节点 171fc09524
当前提交 5d274af8d4
共修改 11 个文件,包含 467 行新增和 82 行删除
@@ -124,7 +124,7 @@ function reimbursementDetail() {
};
}
function paymentBatch(status: "draft" | "reviewed" = "reviewed") {
function paymentBatch(status: "draft" | "reviewed" = "reviewed", highRisk = false) {
return {
id: paymentBatchId,
batchNo: "PAY-ACTION-001",
@@ -135,7 +135,7 @@ function paymentBatch(status: "draft" | "reviewed" = "reviewed") {
defaultPaymentChannel: "bank",
voucherPrefix: "R7E",
totalAmount: "88.00",
highRisk: false,
highRisk,
reviewRequirement: {
thresholdAmount: "1000.00",
requiredReviewCount: 1,
@@ -186,6 +186,7 @@ async function mockSystemActionApis(
batchStatus?: "draft" | "reviewed";
hasReceipt?: boolean;
receiptQueryError?: boolean;
highRisk?: boolean;
meOverride?: Partial<typeof me>;
} = {},
) {
@@ -329,7 +330,7 @@ async function mockSystemActionApis(
}
if (path === "/api/payment-batches" && request.method() === "GET") {
await fulfillJson(route, { items: [paymentBatch(batchStatus)] });
await fulfillJson(route, { items: [paymentBatch(batchStatus, options.highRisk)] });
return;
}
@@ -391,7 +392,7 @@ async function mockSystemActionApis(
if (path === `/api/payment-batches/${paymentBatchId}/execute` && request.method() === "POST") {
calls.executePaymentBatch += 1;
await fulfillJson(route, { item: paymentBatch("reviewed") });
await fulfillJson(route, { item: paymentBatch("reviewed", options.highRisk) });
return;
}
@@ -462,6 +463,8 @@ test.describe("R7E 全站高风险操作二次确认", () => {
await page.goto(`/payment-batches?id=${paymentBatchId}`);
await expect(page.getByRole("button", { name: "上传银行回单" }).first()).toBeVisible();
await expect(page.getByRole("button", { name: "上传银行回单" })).toHaveCount(1);
await expect(page.getByTestId("payment-batch-receipt-panel").getByRole("button", { name: "上传银行回单" })).toHaveCount(0);
await expect(page.getByRole("button", { name: "登记付款完成" })).toHaveCount(0);
await page.getByTestId("payment-batch-receipt-file-input").setInputFiles({
@@ -475,6 +478,30 @@ test.describe("R7E 全站高风险操作二次确认", () => {
await expect(page.getByTestId("payment-batch-detail-panel").getByRole("button", { name: "上传银行回单" })).toHaveCount(0);
});
test("付款详情按处理顺序展示并统一人民币金额格式", async ({ page }) => {
await mockSystemActionApis(page, { hasReceipt: false, highRisk: true });
await login(page, user);
await page.goto(`/payment-batches?id=${paymentBatchId}`);
await expect(page.getByTestId("payment-batch-detail-panel")).toBeVisible();
const sectionOrder = await page.locator([
'[data-testid="payment-batch-detail-panel"]',
'[data-testid="payment-batch-current-processing"]',
'[data-testid="payment-batch-items-panel"]',
'[data-testid="payment-batch-receipt-panel"]',
].join(",")).evaluateAll((nodes) => nodes.map((node) => node.getAttribute("data-testid")));
expect(sectionOrder).toEqual([
"payment-batch-detail-panel",
"payment-batch-current-processing",
"payment-batch-items-panel",
"payment-batch-receipt-panel",
]);
await expect(page.getByTestId("payment-batch-detail-panel")).toContainText("¥88.00");
await expect(page.getByTestId("payment-batch-current-processing")).toContainText("¥1,000.00");
await expect(page.getByTestId("payment-batch-items-panel")).toContainText("¥88.00");
await expect(page.getByTestId("payment-batch-current-processing")).toContainText("线下付款并上传银行回单");
});
test("高敏附件删除要求对象、后果和理由,取消与理由不足均为零请求", async ({ page }) => {
const calls = await mockSystemActionApis(page);
await login(page, user);