1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 08:09:15 +01:00
metamask-extension/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.test.js
2022-05-09 13:47:06 -04:00

44 lines
1.1 KiB
JavaScript

import * as React from 'react';
import {
renderWithProvider,
screen,
fireEvent,
} from '../../../../../test/jest';
import configureStore from '../../../../store/store';
import DetectedTokenAggregators from './detected-token-aggregators';
describe('DetectedTokenAggregators', () => {
const args = {
aggregators: [
'Aave',
'Bancor',
'CMC',
'Crypto.com',
'CoinGecko',
'1inch',
'Paraswap',
'PMM',
'Synthetix',
'Zapper',
'Zerion',
'0x',
],
};
it('should render the detected token aggregators', async () => {
const store = configureStore({});
renderWithProvider(<DetectedTokenAggregators {...args} />, store);
expect(screen.getByText('From token lists:')).toBeInTheDocument();
expect(screen.getByText('Aave, Bancor')).toBeInTheDocument();
expect(screen.getByText('+ 10 more')).toBeInTheDocument();
fireEvent.click(screen.getByText('+ 10 more'));
expect(
screen.getByText(
'Aave, Bancor, CMC, Crypto.com, CoinGecko, 1inch, Paraswap, PMM, Synthetix, Zapper, Zerion, 0x.',
),
).toBeInTheDocument();
});
});