diff options
author | Esteban MIno <efmino@uc.cl> | 2018-08-04 02:56:02 +0800 |
---|---|---|
committer | Esteban MIno <efmino@uc.cl> | 2018-08-04 02:56:02 +0800 |
commit | 21a61f2987ae83a48bb1f7256ec9c34978413eb2 (patch) | |
tree | 3bc9ef3d342f17269942cd3fe58da1f3b97ef214 /ui/app/components/send_/send-content/send-gas-row/tests/send-gas-row-component.test.js | |
parent | 0481335dda447ba4c228d146834952bac0ad641b (diff) | |
parent | fa4423bab2886017996955f809b6e3102cbf1781 (diff) | |
download | tangerine-wallet-browser-21a61f2987ae83a48bb1f7256ec9c34978413eb2.tar.gz tangerine-wallet-browser-21a61f2987ae83a48bb1f7256ec9c34978413eb2.tar.zst tangerine-wallet-browser-21a61f2987ae83a48bb1f7256ec9c34978413eb2.zip |
merge develop
Diffstat (limited to 'ui/app/components/send_/send-content/send-gas-row/tests/send-gas-row-component.test.js')
-rw-r--r-- | ui/app/components/send_/send-content/send-gas-row/tests/send-gas-row-component.test.js | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/ui/app/components/send_/send-content/send-gas-row/tests/send-gas-row-component.test.js b/ui/app/components/send_/send-content/send-gas-row/tests/send-gas-row-component.test.js deleted file mode 100644 index e4f05d708..000000000 --- a/ui/app/components/send_/send-content/send-gas-row/tests/send-gas-row-component.test.js +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react' -import assert from 'assert' -import { shallow } from 'enzyme' -import sinon from 'sinon' -import SendGasRow from '../send-gas-row.component.js' - -import SendRowWrapper from '../../send-row-wrapper/send-row-wrapper.component' -import GasFeeDisplay from '../../../../send/gas-fee-display-v2' - -const propsMethodSpies = { - showCustomizeGasModal: sinon.spy(), -} - -describe('SendGasRow Component', function () { - let wrapper - - beforeEach(() => { - wrapper = shallow(<SendGasRow - conversionRate={20} - convertedCurrency={'mockConvertedCurrency'} - gasLoadingError={false} - gasTotal={'mockGasTotal'} - showCustomizeGasModal={propsMethodSpies.showCustomizeGasModal} - />, { context: { t: str => str + '_t' } }) - }) - - afterEach(() => { - propsMethodSpies.showCustomizeGasModal.resetHistory() - }) - - describe('render', () => { - it('should render a SendRowWrapper component', () => { - assert.equal(wrapper.find(SendRowWrapper).length, 1) - }) - - it('should pass the correct props to SendRowWrapper', () => { - const { - label, - } = wrapper.find(SendRowWrapper).props() - - assert.equal(label, 'gasFee_t:') - }) - - it('should render a GasFeeDisplay as a child of the SendRowWrapper', () => { - assert(wrapper.find(SendRowWrapper).childAt(0).is(GasFeeDisplay)) - }) - - it('should render the GasFeeDisplay with the correct props', () => { - const { - conversionRate, - convertedCurrency, - gasLoadingError, - gasTotal, - onClick, - } = wrapper.find(SendRowWrapper).childAt(0).props() - assert.equal(conversionRate, 20) - assert.equal(convertedCurrency, 'mockConvertedCurrency') - assert.equal(gasLoadingError, false) - assert.equal(gasTotal, 'mockGasTotal') - assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 0) - onClick() - assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 1) - }) - }) -}) |