1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 12:56:01 +01:00
metamask-extension/ui/pages/send/send-content/send-gas-row/send-gas-row.component.test.js
David Walsh e2fbc7ce8e
Remove button group for non-EIP-1559 networks (#11712)
* Remove button group for non-EIP-1559 networks

* Fix tests...maybe

* Remove unnecessary props, as well as gas display

* Remove unused string

* test progress

* fix test

* fix test

* add customizes gas block to improve e2e pass rate

Co-authored-by: Alex <adonesky@gmail.com>
2021-08-02 18:53:13 -05:00

33 lines
992 B
JavaScript

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(() => {
wrapper = shallow(
<SendGasRow
conversionRate={20}
convertedCurrency="mockConvertedCurrency"
gasFeeError
gasInputMode={GAS_INPUT_MODES.INLINE}
/>,
{ 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();
});
});
});