完成五人团队正式内用最小收口(07-18-small-team-internal-readiness)
这个提交包含在:
@@ -1,5 +1,5 @@
|
||||
import { test, expect } from "./helpers/fixtures";
|
||||
import { ADMIN, EMPLOYEE, FINANCE, FINANCE_MGR, MANAGER, createAuthenticatedApiClient, login, logout } from "./helpers/auth";
|
||||
import { ADMIN, EMPLOYEE, FINANCE, MANAGER, apiGetData, createAuthenticatedApiClient, login, logout } from "./helpers/auth";
|
||||
import { ensureFeatureFlagOn } from "./helpers/featureFlags";
|
||||
import { openNavLink } from "./helpers/navigation";
|
||||
import { TEST_IDS } from "./helpers/testIds";
|
||||
@@ -108,6 +108,8 @@ test("E2E 主链路:登录→报销→待办审批→票据OCR→支付→登
|
||||
await expect(page.getByTestId(TEST_IDS.reimbursement.pay)).toHaveCount(0);
|
||||
|
||||
const paymentDate = new Date().toISOString().slice(0, 10);
|
||||
const reimbursement = await apiGetData<{ formNumber: string | null }>(page.request, `/api/reimbursements/${reimbursementId}`);
|
||||
const reimbursementDisplayCode = reimbursement.formNumber ?? reimbursementId;
|
||||
const batchName = `E2E-报销付款批次-${Date.now()}`;
|
||||
await page.goto("/payment-batches");
|
||||
await expect(page.getByTestId("payment-batch-create-panel")).toHaveCount(0);
|
||||
@@ -118,9 +120,11 @@ test("E2E 主链路:登录→报销→待办审批→票据OCR→支付→登
|
||||
const url = new URL(response.url());
|
||||
return response.request().method() === "POST" && url.pathname === "/api/payment-batches" && response.ok();
|
||||
});
|
||||
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-candidate-search").fill(reimbursementDisplayCode);
|
||||
const candidateRow = createCard.getByTestId("payment-batch-candidate-row").filter({ hasText: reimbursementDisplayCode }).first();
|
||||
await expect(candidateRow).toBeVisible();
|
||||
await candidateRow.getByRole("checkbox").check();
|
||||
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("E2EPB");
|
||||
@@ -132,7 +136,7 @@ test("E2E 主链路:登录→报销→待办审批→票据OCR→支付→登
|
||||
}
|
||||
|
||||
await logout(page, FINANCE.name);
|
||||
await login(page, FINANCE_MGR);
|
||||
await login(page, MANAGER);
|
||||
await page.goto("/ap-operations");
|
||||
await page.getByRole("tab", { name: /待付款/ }).click();
|
||||
const pendingRow = page.locator("tr").filter({ hasText: batchName }).first();
|
||||
@@ -143,7 +147,7 @@ test("E2E 主链路:登录→报销→待办审批→票据OCR→支付→登
|
||||
await page.getByRole("button", { name: "提交复核" }).click();
|
||||
await expect(pendingRow).toContainText("复核 1/1");
|
||||
|
||||
await logout(page, FINANCE_MGR.name);
|
||||
await logout(page, MANAGER.name);
|
||||
await login(page, FINANCE);
|
||||
await page.goto(`/payment-batches?id=${batchId}`);
|
||||
const executedBatchDetailCard = page.getByTestId("payment-batch-detail-panel").filter({ hasText: batchName });
|
||||
|
||||
在新工单中引用
屏蔽一个用户