fleet/frontend/components/side_panels/HostSidePanel/PanelGroup/PanelGroup.tests.jsx
Mike Stone 57d959b5ea Display hosts as table (#509)
* Display hosts as table

* adds Rocker button to ManageHostsPage

* Defaults to grid selected
2016-11-21 11:26:58 -05:00

24 lines
676 B
JavaScript

import React from 'react';
import expect from 'expect';
import { mount } from 'enzyme';
import PanelGroup from './PanelGroup';
describe('PanelGroup - component', () => {
const validPanelGroupItems = [
{ type: 'all', display_text: 'All Hosts', hosts_count: 20 },
{ type: 'platform', display_text: 'MAC OS', hosts_count: 10 },
{ type: 'status', display_text: 'ONLINE', hosts_count: 10 },
];
const component = mount(
<PanelGroup groupItems={validPanelGroupItems} />
);
it('renders a PanelGroupItem for each group item', () => {
const panelGroupItems = component.find('PanelGroupItem');
expect(panelGroupItems.length).toEqual(3);
});
});