Files
Verso/services/web/test/frontend/features/group-management/components/request-status.spec.tsx
T
ilkin-overleafandCopybot 8e7f1d5e89 Merge pull request #22448 from overleaf/ii-flexible-group-licensing-add-seats-tests
[web] Add seats tests

GitOrigin-RevId: 76fb5edc6eba5579fac2d3e05cd1f64fba16046c
2024-12-18 09:05:12 +00:00

46 lines
1.2 KiB
TypeScript

import '../../../helpers/bootstrap-5'
import RequestStatus from '@/features/group-management/components/request-status'
describe('<RequestStatus />', function () {
beforeEach(function () {
cy.window().then(win => {
win.metaAttributesCache.set('ol-groupName', 'My Awesome Team')
})
cy.mount(
<RequestStatus icon="email" title="Test title" content="Test content" />
)
})
it('renders the back button', function () {
cy.findByTestId('group-heading').within(() => {
cy.findByRole('button', { name: /back to subscription/i }).should(
'have.attr',
'href',
'/user/subscription'
)
})
})
it('shows the group name', function () {
cy.findByTestId('group-heading').within(() => {
cy.findByRole('heading', { name: 'My Awesome Team' })
})
})
it('shows the title', function () {
cy.findByTestId('title').should('contain.text', 'Test title')
})
it('shows the content', function () {
cy.findByText('Test content')
})
it('renders the link to subscriptions', function () {
cy.findByRole('button', { name: /go to subscriptions/i }).should(
'have.attr',
'href',
'/user/subscription'
)
})
})