2021-09-20 22:23:39 +03:00
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
import createSettings from '../../src/settings/Settings';
|
2021-12-30 12:02:31 +03:00
|
|
|
import { NoMenuLayout } from '../../src/common/NoMenuLayout';
|
2021-09-20 22:23:39 +03:00
|
|
|
|
|
|
|
describe('<Settings />', () => {
|
|
|
|
const Component = () => null;
|
2021-12-24 16:15:28 +03:00
|
|
|
const Settings = createSettings(Component, Component, Component, Component, Component, Component);
|
2021-09-20 22:23:39 +03:00
|
|
|
|
2021-09-20 23:00:34 +03:00
|
|
|
it('renders a no-menu layout with the expected settings sections', () => {
|
2021-09-20 22:23:39 +03:00
|
|
|
const wrapper = shallow(<Settings />);
|
|
|
|
const layout = wrapper.find(NoMenuLayout);
|
|
|
|
const sections = wrapper.find('SettingsSections');
|
|
|
|
|
|
|
|
expect(layout).toHaveLength(1);
|
|
|
|
expect(sections).toHaveLength(1);
|
2021-12-24 16:15:28 +03:00
|
|
|
expect((sections.prop('items') as any[]).flat()).toHaveLength(6);
|
2021-09-20 22:23:39 +03:00
|
|
|
});
|
|
|
|
});
|