refactor(chat): show images in page overlay
This commit is contained in:
@@ -39,12 +39,12 @@ describe("subscription exit helpers", () => {
|
||||
consumePendingChatImageReturnMock.mockResolvedValue({
|
||||
reason: "image_paywall",
|
||||
messageId: "msg_1",
|
||||
returnUrl: "/chat/image/msg_1",
|
||||
returnUrl: "/chat?image=msg_1",
|
||||
createdAt: 1,
|
||||
});
|
||||
|
||||
await expect(consumeSubscriptionExplicitExitUrl()).resolves.toBe(
|
||||
"/chat/image/msg_1",
|
||||
"/chat?image=msg_1",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -70,13 +70,13 @@ describe("subscription exit helpers", () => {
|
||||
reason: "single_message_unlock",
|
||||
messageId: "msg_1",
|
||||
kind: "image",
|
||||
returnUrl: "/chat/image/msg_1",
|
||||
returnUrl: "/chat?image=msg_1",
|
||||
stage: "payment",
|
||||
createdAt: 1,
|
||||
});
|
||||
|
||||
await expect(peekSubscriptionExplicitExitUrl()).resolves.toBe(
|
||||
"/chat/image/msg_1",
|
||||
"/chat?image=msg_1",
|
||||
);
|
||||
expect(clearPendingChatUnlockMock).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -87,13 +87,13 @@ describe("subscription exit helpers", () => {
|
||||
reason: "single_message_unlock",
|
||||
messageId: "msg_1",
|
||||
kind: "image",
|
||||
returnUrl: "/chat/image/msg_1",
|
||||
returnUrl: "/chat?image=msg_1",
|
||||
stage: "payment",
|
||||
createdAt: 1,
|
||||
});
|
||||
|
||||
await expect(consumeSubscriptionExplicitExitUrl()).resolves.toBe(
|
||||
"/chat/image/msg_1",
|
||||
"/chat?image=msg_1",
|
||||
);
|
||||
expect(clearPendingChatUnlockMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user