1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.test.js
Daniel cbf8a737dc
Change "Quote X of Y" to "Fetching quote X of Y" (#13663)
* Change "Quote X of Y" to "Fetching quote X of Y"

* Update a test

* Trigger Build
2022-02-17 17:08:53 +01:00

41 lines
1.0 KiB
JavaScript

import React from 'react';
import configureMockStore from 'redux-mock-store';
import {
renderWithProvider,
createSwapsMockStore,
} from '../../../../test/jest';
import LoadingSwapsQuotes from '.';
const createProps = (customProps = {}) => {
return {
loadingComplete: true,
onDone: jest.fn(),
aggregatorMetadata: {
agg1: {
color: '#283B4C',
title: 'agg1',
icon: 'data:image/png;base64,iVBORw0KGgoAAA',
},
agg2: {
color: '#283B4C',
title: 'agg2',
icon: 'data:image/png;base64,iVBORw0KGgoAAA',
},
},
...customProps,
};
};
describe('LoadingSwapsQuotes', () => {
it('renders the component with initial props', () => {
const store = configureMockStore()(createSwapsMockStore());
const { getByText } = renderWithProvider(
<LoadingSwapsQuotes {...createProps()} />,
store,
);
expect(getByText('Fetching quote 1 of 2')).toBeInTheDocument();
expect(getByText('Back')).toBeInTheDocument();
});
});