diff --git a/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/new-user.test.tsx b/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/new-user.test.tsx index 7f3826bad..c39caa847 100644 --- a/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/new-user.test.tsx +++ b/packages/fhir-keycloak-user-management/src/components/CreateEditUser/tests/new-user.test.tsx @@ -6,7 +6,7 @@ import { CreateEditUser, practitionerUpdater, getPractitioner, getPractitionerRo import { Provider } from 'react-redux'; import { store } from '@opensrp/store'; import nock from 'nock'; -import { cleanup, fireEvent, render } from '@testing-library/react'; +import { screen, cleanup, fireEvent, render } from '@testing-library/react'; import { waitFor } from '@testing-library/dom'; import { authenticateUser } from '@onaio/session-reducer'; import fetch from 'jest-fetch-mock'; @@ -247,6 +247,13 @@ test('renders correctly for new user', async () => { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion userEvent.type(usernameInput!, 'flopo'); + //set password + const passwordInput = screen.getByLabelText('Password'); + userEvent.type(passwordInput, 'passwoord!!'); + // confirm set password + const confirmPasswordInput = screen.getByLabelText('Confirm Password'); + userEvent.type(confirmPasswordInput, 'passwoord!!'); + const submitButton = document.querySelector('button[type="submit"]'); // find antd Select with id 'fhirCoreAppId' in the 'Form' component