import { create } from 'react-test-renderer';
import BannerOverlay from './BannerOverlay';
import DeviceTypeProvider from './contexts/DeviceTypeProvider';
import Image from './Image';
import Link from './Link';
import Text from './Text';
describe('BannerOverlay', () => {
test('renders Text only', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('renders in desktop device', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('renders in mobile device', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('renders in mobile device with reversed offset', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('renders Text + Image', () => {
const tree = create(
Saved to{' '}
Home decor
}
thumbnail={{
image: (
),
}}
title="Text and Image"
/>,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('renders Text + Image + Button', () => {
const tree = create(
Saved to{' '}
Home decor
}
thumbnail={{
image: (
),
}}
title="Text, image and button"
/>,
).toJSON();
expect(tree).toMatchSnapshot();
});
});