import React from 'react';
import { shallow, mount } from 'enzyme';
import StoryPullQuote, { Quote, SubHead } from '.';
import 'jest-styled-components';
describe('StoryCrossHeadline component', () => {
test('renders', () => {
const wrapper = shallow(
);
expect(wrapper).toMatchSnapshot();
});
test('renders with no subhead', () => {
const wrapper = shallow(
);
expect(wrapper).toMatchSnapshot();
});
test('the Quote font size is equal to `32px` on desktop', () => {
const wrapper = mount(
);
const HeadlinedQuote = wrapper.find(Quote).first();
expect(HeadlinedQuote).toHaveStyleRule('font-size', '32px', { media: '(min-width: 48em)'});
});
test('the Quote font size is equal to `24px` on mobile', () => {
const wrapper = mount(
);
const HeadlinedQuote = wrapper.find(Quote).first();
expect(HeadlinedQuote).toHaveStyleRule('font-size', '24px');
});
test('the SubHead font size is equal to `16px`', () => {
const wrapper = mount(
);
const HeadlinedSubHead = wrapper.find(SubHead).first();
expect(HeadlinedSubHead).toHaveStyleRule('font-size', '16px');
});
});