diff --git a/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tableColumns.tsx b/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tableColumns.tsx index e02dc290f..109dd988d 100644 --- a/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tableColumns.tsx +++ b/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tableColumns.tsx @@ -82,7 +82,7 @@ export const getTableColumns = ( history.push(`${URL_USER_CREDENTIALS}/${record.id}/${record.username}`); }} > - {t('Credentials')} + {t('Reset password')} ), }, diff --git a/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tests/index.test.tsx b/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tests/index.test.tsx index f0772609f..004f86c27 100644 --- a/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tests/index.test.tsx +++ b/packages/fhir-keycloak-user-management/src/components/UserList/ListView/tests/index.test.tsx @@ -264,14 +264,14 @@ test('credentials view renders correctly', async () => { fireEvent.click(dropdown); // Clicking credentials takes you to the credentials view - const updateLink = screen.getByText(/Credentials/i); + const updateLink = screen.getByText(/Reset password/i); fireEvent.click(updateLink); expect(history.location.pathname).toEqual( `${URL_USER_CREDENTIALS}/081724e8-5fc1-47dd-8d0c-fa0c6ae6ddf0/april4petertest` ); // Confirm we are in the credentials view - expect(screen.getByText(/User Credentials/i)).toBeInTheDocument(); + expect(screen.getByText(/Reset password/i)).toBeInTheDocument(); // Clicking cancel returns us to users fireEvent.click(screen.getByRole('button', { name: 'Cancel' })); diff --git a/packages/keycloak-user-management/src/components/Credentials/index.tsx b/packages/keycloak-user-management/src/components/Credentials/index.tsx index edef4e06c..41b125b57 100644 --- a/packages/keycloak-user-management/src/components/Credentials/index.tsx +++ b/packages/keycloak-user-management/src/components/Credentials/index.tsx @@ -24,6 +24,7 @@ import { import { Dictionary } from '@onaio/utils'; import { sendSuccessNotification, sendErrorNotification } from '@opensrp/notifications'; import type { TFunction } from '@opensrp/i18n'; +import { PasswordStrengthMeter } from './passwordStrengthMeter'; reducerRegistry.register(keycloakUsersReducerName, keycloakUsersReducer); @@ -129,7 +130,8 @@ const UserCredentials: React.FC = (props: CredentialsProp }, }; const history = useHistory(); - const heading = `${t('User Credentials')} | ${username}`; + const heading = t(`Reset password | {{username}}`, { username }); + const headerProps = { pageHeaderProps: { title: heading, @@ -148,7 +150,7 @@ const UserCredentials: React.FC = (props: CredentialsProp submitForm(values, userId, serviceClass, keycloakBaseURL, t) } > - + ), }, diff --git a/packages/keycloak-user-management/src/components/UserList/TableActions/tests/__snapshots__/index.test.tsx.snap b/packages/keycloak-user-management/src/components/UserList/TableActions/tests/__snapshots__/index.test.tsx.snap index 148729ace..cd964cc09 100644 --- a/packages/keycloak-user-management/src/components/UserList/TableActions/tests/__snapshots__/index.test.tsx.snap +++ b/packages/keycloak-user-management/src/components/UserList/TableActions/tests/__snapshots__/index.test.tsx.snap @@ -19,7 +19,7 @@ Object { onClick={[Function]} type="link" > - Credentials + Reset Password , }, Object { @@ -98,7 +98,7 @@ Object { onClick={[Function]} type="link" > - Credentials + Reset Password , }, Object { @@ -160,7 +160,7 @@ Object { onClick={[Function]} type="link" > - Credentials + Reset Password , }, Object {