2022-02-18 17:48:38 +01:00
|
|
|
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);
|
2022-06-29 14:51:35 +02:00
|
|
|
expect(getByText('Publicly submitting your Swap...')).toBeInTheDocument();
|
2022-02-18 17:48:38 +01:00
|
|
|
expect(getByText('Close')).toBeInTheDocument();
|
|
|
|
});
|
|
|
|
});
|