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:
mabashian
2019-03-13 15:40:27 -04:00
parent dbeef0a823
commit 3596d776fc
12 changed files with 801 additions and 334 deletions

View 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();
});
});