2018-09-26 08:12:06 -05:00
|
|
|
import React from 'react';
|
|
|
|
import { shallow } from 'enzyme';
|
|
|
|
import PluginList from './PluginList';
|
|
|
|
import { getMockPlugins } from './__mocks__/pluginMocks';
|
2021-04-21 09:39:56 -05:00
|
|
|
import { LayoutModes } from '@grafana/data';
|
2018-09-26 08:12:06 -05:00
|
|
|
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
|
|
const props = Object.assign(
|
|
|
|
{
|
|
|
|
plugins: getMockPlugins(5),
|
2018-09-27 05:15:41 -05:00
|
|
|
layoutMode: LayoutModes.Grid,
|
2018-09-26 08:12:06 -05:00
|
|
|
},
|
|
|
|
propOverrides
|
|
|
|
);
|
|
|
|
|
|
|
|
return shallow(<PluginList {...props} />);
|
|
|
|
};
|
|
|
|
|
|
|
|
describe('Render', () => {
|
|
|
|
it('should render component', () => {
|
|
|
|
const wrapper = setup();
|
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|