Files
anthony lio 1a37362821 chore(billing): plan selection styling (#53841)
## Problem

- plan cards on the studio upgrade screen do not match recent plan cards
updates to the pricing page
- add-on illustrations on the pricing page sometimes show the light
image in dark mode
- spend cap bars on the pricing page flash when a user toggles the spend
cap


## Solution

- changes the upgrade screen plan cards to the pricing page design +
shows enterprise as a fourth column
- moves the lifted card style to the current plan of the organization +
gives it a neutral "current plan" badge
- moves the compare plans and pricing faq links below the plan cards +
removes the stagger animation on the cards
- changes the pricing page illustrations to pick the light or dark image
with css because the server render does not know the theme
- changes the spend cap animation to resize the bars instead of
remounting them
2026-11-24 18:04:01 +08:00

16 lines
582 B
TypeScript

import { describe, expect, it } from 'vitest'
import { getLiftedSide } from './PlanCards.utils'
describe('getLiftedSide', () => {
it('marks only the direct neighbors of the lifted card', () => {
const sides = [0, 1, 2, 3].map((index) => getLiftedSide({ index, liftedIndex: 1 }))
expect(sides).toEqual(['right', undefined, 'left', undefined])
})
it('marks no card when no card is lifted', () => {
const sides = [0, 1, 2, 3].map((index) => getLiftedSide({ index, liftedIndex: -1 }))
expect(sides).toEqual([undefined, undefined, undefined, undefined])
})
})