aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send/send-content/send-gas-row/gas-fee-display
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-09-20 12:16:43 +0800
committerDan Miller <danjm.com@gmail.com>2018-12-04 11:36:04 +0800
commit5354325fab9b9ab3091e3c49e6b940fa713d1799 (patch)
tree2d1855aa633614a5d786629e125770981efb265c /ui/app/components/send/send-content/send-gas-row/gas-fee-display
parentb567c78bcae73e9c73b69040d22e096e4f876a2b (diff)
downloadtangerine-wallet-browser-5354325fab9b9ab3091e3c49e6b940fa713d1799.tar.gz
tangerine-wallet-browser-5354325fab9b9ab3091e3c49e6b940fa713d1799.tar.zst
tangerine-wallet-browser-5354325fab9b9ab3091e3c49e6b940fa713d1799.zip
Test updates and additions for button integration with send screen.
Diffstat (limited to 'ui/app/components/send/send-content/send-gas-row/gas-fee-display')
-rw-r--r--ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js4
-rw-r--r--ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js10
2 files changed, 10 insertions, 4 deletions
diff --git a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
index 9962f8028..40f8b1fe0 100644
--- a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
+++ b/ui/app/components/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js
@@ -11,7 +11,7 @@ export default class GasFeeDisplay extends Component {
convertedCurrency: PropTypes.string,
gasLoadingError: PropTypes.bool,
gasTotal: PropTypes.string,
- onClick: PropTypes.func,
+ showGasButtonGroup: PropTypes.func,
};
static contextTypes = {
@@ -49,7 +49,7 @@ export default class GasFeeDisplay extends Component {
className="gas-fee-reset"
onClick={showGasButtonGroup}
>
- Reset
+ { this.context.t('reset') }
</button>
</div>
)
diff --git a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js b/ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js
index 9ff01493a..c7ac175d9 100644
--- a/ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js
+++ b/ui/app/components/send/send-content/send-gas-row/gas-fee-display/test/gas-fee-display.component.test.js
@@ -17,9 +17,9 @@ describe('SendGasRow Component', function () {
wrapper = shallow(<GasFeeDisplay
conversionRate={20}
gasTotal={'mockGasTotal'}
- onClick={propsMethodSpies.showCustomizeGasModal}
primaryCurrency={'mockPrimaryCurrency'}
convertedCurrency={'mockConvertedCurrency'}
+ showGasButtonGroup={propsMethodSpies.showCustomizeGasModal}
/>, {context: {t: str => str + '_t'}})
})
@@ -41,13 +41,19 @@ describe('SendGasRow Component', function () {
assert.equal(value, 'mockGasTotal')
})
- it('should render the Button with the correct props', () => {
+ it('should render the reset button with the correct props', () => {
const {
onClick,
+ className,
} = wrapper.find('button').props()
+ assert.equal(className, 'gas-fee-reset')
assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 0)
onClick()
assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 1)
})
+
+ it('should render the reset button with the correct text', () => {
+ assert.equal(wrapper.find('button').text(), 'reset_t')
+ })
})
})