1 | import * as React from 'react';
|
2 | import render from '../../_utils/tests/render';
|
3 | import Container from '../Container';
|
4 |
|
5 | it('renders correctly for a basic container', () => {
|
6 | const { container } = render(<Container>test</Container>);
|
7 | expect(container.firstChild).toMatchSnapshot();
|
8 | });
|
9 |
|
10 | describe('alignment', () => {
|
11 | it('renders correctly for a left aligned container', () => {
|
12 | const { container } = render(<Container align="left">test</Container>);
|
13 | expect(container.firstChild).toMatchSnapshot();
|
14 | });
|
15 |
|
16 | it('renders correctly for a center aligned container', () => {
|
17 | const { container } = render(<Container align="center">test</Container>);
|
18 | expect(container.firstChild).toMatchSnapshot();
|
19 | });
|
20 |
|
21 | it('renders correctly for a right aligned container', () => {
|
22 | const { container } = render(<Container align="right">test</Container>);
|
23 | expect(container.firstChild).toMatchSnapshot();
|
24 | });
|
25 | });
|
26 |
|
27 | describe('fixed width', () => {
|
28 | it('renders correctly when breakpoint is fullHD', () => {
|
29 | const { container } = render(<Container breakpoint="fullHD">test</Container>);
|
30 | expect(container.firstChild).toMatchSnapshot();
|
31 | });
|
32 |
|
33 | it('renders correctly when breakpoint is widescreen', () => {
|
34 | const { container } = render(<Container breakpoint="widescreen">test</Container>);
|
35 | expect(container.firstChild).toMatchSnapshot();
|
36 | });
|
37 |
|
38 | it('renders correctly when breakpoint is desktop', () => {
|
39 | const { container } = render(<Container breakpoint="desktop">test</Container>);
|
40 | expect(container.firstChild).toMatchSnapshot();
|
41 | });
|
42 |
|
43 | it('renders correctly when breakpoint is tablet', () => {
|
44 | const { container } = render(<Container breakpoint="tablet">test</Container>);
|
45 | expect(container.firstChild).toMatchSnapshot();
|
46 | });
|
47 |
|
48 | it('renders correctly when breakpoint is mobile', () => {
|
49 | const { container } = render(<Container breakpoint="mobile">test</Container>);
|
50 | expect(container.firstChild).toMatchSnapshot();
|
51 | });
|
52 | });
|
53 |
|
54 | describe('fluid', () => {
|
55 | it('renders correctly for a fluid container', () => {
|
56 | const { container } = render(<Container isFluid>test</Container>);
|
57 | expect(container.firstChild).toMatchSnapshot();
|
58 | });
|
59 | });
|
60 |
|
61 | describe('layout', () => {
|
62 | it('renders correctly for a layout container', () => {
|
63 | const { container } = render(<Container isLayout>test</Container>);
|
64 | expect(container.firstChild).toMatchSnapshot();
|
65 | });
|
66 | });
|