import * as React from 'react';
import render from '../../_utils/tests/render';
import Table from '../Table';
it('renders correctly for a basic table', () => {
const { container } = render(
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a table with a footer', () => {
const { container } = render(
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
Total
$36.00
);
expect(container.firstChild).toMatchSnapshot();
});
describe('borders', () => {
it('renders correctly when an outer border is set', () => {
const { container } = render(
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly when row borders are set', () => {
const { container } = render(
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});
});
it('renders correctly for a striped table', () => {
const { container } = render(
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a hoverable table', () => {
const { container } = render(
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a table with a top caption', () => {
const { container } = render(
Fannypacks
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});
it('renders correctly for a table with a bottom caption', () => {
const { container } = render(
Fannypacks
Name
Quantity
Price
Nike
3
$9.00
Adidas
4
$12.00
North Face
5
$15.00
);
expect(container.firstChild).toMatchSnapshot();
});