feat(subscription): highlight popular plans
This commit is contained in:
@@ -232,6 +232,24 @@ describe("subscription screen helpers", () => {
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("maps the backend most popular flag to VIP and coin views", () => {
|
||||
const popularVip = toVipOfferPlanViews([
|
||||
makePlan({ planId: "vip_monthly", mostPopular: true }),
|
||||
]);
|
||||
const popularCoins = toCoinsOfferPlanViews([
|
||||
makePlan({
|
||||
planId: "coin_1000",
|
||||
orderType: "coins_1000",
|
||||
vipDays: null,
|
||||
dolAmount: 1000,
|
||||
mostPopular: true,
|
||||
}),
|
||||
]);
|
||||
|
||||
expect(popularVip[0]?.mostPopular).toBe(true);
|
||||
expect(popularCoins[0]?.mostPopular).toBe(true);
|
||||
});
|
||||
|
||||
it("maps normal VIP original price outside first recharge activity", () => {
|
||||
expect(
|
||||
toVipOfferPlanViews([
|
||||
|
||||
Reference in New Issue
Block a user