test(e2e): extract shared playwright helpers
This commit is contained in:
+33
-24
@@ -107,6 +107,12 @@ export function createWeeklyLimitChatSendResponse(
|
||||
audioUrl: "",
|
||||
messageId: "",
|
||||
isGuest: true,
|
||||
canSendMessage: false,
|
||||
cannotSendReason: "insufficient_credits",
|
||||
creditBalance: 0,
|
||||
creditsCharged: 0,
|
||||
requiredCredits: limit,
|
||||
shortfallCredits: Math.max(0, limit - usedMessageCount),
|
||||
timestamp: chatSendResponse.timestamp + usedMessageCount,
|
||||
image: {
|
||||
type: null,
|
||||
@@ -282,37 +288,40 @@ export const insufficientCreditsUnlockImageResponse = {
|
||||
export const paymentPlansResponse = {
|
||||
plans: [
|
||||
{
|
||||
plan_id: "vip_monthly",
|
||||
plan_name: "Monthly",
|
||||
order_type: "vip_monthly",
|
||||
amount_cents: 999,
|
||||
original_amount_cents: 1999,
|
||||
daily_price_cents: 33,
|
||||
planId: "vip_monthly",
|
||||
planName: "Monthly",
|
||||
orderType: "vip_monthly",
|
||||
amountCents: 999,
|
||||
originalAmountCents: 1999,
|
||||
dailyPriceCents: 33,
|
||||
currency: "USD",
|
||||
vip_days: 30,
|
||||
dol_amount: null,
|
||||
vipDays: 30,
|
||||
dolAmount: null,
|
||||
creditBalance: 300,
|
||||
},
|
||||
{
|
||||
plan_id: "vip_quarterly",
|
||||
plan_name: "Quarterly",
|
||||
order_type: "vip_quarterly",
|
||||
amount_cents: 2499,
|
||||
original_amount_cents: 5999,
|
||||
daily_price_cents: 28,
|
||||
planId: "vip_quarterly",
|
||||
planName: "Quarterly",
|
||||
orderType: "vip_quarterly",
|
||||
amountCents: 2499,
|
||||
originalAmountCents: 5999,
|
||||
dailyPriceCents: 28,
|
||||
currency: "USD",
|
||||
vip_days: 90,
|
||||
dol_amount: null,
|
||||
vipDays: 90,
|
||||
dolAmount: null,
|
||||
creditBalance: 1000,
|
||||
},
|
||||
{
|
||||
plan_id: "dol_voice_30",
|
||||
plan_name: "Voice Pack",
|
||||
order_type: "dol_voice",
|
||||
amount_cents: 499,
|
||||
original_amount_cents: null,
|
||||
daily_price_cents: null,
|
||||
planId: "dol_voice_30",
|
||||
planName: "Voice Pack",
|
||||
orderType: "dol_voice",
|
||||
amountCents: 499,
|
||||
originalAmountCents: null,
|
||||
dailyPriceCents: null,
|
||||
currency: "USD",
|
||||
vip_days: null,
|
||||
dol_amount: 30,
|
||||
vipDays: null,
|
||||
dolAmount: 30,
|
||||
creditBalance: 30,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user