1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-05 15:35:46 +01:00
metamask-extension/ui/pages/send/send-content/send-gas-row/send-gas-row.component.test.js

33 lines
992 B
JavaScript
Raw Normal View History

import React from 'react';
import { shallow } from 'enzyme';
import SendRowWrapper from '../send-row-wrapper/send-row-wrapper.component';
import { GAS_INPUT_MODES } from '../../../../ducks/send';
import SendGasRow from './send-gas-row.component';
describe('SendGasRow Component', () => {
let wrapper;
describe('render', () => {
beforeEach(() => {
2020-11-03 00:41:28 +01:00
wrapper = shallow(
<SendGasRow
conversionRate={20}
convertedCurrency="mockConvertedCurrency"
gasFeeError
gasInputMode={GAS_INPUT_MODES.INLINE}
2020-11-03 00:41:28 +01:00
/>,
{ context: { t: (str) => `${str}_t`, trackEvent: () => ({}) } },
);
wrapper.setProps({ isMainnet: true });
});
it('should render a SendRowWrapper component', () => {
expect(wrapper.is(SendRowWrapper)).toStrictEqual(true);
});
it('should render an AdvancedGasInputs as a child of the SendRowWrapper', () => {
expect(wrapper.first().childAt(0)).toBeDefined();
});
});
});