Skip to content

Commit

Permalink
fix editUserPP failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
manvendra-s-rathore committed Apr 24, 2024
2 parents 492a6c8 + af37d83 commit 5093ebb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Fix incorrect translation key having count-disagreements in Pay fees/fines modal in Fees/Fines Page. Refs UIU-1097.
* Trim input values and delete properties with empty string when user record save. Refs UIU-2049.
* Update username field validation to trim leading and trailing spaces. Refs UIU-3099.
* Fix "Total paid amount" value that set as "$NaN" on "Refund fee/fine" modal. Refs UIU-3094.
* Handle invalid image URLs when uploading profile photo via External URL. Refs UIU-3080.

## [10.1.0](https://github.com/folio-org/ui-users/tree/v10.1.0) (2024-03-20)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Accounts/Actions/ActionModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class ActionModal extends React.Component {
:
</Col>
<Col xs={4}>
{localizeCurrencyAmount(totalPaidAmount, stripes.currency, intl)}
{totalPaidAmount}
</Col>
</Row>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jest.mock('react-image', () => ({
Img: jest.fn(() => null),
}));

jest.mock('../../../../util', () => ({
isAValidImageUrl: jest.fn(() => true),
isAValidURL: jest.fn(() => true),
}));

const defaultProps = {
profilePictureMaxFileSize: 3,
profilePictureId: 'https://folio.org/wp-content/uploads/2023/08/folio-site-general-Illustration-social-image-1200.jpg',
Expand Down Expand Up @@ -157,7 +162,7 @@ describe('Edit User Profile Picture', () => {
await userEvent.click(saveButton);
expect(Img).toHaveBeenCalled();
const renderedProfileImg = Img.mock.lastCall[0];
expect(expect(renderedProfileImg.src).toContain('https://upload.wikimedia.org/wikipedia/commons/e/e2/FOLIO_400x400.jpg'));
expect(renderedProfileImg.src).toContain('https://upload.wikimedia.org/wikipedia/commons/e/e2/FOLIO_400x400.jpg');
});

it('should invoke local file upload handlers with compression', async () => {
Expand Down

0 comments on commit 5093ebb

Please sign in to comment.