test(e2e): add paid voice insufficient credits flow

This commit is contained in:
2026-07-01 14:41:59 +08:00
parent 760e4fe343
commit 969a3b3f9f
3 changed files with 172 additions and 2 deletions
+54
View File
@@ -207,6 +207,60 @@ export const paidImageUnlockHistoryResponse = {
messageIds: [paidImageMessageId],
};
export const paidVoiceMessageId = "msg_voice_paywall_001";
export const paidVoiceAudioUrl =
"data:audio/mpeg;base64,//uQZAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCA";
export const paidVoiceHistoryResponse = {
messages: [
{
role: "assistant",
type: "voice",
content: "",
id: paidVoiceMessageId,
created_at: "2026-07-01T00:00:00.000Z",
audioUrl: paidVoiceAudioUrl,
image: {
type: null,
url: null,
},
lockDetail: {
locked: true,
showContent: true,
showUpgrade: true,
reason: "voice_message",
hint: "Unlock this voice message with credits.",
detail: null,
},
},
],
total: 1,
limit: 50,
offset: 0,
isVip: false,
privateFreeLimit: 0,
privateUsedToday: 0,
privateCanViewFree: false,
};
export const insufficientCreditsUnlockVoiceResponse = {
unlocked: false,
content: "",
reason: "insufficient_balance",
creditBalance: 3,
creditsCharged: 0,
requiredCredits: 20,
shortfallCredits: 17,
lockDetail: {
locked: true,
showContent: true,
showUpgrade: true,
reason: "voice_message",
hint: "Unlock this voice message with credits.",
detail: null,
},
};
export const paymentPlansResponse = {
plans: [
{