PC6 完善 PC 工作台与审批信息架构
这个提交包含在:
@@ -1,7 +1,7 @@
|
||||
const workflowRoutes = require("../../../src/routes/workflow");
|
||||
|
||||
describe("Workflow Route Permissions", () => {
|
||||
const { listAllowedActionsForTask } = workflowRoutes.__testables;
|
||||
const { listAllowedActionsForTask, parseTaskListQuery } = workflowRoutes.__testables;
|
||||
|
||||
it("allows leave approvers to act on leave tasks", () => {
|
||||
const actions = listAllowedActionsForTask(
|
||||
@@ -107,4 +107,17 @@ describe("Workflow Route Permissions", () => {
|
||||
|
||||
expect(actions).toEqual([]);
|
||||
});
|
||||
|
||||
it("parses optional workflow entityType filter for PC approval center", () => {
|
||||
expect(parseTaskListQuery({ status: "pending", entityType: "purchase_request", page: "2" })).toMatchObject({
|
||||
status: "pending",
|
||||
entityType: "purchase_request",
|
||||
page: 2,
|
||||
pageSize: 20,
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects unsupported workflow entityType filters", () => {
|
||||
expect(() => parseTaskListQuery({ entityType: "invoice_pool" })).toThrow("参数校验失败");
|
||||
});
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户