import * as React from 'react';
import render from '../../_utils/tests/render';
import Modal from '../../Modal';
import DialogModal from '../DialogModal';
jest.mock('reakit/Portal', () => 'portal');
it('renders correctly for a default dialog modal', () => {
const { container } = render(
{modal => This is the content}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a dialog modal with a close button', () => {
const { container } = render(
{modal => (
This is the content
)}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a dialog modal with a title', () => {
const { container } = render(
{modal => (
This is the content
)}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a dialog modal with action buttons', () => {
const { container } = render(
{modal => (
This is the content
)}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a dialog modal with a footer', () => {
const { container } = render(
{modal => (
This is the content
)}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a dialog modal with kind alert', () => {
const { container } = render(
{modal => (
This is the content
)}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a dialog modal with type', () => {
const { container } = render(
{modal => (
This is the content
)}
,
{ theme: { Toast: { disabled: true } } }
);
expect(container.firstChild).toMatchSnapshot();
});