mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 14:05:59 -03:30
Refactor of DataListToolbar. Creates a number of smaller components used by the toolbar. Adds support for passing in an add button node to the toolbar.
This commit is contained in:
23
__tests__/components/ExpandCollapse.test.jsx
Normal file
23
__tests__/components/ExpandCollapse.test.jsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
import ExpandCollapse from '../../src/components/ExpandCollapse';
|
||||
|
||||
describe('<ExpandCollapse />', () => {
|
||||
const onCompact = jest.fn();
|
||||
const onExpand = jest.fn();
|
||||
const isCompact = false;
|
||||
test('initially renders without crashing', () => {
|
||||
const wrapper = mount(
|
||||
<I18nProvider>
|
||||
<ExpandCollapse
|
||||
onCompact={onCompact}
|
||||
onExpand={onExpand}
|
||||
isCompact={isCompact}
|
||||
/>
|
||||
</I18nProvider>
|
||||
);
|
||||
expect(wrapper.length).toBe(1);
|
||||
wrapper.unmount();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user