mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Small update proposal to add panel widget * Fix smoketest * Minor tweaks * update snaps god damn it
26 lines
657 B
TypeScript
26 lines
657 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import { AddPanelWidgetUnconnected as AddPanelWidget, Props } from './AddPanelWidget';
|
|
import { DashboardModel, PanelModel } from '../../state';
|
|
|
|
const setup = (propOverrides?: object) => {
|
|
const props: Props = {
|
|
dashboard: {} as DashboardModel,
|
|
panel: {} as PanelModel,
|
|
addPanel: jest.fn() as any,
|
|
updateLocation: jest.fn() as any,
|
|
};
|
|
|
|
Object.assign(props, propOverrides);
|
|
|
|
return shallow(<AddPanelWidget {...props} />);
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const wrapper = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|