修复 R7E 真机反馈回流与移动入口 WF8-11A R7E-16A R7E-16B BIZ8-12A
这个提交包含在:
@@ -4,12 +4,18 @@ const {
|
||||
enqueueImNotifications,
|
||||
resolveRecipientRoleCodes,
|
||||
} = require("../../../src/services/notifications/imEnqueue");
|
||||
const { verifyToken } = require("../../../src/utils/signedUrl");
|
||||
|
||||
describe("IM enqueue", () => {
|
||||
it("builds detail url from APP_ORIGIN", () => {
|
||||
expect(buildDetailUrl({ appOrigin: "https://app.example.com", jwtSecret: "test-secret" }, "/workflow/tasks/1")).toContain(
|
||||
const detailUrl = buildDetailUrl({ appOrigin: "https://app.example.com", jwtSecret: "test-secret" }, "/workflow/tasks/1");
|
||||
expect(detailUrl).toContain(
|
||||
"https://app.example.com/api/auth/deeplink?token=",
|
||||
);
|
||||
const token = new URL(detailUrl).searchParams.get("token");
|
||||
const verified = verifyToken(token, "test-secret");
|
||||
expect(verified.ok).toBe(true);
|
||||
expect(verified.payload).toEqual({ targetPath: "/workflow/tasks/1" });
|
||||
expect(buildDetailUrl({ appOrigin: "" }, "/workflow/tasks/1")).toBeNull();
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户