diff --git a/src/Settings/BankingInformationSettings/BankingInformationSettings.test.js b/src/Settings/BankingInformationSettings/BankingInformationSettings.test.js index 448fba0f..4bacedac 100644 --- a/src/Settings/BankingInformationSettings/BankingInformationSettings.test.js +++ b/src/Settings/BankingInformationSettings/BankingInformationSettings.test.js @@ -35,9 +35,11 @@ describe('BankingInformationSettings component', () => { it('should display pane headings', () => { renderBankingInformationSettings(); - const paneTitle = screen.getAllByText('ui-organizations.settings.bankingInformation'); + const paneTitle = screen.getByText('ui-organizations.settings.bankingInformation'); + const checkboxLabel = screen.getByText('ui-organizations.settings.bankingInformation.enable'); - expect(paneTitle).toHaveLength(2); + expect(paneTitle).toBeInTheDocument(); + expect(checkboxLabel).toBeInTheDocument(); }); it('should render Loading component', () => { @@ -69,7 +71,7 @@ describe('BankingInformationSettings component', () => { renderBankingInformationSettings(); - const checkbox = screen.getByRole('checkbox', { name: 'ui-organizations.settings.bankingInformation' }); + const checkbox = screen.getByRole('checkbox', { name: 'ui-organizations.settings.bankingInformation.enable' }); const saveButton = screen.getByText('ui-organizations.settings.accountTypes.save.button'); await act(async () => { diff --git a/src/Settings/BankingInformationSettings/BankingInformationSettingsForm.test.js b/src/Settings/BankingInformationSettings/BankingInformationSettingsForm.test.js index 2bb6f653..30b76e28 100644 --- a/src/Settings/BankingInformationSettings/BankingInformationSettingsForm.test.js +++ b/src/Settings/BankingInformationSettings/BankingInformationSettingsForm.test.js @@ -27,13 +27,13 @@ describe('BankingInformationSettingsForm component', () => { it('should render component', async () => { renderBankingInformationSettingsForm(); - expect(screen.getAllByLabelText('ui-organizations.settings.bankingInformation')).toHaveLength(2); + expect(screen.getByLabelText('ui-organizations.settings.bankingInformation')).toBeInTheDocument(); }); it('should save banking options', async () => { renderBankingInformationSettingsForm(); - const checkbox = screen.getByRole('checkbox', { name: 'ui-organizations.settings.bankingInformation' }); + const checkbox = screen.getByRole('checkbox', { name: 'ui-organizations.settings.bankingInformation.enable' }); const saveButton = screen.getByText('ui-organizations.settings.accountTypes.save.button'); await act(async () => {