import { create } from 'react-test-renderer';
import BannerUpsell from './BannerUpsell';
import Icon from './Icon';
import TextField from './TextField';
describe('', () => {
test('Basic BannerUpsell', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title + primaryAction with href', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title + primaryAction without href', () => {
const tree = create(
{},
}}
title="A Title"
/>,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title + primaryAction + secondaryAction', () => {
const tree = create(
,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title + primaryAction + dismissButton', () => {
const tree = create(
{},
}}
message="Insert a clever upsell message here"
primaryAction={{
href: 'pinterest.com',
label: 'Visit Pinterest',
accessibilityLabel: '',
role: 'link',
}}
title="A Title"
/>,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title + primaryAction + dismissButton + image', () => {
const tree = create(
{},
}}
imageData={{
component: ,
}}
message="Insert a clever upsell message here"
primaryAction={{
href: 'pinterest.com',
label: 'Visit Pinterest',
accessibilityLabel: '',
role: 'link',
}}
title="A Title"
/>,
).toJSON();
expect(tree).toMatchSnapshot();
});
test('message + title + dismissButton + image + form', () => {
const tree = create(
{},
}}
imageData={{
component: ,
}}
message="Insert a clever upsell message here"
title="A Title"
>
{}}
submitButtonAccessibilityLabel="Submit button"
submitButtonText="Submit"
>
{}} placeholder="Name" />
,
).toJSON();
expect(tree).toMatchSnapshot();
});
});