test(e2e): add mock chat quantity limit coverage

This commit is contained in:
2026-06-29 19:54:30 +08:00
parent 4cc01bb9f4
commit 9535c29c1d
3 changed files with 189 additions and 2 deletions
+38
View File
@@ -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: [
{