统一付款详情与批次短编号(08-01-reimbursement-notification-progress-clarity)
这个提交包含在:
@@ -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);
|
||||
|
||||
在新工单中引用
屏蔽一个用户