|
@@ -5,7 +5,6 @@ import { TemplateQueryProps } from 'app/types/plugins';
|
|
|
|
|
|
|
|
jest.mock('../functions', () => ({
|
|
jest.mock('../functions', () => ({
|
|
|
getMetricTypes: async () => ({ metricTypes: [], selectedMetricType: '' }),
|
|
getMetricTypes: async () => ({ metricTypes: [], selectedMetricType: '' }),
|
|
|
- extractServicesFromMetricDescriptors: m => m,
|
|
|
|
|
}));
|
|
}));
|
|
|
|
|
|
|
|
const props: TemplateQueryProps = {
|
|
const props: TemplateQueryProps = {
|
|
@@ -24,7 +23,7 @@ describe('StackdriverTemplateQueryComponent', () => {
|
|
|
|
|
|
|
|
it('should use the first query type in the array if no query type was saved before', done => {
|
|
it('should use the first query type in the array if no query type was saved before', done => {
|
|
|
props.onChange = (query, definition) => {
|
|
props.onChange = (query, definition) => {
|
|
|
- expect(definition).toBe('Stackdriver - Services');
|
|
|
|
|
|
|
+ expect(definition).toBe('Stackdriver - Metric Types');
|
|
|
done();
|
|
done();
|
|
|
};
|
|
};
|
|
|
renderer.create(<StackdriverTemplateQueryComponent {...props} />).toJSON();
|
|
renderer.create(<StackdriverTemplateQueryComponent {...props} />).toJSON();
|