forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BreadcrumbItem.test.tsx
44 lines (37 loc) · 1.41 KB
/
BreadcrumbItem.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
import * as React from 'react';
import { BreadcrumbItem } from './BreadcrumbItem';
import { shallow } from 'enzyme';
describe('BreadcrumbItem component', () => {
test('should render default breadcrumbItem', () => {
const view = shallow(<BreadcrumbItem>Item</BreadcrumbItem>);
expect(view).toMatchSnapshot();
});
test('should render breadcrumbItem with className', () => {
const view = shallow(<BreadcrumbItem className="Class">Item</BreadcrumbItem>);
expect(view).toMatchSnapshot();
});
test('should render breadcrumbItem with id', () => {
const view = shallow(<BreadcrumbItem id="Item 1">Item</BreadcrumbItem>);
expect(view).toMatchSnapshot();
});
test('should render active breadcrumbItem', () => {
const view = shallow(<BreadcrumbItem isActive>Item</BreadcrumbItem>);
expect(view).toMatchSnapshot();
});
test('should render link breadcrumbItem', () => {
const view = shallow(<BreadcrumbItem to="/somewhere">Item</BreadcrumbItem>);
expect(view).toMatchSnapshot();
});
test('should render breadcrumbItem with target', () => {
const view = shallow(<BreadcrumbItem target="/somewhere">Item</BreadcrumbItem>);
expect(view).toMatchSnapshot();
});
test('should render breadcrumbItem with custom element', () => {
const view = shallow(
<BreadcrumbItem>
<h1>Header</h1>
</BreadcrumbItem>
);
expect(view).toMatchSnapshot();
});
});