2018-08-06 22:16:36 +02:00
|
|
|
import React from 'react';
|
|
|
|
import renderer from 'react-test-renderer';
|
|
|
|
import { MemoryRouter } from 'react-router-dom';
|
2021-04-12 15:04:03 +02:00
|
|
|
import { ThemeProvider } from '@material-ui/core';
|
2018-08-06 22:16:36 +02:00
|
|
|
|
2021-03-30 15:14:02 +02:00
|
|
|
import Footer from '../Footer/Footer';
|
2022-03-28 10:49:59 +02:00
|
|
|
import theme from 'themes/mainTheme';
|
2018-08-06 22:16:36 +02:00
|
|
|
|
|
|
|
test('should render DrawerMenu', () => {
|
|
|
|
const tree = renderer.create(
|
2022-02-02 12:32:30 +01:00
|
|
|
<ThemeProvider theme={theme}>
|
|
|
|
<MemoryRouter>
|
|
|
|
<Footer />
|
|
|
|
</MemoryRouter>
|
|
|
|
</ThemeProvider>
|
2018-08-06 22:16:36 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('should render DrawerMenu with "features" selected', () => {
|
|
|
|
const tree = renderer.create(
|
2022-02-02 12:32:30 +01:00
|
|
|
<ThemeProvider theme={theme}>
|
|
|
|
<MemoryRouter initialEntries={['/features']}>
|
|
|
|
<Footer />
|
|
|
|
</MemoryRouter>
|
|
|
|
</ThemeProvider>
|
2018-08-06 22:16:36 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|