From 87abaca763a12a09fc040892c9a777fa68fc0134 Mon Sep 17 00:00:00 2001 From: Conor Macpherson Date: Fri, 31 Mar 2023 09:09:02 -0400 Subject: [PATCH] fix tests. --- .../billing/invoice_user_count.test.tsx | 16 ++++++++-------- .../enterprise_edition_left_panel.test.tsx | 2 +- .../self_hosted_purchase_modal/index.test.tsx | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/webapp/channels/src/components/admin_console/billing/invoice_user_count.test.tsx b/webapp/channels/src/components/admin_console/billing/invoice_user_count.test.tsx index b65bc918e6..cdaf54db11 100644 --- a/webapp/channels/src/components/admin_console/billing/invoice_user_count.test.tsx +++ b/webapp/channels/src/components/admin_console/billing/invoice_user_count.test.tsx @@ -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', }, ]; diff --git a/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.test.tsx b/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.test.tsx index ef6a3d387f..603aa6807b 100644 --- a/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.test.tsx +++ b/webapp/channels/src/components/admin_console/license_settings/enterprise_edition/enterprise_edition_left_panel.test.tsx @@ -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'); diff --git a/webapp/channels/src/components/self_hosted_purchase_modal/index.test.tsx b/webapp/channels/src/components/self_hosted_purchase_modal/index.test.tsx index 81437b3d7a..0101b979c4 100644 --- a/webapp/channels/src/components/self_hosted_purchase_modal/index.test.tsx +++ b/webapp/channels/src/components/self_hosted_purchase_modal/index.test.tsx @@ -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 () => {