overleaf/services/web/test/frontend/features/subscription/helpers/render-active-subscription.tsx
Jessica Lawshe d539aaf226 Merge pull request #11681 from overleaf/jel-confirm-subscription-change
[web] Plan change request in subscription dash

GitOrigin-RevId: 9afe22b2da035f887c6fa9abe8129711d492108c
2023-02-17 09:05:51 +00:00

25 lines
861 B
TypeScript

import { ActiveSubscription } from '../../../../../frontend/js/features/subscription/components/dashboard/states/active/active'
import { Subscription } from '../../../../../types/subscription/dashboard/subscription'
import { plans } from '../fixtures/plans'
import { renderWithSubscriptionDashContext } from './render-with-subscription-dash-context'
export function renderActiveSubscription(
subscription: Subscription,
tags: { name: string; value: string | object | Array<object> }[] = []
) {
const renderOptions = {
metaTags: [
...tags,
{ name: 'ol-plans', value: plans },
{ name: 'ol-subscription', value: subscription },
{
name: 'ol-recommendedCurrency',
value: 'USD',
},
],
}
renderWithSubscriptionDashContext(
<ActiveSubscription subscription={subscription} />,
renderOptions
)
}