2021-04-27 22:16:17 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
2021-04-28 21:53:59 +02:00
|
|
|
import { renderWithProvider } from '../../../../test/jest';
|
2021-04-27 22:16:17 +02:00
|
|
|
import QuotesBackdrop from './quote-backdrop';
|
|
|
|
|
|
|
|
const createProps = (customProps = {}) => {
|
|
|
|
return {
|
|
|
|
withTopTab: false,
|
|
|
|
...customProps,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
describe('QuotesBackdrop', () => {
|
|
|
|
it('renders the component with initial props', () => {
|
|
|
|
const { container } = renderWithProvider(
|
|
|
|
<QuotesBackdrop {...createProps()} />,
|
|
|
|
);
|
|
|
|
expect(container.firstChild.nodeName).toBe('svg');
|
|
|
|
expect(document.querySelector('g')).toMatchSnapshot();
|
|
|
|
expect(document.querySelector('filter')).toMatchSnapshot();
|
|
|
|
expect(document.querySelector('linearGradient')).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|