feat(chat): render role-bound payment guidance
This commit is contained in:
@@ -39,6 +39,28 @@ const lockedAlbum = {
|
||||
};
|
||||
|
||||
describe("Private Album schema models", () => {
|
||||
it("keeps shared payment guidance on an insufficient-credit response", () => {
|
||||
const response = PrivateAlbumUnlockResponseSchema.parse({
|
||||
albumId: ALBUM_ID,
|
||||
reason: "insufficient_credits",
|
||||
paymentGuidance: {
|
||||
guidanceId: "019c8f8d-17d3-7a42-b1cc-b6927b1927d5",
|
||||
characterId: "elio",
|
||||
characterName: "Elio Silvestri",
|
||||
scene: "privateZoneLocked",
|
||||
mode: "guide",
|
||||
title: "Keep talking with Elio",
|
||||
copy: "Baby, this album needs credits.",
|
||||
ctaLabel: "View VIP & credit options",
|
||||
purchaseOptions: ["vip", "topup"],
|
||||
target: "subscription",
|
||||
ruleId: "payment_guidance_privateZoneLocked",
|
||||
},
|
||||
});
|
||||
|
||||
expect(response.paymentGuidance?.characterId).toBe("elio");
|
||||
});
|
||||
|
||||
it("keeps a locked album cover URL while preserving the lock state", () => {
|
||||
const response = PrivateAlbumsResponseSchema.parse({
|
||||
items: [lockedAlbum],
|
||||
|
||||
Reference in New Issue
Block a user