From 54cd0d7d854493e329f3da8d74cedf607d760167 Mon Sep 17 00:00:00 2001 From: Peter Muriuki Date: Tue, 11 Feb 2025 19:54:34 +0300 Subject: [PATCH] Fix test regressions --- .../src/components/UserList/ListView/tests/index.test.tsx | 4 ++-- .../Credentials/tests/__snapshots__/index.test.tsx.snap | 6 ++++-- .../TableActions/tests/__snapshots__/index.test.tsx.snap | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) 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/tests/__snapshots__/index.test.tsx.snap b/packages/keycloak-user-management/src/components/Credentials/tests/__snapshots__/index.test.tsx.snap index f17299c0f..eeece9436 100644 --- a/packages/keycloak-user-management/src/components/Credentials/tests/__snapshots__/index.test.tsx.snap +++ b/packages/keycloak-user-management/src/components/Credentials/tests/__snapshots__/index.test.tsx.snap @@ -7,7 +7,7 @@ Object { pageHeaderProps={ Object { "onBack": undefined, - "title": "User Credentials | opensrp", + "title": "Reset password | opensrp", } } />, @@ -61,7 +61,9 @@ Object { } } > - + - 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 {