missing-billing-information.spec.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { SplitTestProvider } from '@/shared/context/split-test-context'
  2. import MissingBillingInformation from '@/features/group-management/components/missing-billing-information'
  3. describe('<MissingBillingInformation />', function () {
  4. beforeEach(function () {
  5. cy.window().then(win => {
  6. win.metaAttributesCache.set('ol-groupName', 'My Awesome Team')
  7. })
  8. cy.mount(
  9. <SplitTestProvider>
  10. <MissingBillingInformation />
  11. </SplitTestProvider>
  12. )
  13. })
  14. it('shows missing payment details notification', function () {
  15. cy.findByRole('alert').within(() => {
  16. cy.findByText(/missing payment details/i)
  17. cy.findByText(
  18. /it looks like your payment details are missing\. Please.*, or.*with our Support team for more help/i
  19. ).within(() => {
  20. cy.findByRole('link', {
  21. name: /update your billing information/i,
  22. }).should(
  23. 'have.attr',
  24. 'href',
  25. '/user/subscription/payment/billing-details'
  26. )
  27. cy.findByRole('link', { name: /get in touch/i }).should(
  28. 'have.attr',
  29. 'href',
  30. '/contact'
  31. )
  32. })
  33. })
  34. })
  35. })