2021-02-04 19:15:23 +01:00
|
|
|
import React from 'react';
|
2022-09-28 16:43:13 +02:00
|
|
|
import configureMockStore from 'redux-mock-store';
|
|
|
|
import { renderWithProvider } from '../../../../../../test/lib/render-helpers';
|
2021-03-16 22:00:08 +01:00
|
|
|
import CancelTransactionGasFee from './cancel-transaction-gas-fee.component';
|
2018-09-19 23:30:52 +02:00
|
|
|
|
2021-04-15 20:01:46 +02:00
|
|
|
describe('CancelTransactionGasFee Component', () => {
|
2022-09-28 16:43:13 +02:00
|
|
|
const mockState = {
|
|
|
|
metamask: {
|
|
|
|
provider: {
|
|
|
|
chainId: '0x4',
|
|
|
|
},
|
|
|
|
preferences: {
|
|
|
|
useNativeCurrencyAsPrimaryCurrency: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-09-19 23:30:52 +02:00
|
|
|
|
2022-09-28 16:43:13 +02:00
|
|
|
const mockStore = configureMockStore()(mockState);
|
2018-09-19 23:30:52 +02:00
|
|
|
|
2022-09-28 16:43:13 +02:00
|
|
|
it('should render', () => {
|
|
|
|
const props = {
|
|
|
|
value: '0x3b9aca00',
|
|
|
|
};
|
2018-09-19 23:30:52 +02:00
|
|
|
|
2022-09-28 16:43:13 +02:00
|
|
|
const { container } = renderWithProvider(
|
|
|
|
<CancelTransactionGasFee {...props} />,
|
|
|
|
mockStore,
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2022-09-28 16:43:13 +02:00
|
|
|
|
|
|
|
expect(container).toMatchSnapshot();
|
2021-02-04 19:15:23 +01:00
|
|
|
});
|
|
|
|
});
|