修正 OALAUNCH1 登录与业务流回归(05-28-oalaunch1-parallel-closeout)
这个提交包含在:
@@ -136,17 +136,17 @@ test("E2E 报销支付批次主链路:提交 -> 审批 -> 创建批次 -> 复
|
||||
await page.goto("/payment-batches");
|
||||
await expect(page).toHaveURL(/\/payment-batches/);
|
||||
|
||||
const createCard = page.locator(".card-std").filter({ hasText: "新建批次" }).first();
|
||||
const createCard = page.getByTestId("payment-batch-create-panel");
|
||||
const createBatchResponsePromise = page.waitForResponse((response) => {
|
||||
const url = new URL(response.url());
|
||||
return response.request().method() === "POST" && url.pathname === "/api/payment-batches" && response.ok();
|
||||
});
|
||||
await createCard.locator("select").nth(0).selectOption("reimbursement");
|
||||
await createCard.getByPlaceholder("例如:2026Q2-财务付款批次-01").fill(batchName);
|
||||
await createCard.getByPlaceholder("用逗号或换行分隔 reimbursement / travel_order ID").fill(reimbursementId);
|
||||
await createCard.locator('input[type="date"]').fill(paymentDate);
|
||||
await createCard.locator("select").nth(1).selectOption("bank");
|
||||
await createCard.getByPlaceholder("例如 PBX").fill("R78PB");
|
||||
await createCard.getByTestId("payment-batch-create-entity-type").selectOption("reimbursement");
|
||||
await createCard.getByTestId("payment-batch-create-name").fill(batchName);
|
||||
await createCard.getByTestId("payment-batch-create-entity-ids").fill(reimbursementId);
|
||||
await createCard.getByTestId("payment-batch-create-payment-date").fill(paymentDate);
|
||||
await createCard.getByTestId("payment-batch-create-payment-channel").selectOption("bank");
|
||||
await createCard.getByTestId("payment-batch-create-voucher-prefix").fill("R78PB");
|
||||
await createCard.getByRole("button", { name: "创建批次" }).click();
|
||||
|
||||
const createBatchPayload = (await (await createBatchResponsePromise).json()) as {
|
||||
@@ -157,10 +157,10 @@ test("E2E 报销支付批次主链路:提交 -> 审批 -> 创建批次 -> 复
|
||||
throw new Error(`创建支付批次后未返回 id: ${JSON.stringify(createBatchPayload)}`);
|
||||
}
|
||||
await page.goto(`/payment-batches?id=${batchId}`);
|
||||
const batchDetailCard = page.locator(".card-std").filter({ hasText: batchName }).filter({ hasText: "复核进度:" }).last();
|
||||
const batchDetailCard = page.getByTestId("payment-batch-detail-panel").filter({ hasText: batchName });
|
||||
await expect(batchDetailCard).toBeVisible();
|
||||
await expect(batchDetailCard).toContainText("状态:草稿");
|
||||
await expect(batchDetailCard).toContainText("复核进度:0/1");
|
||||
await expect(batchDetailCard).toContainText("草稿");
|
||||
await expect(batchDetailCard).toContainText("0/1");
|
||||
|
||||
await logout(page, FINANCE.name);
|
||||
|
||||
@@ -179,12 +179,12 @@ test("E2E 报销支付批次主链路:提交 -> 审批 -> 创建批次 -> 复
|
||||
|
||||
await login(page, FINANCE);
|
||||
await page.goto(`/payment-batches?id=${batchId}`);
|
||||
const executedBatchDetailCard = page.locator(".card-std").filter({ hasText: batchName }).filter({ hasText: "复核进度:" }).last();
|
||||
const executedBatchDetailCard = page.getByTestId("payment-batch-detail-panel").filter({ hasText: batchName });
|
||||
await expect(executedBatchDetailCard).toBeVisible();
|
||||
await expect(executedBatchDetailCard).toContainText("复核进度:1/1");
|
||||
const receiptCard = page.locator(".card-std").filter({ hasText: "银行回单附件" }).first();
|
||||
await expect(executedBatchDetailCard).toContainText("1/1");
|
||||
const receiptCard = page.getByTestId("payment-batch-receipt-panel");
|
||||
await expect(receiptCard).toBeVisible();
|
||||
await receiptCard.locator('input[type="file"]').setInputFiles({
|
||||
await receiptCard.getByTestId("payment-batch-receipt-file-input").setInputFiles({
|
||||
name: "r78-bank-receipt.pdf",
|
||||
mimeType: "application/pdf",
|
||||
buffer: Buffer.from(`%PDF-1.4\npayment receipt ${marker}\n%%EOF\n`, "utf8"),
|
||||
@@ -209,7 +209,7 @@ test("E2E 报销支付批次主链路:提交 -> 审批 -> 创建批次 -> 复
|
||||
await expect(page.getByTestId("action-confirm-dialog")).toContainText("确认后将执行付款批次");
|
||||
await page.getByTestId("action-confirm-submit").click();
|
||||
await executeBatchResponsePromise;
|
||||
await expect(executedBatchDetailCard).toContainText("状态:已执行", { timeout: 30_000 });
|
||||
await expect(executedBatchDetailCard).toContainText("已执行", { timeout: 30_000 });
|
||||
|
||||
await page.goto(`/reimbursements/${reimbursementId}`);
|
||||
await reimbursementDetail.assertLoaded();
|
||||
@@ -243,7 +243,7 @@ test("E2E 报销支付批次主链路:提交 -> 审批 -> 创建批次 -> 复
|
||||
).toBe(true);
|
||||
|
||||
await page.goto("/ap-operations");
|
||||
await expect(page.getByRole("tab", { name: /财务台账/ })).toBeVisible();
|
||||
await page.getByRole("tab", { name: /财务台账/ }).click();
|
||||
await expect(page.getByTestId("finance-ledger-table")).toContainText(reimbursementDisplayCode);
|
||||
await expect(page.getByTestId("finance-ledger-table")).toContainText("已付款");
|
||||
await expect(page.getByRole("tab", { name: /待付款/ })).toBeVisible();
|
||||
|
||||
在新工单中引用
屏蔽一个用户