subscription-dashboard.test.tsx 971 B

12345678910111213141516171819202122232425262728
  1. import { expect } from 'chai'
  2. import { render, screen } from '@testing-library/react'
  3. import SubscriptionDashboard from '../../../../../../frontend/js/features/subscription/components/dashboard/subscription-dashboard'
  4. import { SubscriptionDashboardProvider } from '../../../../../../frontend/js/features/subscription/context/subscription-dashboard-context'
  5. describe('<SubscriptionDashboard />', function () {
  6. beforeEach(function () {
  7. window.metaAttributesCache = new Map()
  8. })
  9. afterEach(function () {
  10. window.metaAttributesCache = new Map()
  11. })
  12. describe('Free Plan', function () {
  13. it('does not render the "Get the most out of your" subscription text', function () {
  14. render(
  15. <SubscriptionDashboardProvider>
  16. <SubscriptionDashboard />
  17. </SubscriptionDashboardProvider>
  18. )
  19. const text = screen.queryByText('Get the most out of your', {
  20. exact: false,
  21. })
  22. expect(text).to.be.null
  23. })
  24. })
  25. })