mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Azure Monitor and Log Analytics converted and separated into components * Insights creds converted * remove angular config * fix workspaces and missing sameas key * fix workspace save * set subscriptionId key * editor fields, load workspaces btn * workspace load req fields updated * added tooltip to switch, disable buttons instead of hide * master merge and tests
44 lines
952 B
TypeScript
44 lines
952 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import ConfigEditor, { Props } from './ConfigEditor';
|
|
|
|
const setup = () => {
|
|
const props: Props = {
|
|
options: {
|
|
id: 21,
|
|
orgId: 1,
|
|
name: 'Azure Monitor-10-10',
|
|
type: 'grafana-azure-monitor-datasource',
|
|
typeLogoUrl: '',
|
|
access: 'proxy',
|
|
url: '',
|
|
password: '',
|
|
user: '',
|
|
database: '',
|
|
basicAuth: false,
|
|
basicAuthUser: '',
|
|
basicAuthPassword: '',
|
|
withCredentials: false,
|
|
isDefault: false,
|
|
jsonData: {
|
|
azureLogAnalyticsSameAs: true,
|
|
cloudName: 'azuremonitor',
|
|
},
|
|
secureJsonFields: {},
|
|
version: 1,
|
|
readOnly: false,
|
|
},
|
|
onOptionsChange: jest.fn(),
|
|
};
|
|
|
|
return shallow(<ConfigEditor {...props} />);
|
|
};
|
|
|
|
describe('Render', () => {
|
|
it('should render component', () => {
|
|
const wrapper = setup();
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
});
|
|
});
|