fix(subscription): preserve vip original price

This commit is contained in:
2026-07-07 15:08:47 +08:00
parent 2aaf60a497
commit 0258d8819c
3 changed files with 69 additions and 2 deletions
@@ -190,6 +190,26 @@ describe("subscription screen helpers", () => {
).toBeNull();
});
it("maps normal VIP original price outside first recharge activity", () => {
expect(
toVipOfferPlanViews([
makePlan({
planId: "vip_monthly",
amountCents: 1990,
originalAmountCents: 2499,
isFirstRechargeOffer: false,
}),
]),
).toMatchObject([
{
id: "vip_monthly",
price: "19.9",
originalPrice: "24.99",
isFirstRechargeOffer: false,
},
]);
});
it("selects the first VIP plan by default when VIP can be purchased", () => {
expect(
getDefaultSubscriptionPlanId({