test(e2e): add mock chat quantity limit coverage
This commit is contained in:
@@ -89,6 +89,44 @@ export const chatSendResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
export function createChatSendResponse(sendCount: number) {
|
||||
return {
|
||||
...chatSendResponse,
|
||||
reply: `Hello from the E2E boyfriend. Reply ${sendCount}.`,
|
||||
messageId: `msg_e2e_reply_${String(sendCount).padStart(3, "0")}`,
|
||||
timestamp: chatSendResponse.timestamp + sendCount,
|
||||
};
|
||||
}
|
||||
|
||||
export function createWeeklyLimitChatSendResponse(
|
||||
usedMessageCount: number,
|
||||
limit: number,
|
||||
) {
|
||||
return {
|
||||
reply: "",
|
||||
audioUrl: "",
|
||||
messageId: "",
|
||||
isGuest: true,
|
||||
timestamp: chatSendResponse.timestamp + usedMessageCount,
|
||||
image: {
|
||||
type: null,
|
||||
url: null,
|
||||
},
|
||||
lockDetail: {
|
||||
locked: true,
|
||||
showContent: false,
|
||||
showUpgrade: true,
|
||||
reason: "weekly_limit",
|
||||
hint: "Free message limit reached.",
|
||||
detail: {
|
||||
type: "weekly_msg_limit",
|
||||
usedThisWeek: usedMessageCount,
|
||||
limit,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const paymentPlansResponse = {
|
||||
plans: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user