mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
stackdriver: fix failing test
This commit is contained in:
parent
0ec4491a52
commit
164e9a4f9a
@ -6,6 +6,7 @@ import { MetricFindQueryTypes } from '../types';
|
||||
|
||||
jest.mock('../functions', () => ({
|
||||
getMetricTypes: () => ({ metricTypes: [], selectedMetricType: '' }),
|
||||
extractServicesFromMetricDescriptors: () => [],
|
||||
}));
|
||||
|
||||
const props: VariableQueryProps = {
|
||||
@ -26,7 +27,7 @@ describe('VariableQueryEditor', () => {
|
||||
describe('and a new variable is created', () => {
|
||||
it('should trigger a query using the first query type in the array', done => {
|
||||
props.onChange = (query, definition) => {
|
||||
expect(definition).toBe('Stackdriver - Metric Types');
|
||||
expect(definition).toBe('Stackdriver - Services');
|
||||
done();
|
||||
};
|
||||
renderer.create(<StackdriverVariableQueryEditor {...props} />).toJSON();
|
||||
|
@ -6,19 +6,24 @@ Array [
|
||||
className="gf-form max-width-21"
|
||||
>
|
||||
<span
|
||||
className="gf-form-label width-10"
|
||||
className="gf-form-label width-10 query-keyword"
|
||||
>
|
||||
Query Types
|
||||
Query Type
|
||||
</span>
|
||||
<div
|
||||
className="gf-form-select-wrapper max-width-10"
|
||||
className="gf-form-select-wrapper max-width-12"
|
||||
>
|
||||
<select
|
||||
className="gf-form-input"
|
||||
onChange={[Function]}
|
||||
required={true}
|
||||
value="metricTypes"
|
||||
value="services"
|
||||
>
|
||||
<option
|
||||
value="services"
|
||||
>
|
||||
Services
|
||||
</option>
|
||||
<option
|
||||
value="metricTypes"
|
||||
>
|
||||
@ -57,24 +62,6 @@ Array [
|
||||
</select>
|
||||
</div>
|
||||
</div>,
|
||||
<div
|
||||
className="gf-form max-width-21"
|
||||
>
|
||||
<span
|
||||
className="gf-form-label width-10"
|
||||
>
|
||||
Services
|
||||
</span>
|
||||
<div
|
||||
className="gf-form-select-wrapper max-width-10"
|
||||
>
|
||||
<select
|
||||
className="gf-form-input"
|
||||
onChange={[Function]}
|
||||
required={true}
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
</div>,
|
||||
"",
|
||||
]
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user