feat(billing): page tarifaire /plan + uniformisation CTA "Voir les plans" (Sprint 5b)
- features/billing/{api,components/PlanCard,pages/PricingPage} + 5 tests
- 3 colonnes Free/Standard/Premium avec gating dynamique selon usePlan()
- POST /stripe/checkout avec redirect full-page Stripe Checkout
- env: VITE_STRIPE_PRICE_STANDARD/_PREMIUM (optionnels)
- router: /plan → PricingPage (sous PrivateLayout)
- CTA renommés "Voir les plans" : SimulationsList, RapportPage, TaskSelector,
DashboardFreeView, PaywallBanner — au lieu de CTA orientés un seul plan
- Tests: 198 → 203 verts (+5)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
04019f8348
commit
9edfbb3c95
13 changed files with 551 additions and 8 deletions
|
|
@ -43,7 +43,7 @@ function BlurredPreview({ onUpgrade }: { onUpgrade: () => void }) {
|
|||
<Lock className="size-5 text-ink-secondary" aria-hidden="true" />
|
||||
<p className="text-sm font-medium text-ink-primary">Historique disponible en Standard</p>
|
||||
<Button variant="upgrade" size="sm" onClick={onUpgrade}>
|
||||
Passer en Standard
|
||||
Voir les plans
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ describe('SimulationsList — gating Free', () => {
|
|||
expect(screen.queryByText(/EE · Tâche 1/i)).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('clic sur "Passer en Standard" appelle onUpgrade', async () => {
|
||||
it('clic sur "Voir les plans" appelle onUpgrade', async () => {
|
||||
const user = userEvent.setup()
|
||||
const onUpgrade = vi.fn()
|
||||
renderWithRouter(
|
||||
|
|
@ -79,7 +79,7 @@ describe('SimulationsList — gating Free', () => {
|
|||
onUpgrade={onUpgrade}
|
||||
/>,
|
||||
)
|
||||
await user.click(screen.getByRole('button', { name: /passer en standard/i }))
|
||||
await user.click(screen.getByRole('button', { name: /voir les plans/i }))
|
||||
expect(onUpgrade).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue