Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Jun 14, 2024
1 parent a189d64 commit 8840503
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/components/app/nfts-tab/nfts-tab.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const nftsDropdownState = {
const ACCOUNT_1 = '0x123';
const ACCOUNT_2 = '0x456';
const setUseNftDetectionStub = jest.fn();
const setDisplayNftMediaStub = jest.fn();

const render = ({
nftContracts = [],
Expand Down Expand Up @@ -224,6 +225,7 @@ describe('NFT Items', () => {
checkAndUpdateAllNftsOwnershipStatusStub,
updateNftDropDownState: updateNftDropDownStateStub,
setUseNftDetection: setUseNftDetectionStub,
setOpenSeaEnabled: setDisplayNftMediaStub,
});
const historyPushMock = jest.fn();

Expand Down Expand Up @@ -273,7 +275,9 @@ describe('NFT Items', () => {
});
fireEvent.click(screen.queryByText('Enable NFT Autodetection'));
expect(setUseNftDetectionStub).toHaveBeenCalledTimes(1);
expect(setDisplayNftMediaStub).toHaveBeenCalledTimes(1);
expect(setUseNftDetectionStub.mock.calls[0][0]).toStrictEqual(true);
expect(setDisplayNftMediaStub.mock.calls[0][0]).toStrictEqual(true);
});
it('should not render the NFTs Detection Notice when currently selected network is Mainnet and currently selected account has no NFTs but use NFT autodetection preference is set to true', () => {
render({
Expand Down

0 comments on commit 8840503

Please sign in to comment.