feat(P25-1/P25-5/P26-1/P26-3/P24-1/P29-4): 落地内部OA够用版后端与试运行能力
关联 Issue: P25-1, P25-2, P25-3, P25-4, P25-5, P26-1, P26-3, P24-1, P24-2, P29-1, P29-2, P29-3, P29-4
这个提交包含在:
@@ -7,8 +7,8 @@ const {
|
||||
|
||||
describe("IM enqueue", () => {
|
||||
it("builds detail url from APP_ORIGIN", () => {
|
||||
expect(buildDetailUrl({ appOrigin: "https://app.example.com" }, "/workflow/tasks/1")).toBe(
|
||||
"https://app.example.com/workflow/tasks/1",
|
||||
expect(buildDetailUrl({ appOrigin: "https://app.example.com", jwtSecret: "test-secret" }, "/workflow/tasks/1")).toContain(
|
||||
"https://app.example.com/api/auth/deeplink?token=",
|
||||
);
|
||||
expect(buildDetailUrl({ appOrigin: "" }, "/workflow/tasks/1")).toBeNull();
|
||||
});
|
||||
@@ -93,6 +93,7 @@ describe("IM enqueue", () => {
|
||||
imNotifierEnabled: true,
|
||||
integrationOutboxMaxAttempts: 5,
|
||||
appOrigin: "https://app.example.com",
|
||||
jwtSecret: "test-secret",
|
||||
},
|
||||
logger: { warn: vi.fn() },
|
||||
recipientEmployeeIds: ["employee-1"],
|
||||
@@ -111,8 +112,8 @@ describe("IM enqueue", () => {
|
||||
expect(result.duplicated).toBe(1);
|
||||
expect(result.matchedChannels).toEqual(["channel-1", "channel-2"]);
|
||||
expect(tx.integrationOutbox.create).toHaveBeenCalledTimes(1);
|
||||
expect(tx.integrationOutbox.create.mock.calls[0][0].data.payload.detailUrl).toBe(
|
||||
"https://app.example.com/workflow/tasks/task-1",
|
||||
expect(tx.integrationOutbox.create.mock.calls[0][0].data.payload.detailUrl).toEqual(
|
||||
expect.stringContaining("https://app.example.com/api/auth/deeplink?token="),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -150,6 +151,7 @@ describe("IM enqueue", () => {
|
||||
imNotifierEnabled: true,
|
||||
integrationOutboxMaxAttempts: 5,
|
||||
appOrigin: "https://app.example.com",
|
||||
jwtSecret: "test-secret",
|
||||
},
|
||||
logger: { warn: vi.fn() },
|
||||
recipientEmployeeIds: ["employee-1"],
|
||||
|
||||
在新工单中引用
屏蔽一个用户