2025-04-24 13:11:28 +08:00

22 lines
839 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { render, screen } from '@testing-library/react'
import ManagedUserCannotJoin from '../../../../../../frontend/js/features/subscription/components/group-invite/managed-user-cannot-join'
describe('ManagedUserCannotJoin', function () {
beforeEach(function () {
window.metaAttributesCache.set(
'ol-currentManagedUserAdminEmail',
'example@overleaf.com'
)
window.metaAttributesCache.set('ol-cannot-join-subscription', true)
})
it('renders the component', async function () {
render(<ManagedUserCannotJoin />)
await screen.findByText(
'Your Overleaf account is managed by your current group admin (example@overleaf.com). This means you cant join additional group subscriptions',
{ exact: false }
)
screen.getByRole('link', { name: 'Read more about Managed Users.' })
})
})