1 | import * as React from 'react';
|
2 | import render from '../../_utils/tests/render';
|
3 | import Pane from '../Pane';
|
4 |
|
5 | it('renders correctly for a basic pane', () => {
|
6 | const { container } = render(<Pane>test</Pane>);
|
7 | expect(container.firstChild).toMatchSnapshot();
|
8 | });
|
9 |
|
10 | it('renders correctly for a pane with a border', () => {
|
11 | const { container } = render(<Pane border>test</Pane>);
|
12 | expect(container.firstChild).toMatchSnapshot();
|
13 | });
|
14 |
|
15 | it('renders correctly for a pane with a shadow', () => {
|
16 | const { container } = render(<Pane border="shadow">test</Pane>);
|
17 | expect(container.firstChild).toMatchSnapshot();
|
18 | });
|
19 |
|
20 | it('renders correctly for a full width pane', () => {
|
21 | const { container } = render(<Pane isFullWidth>test</Pane>);
|
22 | expect(container.firstChild).toMatchSnapshot();
|
23 | });
|
24 |
|
25 | ['100', '200', '300', '400'].forEach(elevation => {
|
26 | it(`renders correctly for a pane with elevation ${elevation}`, () => {
|
27 | const { container } = render(<Pane elevation={elevation}>test</Pane>);
|
28 | expect(container.firstChild).toMatchSnapshot();
|
29 | });
|
30 | });
|