missing-billing-information.spec.tsx 1.1 KB

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