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/countdown-timer/countdown-timer.test.js
Daniel c8b697687f
Swaps UI redesign for the View Quote page (#12950)
* Update EIP-1559 UI on the View Quote page (WIP)

* UI redesign for the View Quote page in Swaps, update tests,  refactoring

* Update styles for the View Quote page

* Improve scrolling and styling for the View Quote page

* Update snapshots

* Fix a scrolling issue

* Use Ethereum mainnet for swaps API calls if it's Rinkeby

* UI / content updates on the View Quote page

* Remove unused content in Swaps

* Fix an ESLint issue

* Update UTs with the latest content

* Renaming

* Remove 2 more unused content strings
2021-12-07 00:21:26 -03:30

31 lines
758 B
JavaScript

import React from 'react';
import configureMockStore from 'redux-mock-store';
import {
renderWithProvider,
createSwapsMockStore,
} from '../../../../test/jest';
import CountdownTimer from '.';
const createProps = (customProps = {}) => {
return {
timeStarted: 1,
timeOnly: true,
timerBase: 5,
warningTime: '0:30',
labelKey: 'swapNewQuoteIn',
...customProps,
};
};
describe('CountdownTimer', () => {
it('renders the component with initial props', () => {
const store = configureMockStore()(createSwapsMockStore());
const { getByTestId } = renderWithProvider(
<CountdownTimer {...createProps()} />,
store,
);
expect(getByTestId('countdown-timer__timer-container')).toBeInTheDocument();
});
});