grafana/public/app/plugins/datasource/prometheus/module.test.ts
Ivana Huckova e7a0e69153
Loki: Use explore query field unless new query builder feature toggle is enabled (#44858)
* Loki: Fix using of Explore editor in Explore

* Add test and remove Explore fields in module

* Update tests
2022-02-04 12:19:18 +01:00

14 lines
674 B
TypeScript

import { plugin as PrometheusDatasourcePlugin } from './module';
import { ANNOTATION_QUERY_STEP_DEFAULT } from './datasource';
describe('module', () => {
it('should have metrics query field in panels and Explore', () => {
expect(PrometheusDatasourcePlugin.components.QueryEditor).toBeDefined();
});
it('should have stepDefaultValuePlaceholder set in annotations ctrl', () => {
expect(PrometheusDatasourcePlugin.components.AnnotationsQueryCtrl).toBeDefined();
const annotationsCtrl = new PrometheusDatasourcePlugin.components.AnnotationsQueryCtrl();
expect(annotationsCtrl.stepDefaultValuePlaceholder).toEqual(ANNOTATION_QUERY_STEP_DEFAULT);
});
});