From b262be73e021e604a065e2191fcde2f7abba5dfd Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Fri, 9 Nov 2018 10:31:41 +0100 Subject: [PATCH] stackdriver: fix failing tests --- .../TemplateQueryComponent.test.tsx | 3 +-- .../TemplateQueryComponent.test.tsx.snap | 27 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.test.tsx b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.test.tsx index a31948e9a16..0d9f0e6d5b4 100644 --- a/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.test.tsx +++ b/public/app/plugins/datasource/stackdriver/components/TemplateQueryComponent.test.tsx @@ -5,7 +5,6 @@ import { TemplateQueryProps } from 'app/types/plugins'; jest.mock('../functions', () => ({ getMetricTypes: async () => ({ metricTypes: [], selectedMetricType: '' }), - extractServicesFromMetricDescriptors: m => m, })); 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 => { props.onChange = (query, definition) => { - expect(definition).toBe('Stackdriver - Services'); + expect(definition).toBe('Stackdriver - Metric Types'); done(); }; renderer.create().toJSON(); diff --git a/public/app/plugins/datasource/stackdriver/components/__snapshots__/TemplateQueryComponent.test.tsx.snap b/public/app/plugins/datasource/stackdriver/components/__snapshots__/TemplateQueryComponent.test.tsx.snap index 026e8ba09c4..c7e4d708383 100644 --- a/public/app/plugins/datasource/stackdriver/components/__snapshots__/TemplateQueryComponent.test.tsx.snap +++ b/public/app/plugins/datasource/stackdriver/components/__snapshots__/TemplateQueryComponent.test.tsx.snap @@ -17,13 +17,8 @@ Array [ className="gf-form-input" onChange={[Function]} required={true} - value="services" + value="metricTypes" > -