import React from 'react';
import renderWithTheme from '../../../testUtils/renderWithTheme';
import StyledTable, { StyledTH, StyledTD, StyledInnerTH } from '../StyledTable';
describe('StyledTH', () => {
it('sticks header and shows divider', () => {
const { container } = renderWithTheme(
);
expect(container.firstChild).toMatchSnapshot();
});
it('does not stick header or show divider', () => {
const { container } = renderWithTheme(
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('StyledTD', () => {
it('sticks cell and shows divider', () => {
const { container } = renderWithTheme(
);
expect(container.firstChild).toMatchSnapshot();
});
it('does not stick cell or show divider', () => {
const { container } = renderWithTheme(
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('StyledInnerTH', () => {
it.each`
themeAlign
${'left'}
${'right'}
`('has $themeAlign align style', ({ themeAlign }) => {
const { container } = renderWithTheme(
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('StyledTable', () => {
it('has fixed layout style', () => {
const { container } = renderWithTheme();
expect(container.firstChild).toMatchSnapshot();
});
});