-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPane.test.tsx
61 lines (52 loc) · 1.56 KB
/
Pane.test.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { mount, shallow } from 'enzyme';
import React from 'react';
import Pane from '../Pane';
import PaneContainer from '../Container';
import PaneContent from '../Content';
describe('Pane test', () => {
it('should render pane container', () => {
const container = shallow(
<PaneContainer>
Hello world
</PaneContainer>
);
expect(container.find('.pane-container').length).toBe(1);
});
it('should render vertical pane container', () => {
const container = shallow(
<PaneContainer vertical>
Hello world
</PaneContainer>
);
expect(container.find('.pane-container.vertical').length).toBe(1);
});
it('should render pane', () => {
const container = shallow(
<Pane>
Hello world
</Pane>
);
expect(container.find('.pane').length).toBe(1);
});
it('should render horizontal pane', () => {
const container = shallow(
<Pane horizontal>
Hello world
</Pane>
);
expect(container.find('.pane.horizontal').length).toBe(1);
});
it('should render pane content', () => {
const container = mount(
<div>
<PaneContent>
Hello world
</PaneContent>
<Pane.Content>
Hello world
</Pane.Content>
</div>
);
expect(container.find('.pane-content').length).toBe(2);
});
});