mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 20:54:53 -05:00
6345ec3b04
[web] Request confirmation page for flexible licensing GitOrigin-RevId: 855dcbd46c645da75b8c641f0c49670b2e04df3f
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import '../../../helpers/bootstrap-5'
|
||
import RequestConfirmation from '@/features/group-management/components/request-confirmation'
|
||
|
||
describe('request confirmation page', function () {
|
||
beforeEach(function () {
|
||
cy.window().then(win => {
|
||
win.metaAttributesCache.set('ol-groupName', 'My Awesome Team')
|
||
})
|
||
cy.mount(<RequestConfirmation />)
|
||
})
|
||
|
||
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('indicates the message was received', function () {
|
||
cy.findByRole('heading', { name: /we’ve got your request/i })
|
||
cy.findByText(/our team will get back to you shortly/i)
|
||
})
|
||
|
||
it('renders the link to subscriptions', function () {
|
||
cy.findByRole('button', { name: /go to subscriptions/i }).should(
|
||
'have.attr',
|
||
'href',
|
||
'/user/subscription'
|
||
)
|
||
})
|
||
})
|