Этот коммит содержится в:
Conor Macpherson
2023-03-31 09:09:02 -04:00
родитель 5ddec36ea5
Коммит 87abaca763
3 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@@ -51,28 +51,28 @@ describe('InvoiceUserCount', () => {
[1, InvoiceLineItemType.Full],
[1, InvoiceLineItemType.Partial],
),
expected: '1 metered users, 1 users at full rate, 1 users with partial charges',
expected: '1 metered seats, 1 seats at full rate, 1 seats with partial charges',
},
{
name: 'Supports cloud invoices with only metered line items',
invoice: makeInvoice(
[12.34, InvoiceLineItemType.Metered],
),
expected: '12.34 users',
expected: '12.34 seats',
},
{
name: 'Shows minimum decimal necessary',
invoice: makeInvoice(
[12.499, InvoiceLineItemType.Metered],
),
expected: '12.5 users',
expected: '12.5 seats',
},
{
name: 'hides insignificant decimals',
invoice: makeInvoice(
[12.002, InvoiceLineItemType.Metered],
),
expected: '12 users',
expected: '12 seats',
},
{
name: 'Supports cloud invoices with only non-metered line items',
@@ -80,7 +80,7 @@ describe('InvoiceUserCount', () => {
[1, InvoiceLineItemType.Full],
[249, InvoiceLineItemType.Partial],
),
expected: '1 users at full rate, 249 users with partial charges',
expected: '1 seat at full rate, 249 users with partial charges',
},
{
name: 'Shows default of 0 full users, 0 partial users when there are no users',
@@ -89,19 +89,19 @@ describe('InvoiceUserCount', () => {
[0, InvoiceLineItemType.Full],
[0, InvoiceLineItemType.Partial],
),
expected: '0 users at full rate, 0 users with partial charges',
expected: '0 seats at full rate, 0 seats with partial charges',
},
{
name: 'Shows default of 0 full users, 0 partial users when there are no line items in invoice',
invoice: makeInvoice(),
expected: '0 users at full rate, 0 users with partial charges',
expected: '0 seats at full rate, 0 seats with partial charges',
},
{
name: 'Shows 3 full userswhen there are on prem users',
invoice: makeInvoice(
[3, InvoiceLineItemType.OnPremise],
),
expected: '3 users',
expected: '3 seats',
},
];

Просмотреть файл

@@ -82,7 +82,7 @@ describe('components/admin_console/license_settings/enterprise_edition/enterpris
return n.children().length === 2 &&
n.childAt(0).type() === 'span' &&
!n.childAt(0).text().includes('ACTIVE') &&
n.childAt(0).text().includes('USERS');
n.childAt(0).text().includes('LICENSED SEATS');
});
expect(item.text()).toContain('1,000,000');

Просмотреть файл

@@ -275,7 +275,7 @@ describe('SelfHostedPurchaseModal', () => {
const tooFewSeats = existingUsers - 1;
fireEvent.change(screen.getByTestId('selfHostedPurchaseSeatsInput'), valueEvent(tooFewSeats.toString()));
expect(screen.getByText('Upgrade')).toBeDisabled();
screen.getByText('Your workspace currently has 10 users', {exact: false});
screen.getByText('Your workspace currently has 10 seats', {exact: false});
});
it('happy path submit shows success screen', async () => {