Skip to content

Commit

Permalink
Fix test regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Feb 11, 2025
1 parent c921aa5 commit 54cd0d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Object {
pageHeaderProps={
Object {
"onBack": undefined,
"title": "User Credentials | opensrp",
"title": "Reset password | opensrp",
}
}
/>,
Expand Down Expand Up @@ -61,7 +61,9 @@ Object {
}
}
>
<CredentialsFieldsRender />
<CredentialsFieldsRender
isReset={true}
/>
<InternalFormItem
wrapperCol={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Object {
onClick={[Function]}
type="link"
>
Credentials
Reset Password
</Button>,
},
Object {
Expand Down Expand Up @@ -98,7 +98,7 @@ Object {
onClick={[Function]}
type="link"
>
Credentials
Reset Password
</Button>,
},
Object {
Expand Down Expand Up @@ -160,7 +160,7 @@ Object {
onClick={[Function]}
type="link"
>
Credentials
Reset Password
</Button>,
},
Object {
Expand Down

0 comments on commit 54cd0d7

Please sign in to comment.