diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-08-16 15:43:13 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-08-27 22:14:16 +0800 |
commit | 65873e33e407b5af2c4134ddcbc48f4e81bdfa4f (patch) | |
tree | d6d1a09cb548baa35d65535a5d083510ed664003 /ui/app/components/send/send-content/tests | |
parent | 30e49b8545a33faf2f1d1451c9135c996a6816b0 (diff) | |
download | tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.gz tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.tar.zst tangerine-wallet-browser-65873e33e407b5af2c4134ddcbc48f4e81bdfa4f.zip |
Adds feature flag toggle for the hex data row on the send screen.
Diffstat (limited to 'ui/app/components/send/send-content/tests')
-rw-r--r-- | ui/app/components/send/send-content/tests/send-content-component.test.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/app/components/send/send-content/tests/send-content-component.test.js b/ui/app/components/send/send-content/tests/send-content-component.test.js index d5bb6693c..7c3a2cc2d 100644 --- a/ui/app/components/send/send-content/tests/send-content-component.test.js +++ b/ui/app/components/send/send-content/tests/send-content-component.test.js @@ -8,12 +8,13 @@ import SendAmountRow from '../send-amount-row/send-amount-row.container' import SendFromRow from '../send-from-row/send-from-row.container' import SendGasRow from '../send-gas-row/send-gas-row.container' import SendToRow from '../send-to-row/send-to-row.container' +import SendHexDataRow from '../send-hex-data-row/send-hex-data-row.container' describe('SendContent Component', function () { let wrapper beforeEach(() => { - wrapper = shallow(<SendContent />) + wrapper = shallow(<SendContent showHexData={true} />) }) describe('render', () => { @@ -33,6 +34,17 @@ describe('SendContent Component', function () { assert(PageContainerContentChild.childAt(1).is(SendToRow)) assert(PageContainerContentChild.childAt(2).is(SendAmountRow)) assert(PageContainerContentChild.childAt(3).is(SendGasRow)) + assert(PageContainerContentChild.childAt(4).is(SendHexDataRow)) + }) + + it('should not render the SendHexDataRow if props.showHexData is false', () => { + wrapper.setProps({ showHexData: false }) + const PageContainerContentChild = wrapper.find(PageContainerContent).children() + assert(PageContainerContentChild.childAt(0).is(SendFromRow)) + assert(PageContainerContentChild.childAt(1).is(SendToRow)) + assert(PageContainerContentChild.childAt(2).is(SendAmountRow)) + assert(PageContainerContentChild.childAt(3).is(SendGasRow)) + assert.equal(PageContainerContentChild.childAt(4).html(), null) }) }) }) |