2021-10-06 20:29:57 +02:00
|
|
|
import React from 'react';
|
|
|
|
import configureMockStore from 'redux-mock-store';
|
|
|
|
|
|
|
|
import { renderWithProvider } from '../../../../test/jest/rendering';
|
|
|
|
|
|
|
|
import AdvancedGasControls from './advanced-gas-controls.component';
|
|
|
|
|
|
|
|
const renderComponent = (props) => {
|
2021-11-11 17:46:45 +01:00
|
|
|
const store = configureMockStore([])({
|
2023-05-02 17:53:20 +02:00
|
|
|
metamask: { identities: [], providerConfig: {} },
|
2021-11-11 17:46:45 +01:00
|
|
|
});
|
2021-10-06 20:29:57 +02:00
|
|
|
return renderWithProvider(<AdvancedGasControls {...props} />, store);
|
|
|
|
};
|
|
|
|
|
|
|
|
describe('AdvancedGasControls Component', () => {
|
|
|
|
it('should render correctly', () => {
|
|
|
|
expect(() => {
|
|
|
|
renderComponent();
|
|
|
|
}).not.toThrow();
|
|
|
|
});
|
|
|
|
|
2022-12-08 19:37:06 +01:00
|
|
|
it('should render gasLimit and gasPrice inputs', () => {
|
|
|
|
const { queryByText } = renderComponent();
|
2022-08-08 21:01:38 +02:00
|
|
|
expect(queryByText('Gas limit')).toBeInTheDocument();
|
2021-10-06 20:29:57 +02:00
|
|
|
expect(queryByText('Gas price')).toBeInTheDocument();
|
|
|
|
});
|
|
|
|
});
|