mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-05 23:44:56 +01:00
c8b697687f
* 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
31 lines
758 B
JavaScript
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();
|
|
});
|
|
});
|