Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Oct 29, 2024
1 parent 1070ad9 commit bd63223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
13 changes: 0 additions & 13 deletions webapp/src/modules/asset/sagas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])(
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/modules/item/sagas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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 })
Expand Down

0 comments on commit bd63223

Please sign in to comment.