diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-11-14 00:36:52 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-12-04 11:36:22 +0800 |
commit | 7f2c5c09de67a67972fcbaae254d39aac6c96f56 (patch) | |
tree | 827332f85c8086dbdb427d6addbf10eef03a9bb6 /ui/app/components/send/tests | |
parent | fe535159bb3ec5849d670d9bc53067f5d6f330b7 (diff) | |
download | tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.tar tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.tar.gz tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.tar.bz2 tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.tar.lz tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.tar.xz tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.tar.zst tangerine-wallet-browser-7f2c5c09de67a67972fcbaae254d39aac6c96f56.zip |
Uses more reliable api on main send screen; caches basic api results in modal
Diffstat (limited to 'ui/app/components/send/tests')
-rw-r--r-- | ui/app/components/send/tests/send-component.test.js | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/ui/app/components/send/tests/send-component.test.js b/ui/app/components/send/tests/send-component.test.js index 68d2fc47e..81955cc1d 100644 --- a/ui/app/components/send/tests/send-component.test.js +++ b/ui/app/components/send/tests/send-component.test.js @@ -3,17 +3,12 @@ import assert from 'assert' import proxyquire from 'proxyquire' import { shallow } from 'enzyme' import sinon from 'sinon' +import timeout from '../../../../lib/test-timeout' import SendHeader from '../send-header/send-header.container' import SendContent from '../send-content/send-content.component' import SendFooter from '../send-footer/send-footer.container' -function timeout (time) { - return new Promise((resolve, reject) => { - setTimeout(resolve, time || 1500) - }) -} - const mockBasicGasEstimates = { blockTime: 'mockBlockTime', } @@ -88,7 +83,7 @@ describe('Send Component', function () { }) describe('componentDidMount', () => { - it('should call props.fetchBasicGasEstimates', () => { + it('should call props.fetchBasicGasAndTimeEstimates', () => { propsMethodSpies.fetchBasicGasEstimates.resetHistory() assert.equal(propsMethodSpies.fetchBasicGasEstimates.callCount, 0) wrapper.instance().componentDidMount() @@ -103,15 +98,6 @@ describe('Send Component', function () { await timeout(250) assert.equal(SendTransactionScreen.prototype.updateGas.callCount, 1) }) - - it('should call props.fetchGasEstimates with the block time returned by fetchBasicGasEstimates', async () => { - propsMethodSpies.fetchGasEstimates.resetHistory() - assert.equal(propsMethodSpies.fetchGasEstimates.callCount, 0) - wrapper.instance().componentDidMount() - await timeout(250) - assert.equal(propsMethodSpies.fetchGasEstimates.callCount, 1) - assert.equal(propsMethodSpies.fetchGasEstimates.getCall(0).args[0], 'mockBlockTime') - }) }) describe('componentWillUnmount', () => { |