overleaf/services/web/test/frontend/features/subscription/components/dashboard/subscription-dashboard.test.tsx
Jessica Lawshe dad1460d71 Merge pull request #11414 from overleaf/jel-react-personal-subscription-dash-pt-2
[web] Continue migration of personal subscription dash commons to React

GitOrigin-RevId: 997716f70c953b088f686d4b0f638705ad838520
2023-01-27 09:05:30 +00:00

28 lines
971 B
TypeScript

import { expect } from 'chai'
import { render, screen } from '@testing-library/react'
import SubscriptionDashboard from '../../../../../../frontend/js/features/subscription/components/dashboard/subscription-dashboard'
import { SubscriptionDashboardProvider } from '../../../../../../frontend/js/features/subscription/context/subscription-dashboard-context'
describe('<SubscriptionDashboard />', function () {
beforeEach(function () {
window.metaAttributesCache = new Map()
})
afterEach(function () {
window.metaAttributesCache = new Map()
})
describe('Free Plan', function () {
it('does not render the "Get the most out of your" subscription text', function () {
render(
<SubscriptionDashboardProvider>
<SubscriptionDashboard />
</SubscriptionDashboardProvider>
)
const text = screen.queryByText('Get the most out of your', {
exact: false,
})
expect(text).to.be.null
})
})
})