mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
fix: updating tests for Managing seats
This commit is contained in:
parent
c7e57b2c40
commit
c3f2ca2808
@ -109,8 +109,8 @@ describe('useLicenseLimitNotification', () => {
|
||||
"Add seats to invite Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app.",
|
||||
title: 'Over seat limit (6/5)',
|
||||
link: {
|
||||
url: 'https://https://strapi.io/billing/manage-seats',
|
||||
label: 'MANAGE SEATS',
|
||||
url: 'https://strapi.io/billing/manage-seats',
|
||||
label: 'Manage seats',
|
||||
},
|
||||
blockTransition: true,
|
||||
onClose: expect.any(Function),
|
||||
@ -135,8 +135,8 @@ describe('useLicenseLimitNotification', () => {
|
||||
"Add seats to invite Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app.",
|
||||
title: 'Over seat limit (5/5)',
|
||||
link: {
|
||||
url: 'https://cloud.strapi.io/profile/billing',
|
||||
label: 'ADD SEATS',
|
||||
url: 'https://strapi.io/billing/manage-seats',
|
||||
label: 'Manage seats',
|
||||
},
|
||||
blockTransition: true,
|
||||
onClose: expect.any(Function),
|
||||
|
@ -74,23 +74,25 @@ describe('<AdminSeatInfo />', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('Render billing link (on strapi cloud)', async () => {
|
||||
test('Render billing link (gold license)', () => {
|
||||
// @ts-expect-error – mocked
|
||||
useLicenseLimits.mockReturnValue({
|
||||
...LICENSE_MOCK,
|
||||
license: {
|
||||
...LICENSE_MOCK.license,
|
||||
isHostedOnStrapiCloud: true,
|
||||
type: 'gold',
|
||||
},
|
||||
});
|
||||
|
||||
const { findByText, getByText } = render(<AdminSeatInfoEE />);
|
||||
const { getByText } = render(<AdminSeatInfoEE />);
|
||||
|
||||
await findByText('Add seats');
|
||||
// eslint-disable-next-line testing-library/no-node-access
|
||||
expect(getByText('Add seats').closest('a')).toHaveAttribute(
|
||||
expect(getByText('Contact sales')).toBeInTheDocument();
|
||||
expect(
|
||||
// eslint-disable-next-line testing-library/no-node-access
|
||||
getByText('Contact sales').closest('a')
|
||||
).toHaveAttribute(
|
||||
'href',
|
||||
'https://cloud.strapi.io/profile/billing'
|
||||
'https://strapi.io/billing/request-seats'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user