mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-23 00:11:48 -05:00
36 lines
993 B
JavaScript
36 lines
993 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import PageControls from './PageControls';
|
|
|
|
let wrapper;
|
|
let PlusIcon;
|
|
let AngleDoubleUpIcon;
|
|
let AngleDoubleDownIcon;
|
|
let AngleUpIcon;
|
|
let AngleDownIcon;
|
|
|
|
const findChildren = () => {
|
|
PlusIcon = wrapper.find('PlusIcon');
|
|
AngleDoubleUpIcon = wrapper.find('AngleDoubleUpIcon');
|
|
AngleDoubleDownIcon = wrapper.find('AngleDoubleDownIcon');
|
|
AngleUpIcon = wrapper.find('AngleUpIcon');
|
|
AngleDownIcon = wrapper.find('AngleDownIcon');
|
|
};
|
|
|
|
describe('PageControls', () => {
|
|
test('should render successfully', () => {
|
|
wrapper = mount(<PageControls />);
|
|
expect(wrapper).toHaveLength(1);
|
|
});
|
|
|
|
test('should render menu control icons', () => {
|
|
wrapper = mount(<PageControls />);
|
|
findChildren();
|
|
expect(PlusIcon.length).toBe(1);
|
|
expect(AngleDoubleUpIcon.length).toBe(1);
|
|
expect(AngleDoubleDownIcon.length).toBe(1);
|
|
expect(AngleUpIcon.length).toBe(1);
|
|
expect(AngleDownIcon.length).toBe(1);
|
|
});
|
|
});
|