1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
This commit is contained in:
trejgun 2018-06-21 15:03:19 +08:00
parent c27dfb01bb
commit 778aec8c75
2 changed files with 13 additions and 3 deletions

View File

@ -4,6 +4,16 @@ import CurrencyDisplay from '../../../../send/currency-display'
export default class GasFeeDisplay extends Component {
static propTypes = {
conversionRate: PropTypes.number,
primaryCurrency: PropTypes.string,
convertedCurrency: PropTypes.string,
gasLoadingError: PropTypes.bool,
gasTotal: PropTypes.string,
onClick: PropTypes.func,
};
render() {
const {
conversionRate,

View File

@ -3,7 +3,7 @@ import assert from 'assert'
import {shallow} from 'enzyme'
import GasFeeDisplay from '../gas-fee-display.component'
import CurrencyDisplay from '../../../../../send/currency-display'
import sinon from "sinon";
import sinon from 'sinon'
const propsMethodSpies = {
@ -36,7 +36,7 @@ describe.only('SendGasRow Component', function() {
const {
conversionRate,
convertedCurrency,
value
value,
} = wrapper.find(CurrencyDisplay).props()
assert.equal(conversionRate, 20)
assert.equal(convertedCurrency, 'mockConvertedCurrency')
@ -46,7 +46,7 @@ describe.only('SendGasRow Component', function() {
it('should render the Button with the correct props', () => {
const {
onClick,
} = wrapper.find("button").props()
} = wrapper.find('button').props()
assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 0)
onClick()
assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 1)