2021-02-04 19:15:23 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { shallow } from 'enzyme';
|
2021-03-16 22:00:08 +01:00
|
|
|
import SendRowWrapper from '../send-row-wrapper/send-row-wrapper.component';
|
2021-06-23 23:35:25 +02:00
|
|
|
import { GAS_INPUT_MODES } from '../../../../ducks/send';
|
2021-03-16 22:00:08 +01:00
|
|
|
import SendGasRow from './send-gas-row.component';
|
2018-05-10 18:17:05 +02:00
|
|
|
|
2021-04-15 20:01:46 +02:00
|
|
|
describe('SendGasRow Component', () => {
|
2021-02-04 19:15:23 +01:00
|
|
|
let wrapper;
|
2018-05-10 18:17:05 +02:00
|
|
|
|
2021-04-15 20:01:46 +02:00
|
|
|
describe('render', () => {
|
|
|
|
beforeEach(() => {
|
2020-11-03 00:41:28 +01:00
|
|
|
wrapper = shallow(
|
2020-02-11 17:51:13 +01:00
|
|
|
<SendGasRow
|
|
|
|
conversionRate={20}
|
|
|
|
convertedCurrency="mockConvertedCurrency"
|
|
|
|
gasFeeError
|
2021-08-03 01:53:13 +02:00
|
|
|
gasInputMode={GAS_INPUT_MODES.INLINE}
|
2020-11-03 00:41:28 +01:00
|
|
|
/>,
|
2021-06-21 21:02:51 +02:00
|
|
|
{ context: { t: (str) => `${str}_t`, trackEvent: () => ({}) } },
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
|
|
|
wrapper.setProps({ isMainnet: true });
|
|
|
|
});
|
2018-05-10 18:17:05 +02:00
|
|
|
|
2021-04-15 20:01:46 +02:00
|
|
|
it('should render a SendRowWrapper component', () => {
|
2021-08-03 01:53:13 +02:00
|
|
|
expect(wrapper.is(SendRowWrapper)).toStrictEqual(true);
|
2021-02-04 19:15:23 +01:00
|
|
|
});
|
2018-09-20 06:16:43 +02:00
|
|
|
|
2021-08-03 01:53:13 +02:00
|
|
|
it('should render an AdvancedGasInputs as a child of the SendRowWrapper', () => {
|
|
|
|
expect(wrapper.first().childAt(0)).toBeDefined();
|
2021-02-04 19:15:23 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|