From bd632235314a74a8d766c2d272e9fcf4e4b9c52d Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Tue, 29 Oct 2024 17:58:03 +0100 Subject: [PATCH] test: fix tests --- webapp/src/modules/asset/sagas.spec.ts | 13 ------------- webapp/src/modules/item/sagas.spec.ts | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/webapp/src/modules/asset/sagas.spec.ts b/webapp/src/modules/asset/sagas.spec.ts index 357dfaad9a..0efe612175 100644 --- a/webapp/src/modules/asset/sagas.spec.ts +++ b/webapp/src/modules/asset/sagas.spec.ts @@ -95,19 +95,6 @@ describe('when handling the set purchase action', () => { }) }) }) - - describe('and the tx hash has not yet been setted', () => { - it('should not dispatch a push to the history with the location of the buy status page', () => { - return expectSaga(assetSaga) - .provide([[getContext('history'), { location: { pathname: locations.browse() } }]]) - - .dispatch(setPurchase({ ...mockNFTPurchase, txHash: null })) - .run({ silenceTimeout: true }) - .then(({ effects }) => { - expect(effects.put).toBeUndefined() - }) - }) - }) }) describe.each([PurchaseStatus.FAILED, PurchaseStatus.CANCELLED, PurchaseStatus.REFUNDED])( diff --git a/webapp/src/modules/item/sagas.spec.ts b/webapp/src/modules/item/sagas.spec.ts index 9287c47000..da8b13c7e0 100644 --- a/webapp/src/modules/item/sagas.spec.ts +++ b/webapp/src/modules/item/sagas.spec.ts @@ -220,7 +220,7 @@ describe('when handling the buy items with card action', () => { it('should open Transak widget', () => { return expectSaga(itemSaga, getIdentity) .provide([[call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY), null]]) - .put(openModal('BuyWithCardExplanationModal', { asset: item })) + .put(openModal('BuyWithCardExplanationModal', { asset: item, order: undefined })) .dispatch(buyItemWithCardRequest(item)) .dispatch(closeModal('BuyWithCardExplanationModal')) .run({ silenceTimeout: true }) @@ -234,7 +234,7 @@ describe('when handling the buy items with card action', () => { it('should not set the item in the local storage to show the modal again later', () => { return expectSaga(itemSaga, getIdentity) .provide([[call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY), null]]) - .put(openModal('BuyWithCardExplanationModal', { asset: item })) + .put(openModal('BuyWithCardExplanationModal', { asset: item, order: undefined })) .dispatch(buyItemWithCardRequest(item)) .dispatch(closeModal('BuyWithCardExplanationModal')) .run({ silenceTimeout: true })