You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
784 B
26 lines
784 B
3 years ago
|
import React from 'react';
|
||
|
import configureMockStore from 'redux-mock-store';
|
||
|
import thunk from 'redux-thunk';
|
||
|
|
||
|
import {
|
||
|
renderWithProvider,
|
||
|
createSwapsMockStore,
|
||
|
setBackgroundConnection,
|
||
|
} from '../../../../test/jest';
|
||
|
import SmartTransactionStatus from '.';
|
||
|
|
||
|
const middleware = [thunk];
|
||
|
setBackgroundConnection({
|
||
|
stopPollingForQuotes: jest.fn(),
|
||
|
setBackgroundSwapRouteState: jest.fn(),
|
||
|
});
|
||
|
|
||
|
describe('SmartTransactionStatus', () => {
|
||
|
it('renders the component with initial props', () => {
|
||
|
const store = configureMockStore(middleware)(createSwapsMockStore());
|
||
|
const { getByText } = renderWithProvider(<SmartTransactionStatus />, store);
|
||
|
expect(getByText('Optimizing gas...')).toBeInTheDocument();
|
||
|
expect(getByText('Close')).toBeInTheDocument();
|
||
|
});
|
||
|
});
|