aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-10-26 13:50:36 +0800
committerDan Miller <danjm.com@gmail.com>2018-12-04 11:36:22 +0800
commite3f015c88f30fb4243ebbb3d2f109be8f3d68196 (patch)
tree62f96055f085624acf1a5fe91365f207daee2f0a /ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
parent9b9a2cc2e00618167d5fac8103e928fc16153b2d (diff)
downloadtangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar
tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.gz
tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.bz2
tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.lz
tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.xz
tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.tar.zst
tangerine-wallet-browser-e3f015c88f30fb4243ebbb3d2f109be8f3d68196.zip
Adds speed up slide-in gas customization sidebar
Diffstat (limited to 'ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js')
-rw-r--r--ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
index d4549f4cd..0c25874bb 100644
--- a/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
+++ b/ui/app/components/gas-customization/gas-modal-page-container/advanced-tab-content/tests/advanced-tab-content-component.test.js
@@ -27,6 +27,7 @@ describe('AdvancedTabContent Component', function () {
customGasLimit={23456}
timeRemaining={21500}
totalFee={'$0.25'}
+ insufficientBalance={false}
/>, { context: { t: (str1, str2) => str2 ? str1 + str2 : str1 } })
})
@@ -63,11 +64,13 @@ describe('AdvancedTabContent Component', function () {
assert.equal(AdvancedTabContent.prototype.renderGasEditRows.callCount, 1)
const renderDataSummaryArgs = AdvancedTabContent.prototype.renderDataSummary.getCall(0).args
assert.deepEqual(renderDataSummaryArgs, ['$0.25', 21500])
+ })
+ it('should call renderGasEditRows with the expected params', () => {
assert.equal(AdvancedTabContent.prototype.renderGasEditRows.callCount, 1)
const renderGasEditRowArgs = AdvancedTabContent.prototype.renderGasEditRows.getCall(0).args
assert.deepEqual(renderGasEditRowArgs, [
- 11, propsMethodSpies.updateCustomGasPrice, 23456, propsMethodSpies.updateCustomGasLimit,
+ 11, propsMethodSpies.updateCustomGasPrice, 23456, propsMethodSpies.updateCustomGasLimit, false,
])
})
})
@@ -142,7 +145,8 @@ describe('AdvancedTabContent Component', function () {
'mockGasPrice',
() => 'mockUpdateCustomGasPriceReturn',
'mockGasLimit',
- () => 'mockUpdateCustomGasLimitReturn'
+ () => 'mockUpdateCustomGasLimitReturn',
+ false
))
})
@@ -161,10 +165,10 @@ describe('AdvancedTabContent Component', function () {
const renderGasEditRowSpyArgs = AdvancedTabContent.prototype.renderGasEditRow.args
assert.equal(renderGasEditRowSpyArgs.length, 2)
assert.deepEqual(renderGasEditRowSpyArgs[0].map(String), [
- 'gasPrice', 'mockGasPrice', () => 'mockUpdateCustomGasPriceReturn', 'mockGasPrice', 9, true,
+ 'gasPrice', 'mockGasPrice', () => 'mockUpdateCustomGasPriceReturn', 'mockGasPrice', false, 9, true,
].map(String))
assert.deepEqual(renderGasEditRowSpyArgs[1].map(String), [
- 'gasLimit', 'mockGasLimit', () => 'mockUpdateCustomGasLimitReturn', 'mockGasLimit', 0,
+ 'gasLimit', 'mockGasLimit', () => 'mockUpdateCustomGasLimitReturn', 'mockGasLimit', false, 0,
].map(String))
})
})
@@ -195,8 +199,8 @@ describe('AdvancedTabContent Component', function () {
321,
value => value + 7,
0,
- 8,
- false
+ false,
+ 8
))
})
@@ -204,7 +208,7 @@ describe('AdvancedTabContent Component', function () {
assert(gasInput.hasClass('advanced-tab__gas-edit-row__input-wrapper'))
})
- it('should render an input, but not a GWEI symbol', () => {
+ it('should render two children, including an input', () => {
assert.equal(gasInput.children().length, 2)
assert(gasInput.children().at(0).hasClass('advanced-tab__gas-edit-row__input'))
})