2019-12-02 11:14:26 -06:00
|
|
|
import { plugin as PrometheusDatasourcePlugin } from './module';
|
2020-02-05 09:40:37 -06:00
|
|
|
import { ANNOTATION_QUERY_STEP_DEFAULT } from './datasource';
|
2019-11-08 05:12:34 -06:00
|
|
|
|
|
|
|
describe('module', () => {
|
|
|
|
it('should have metrics query field in panels and Explore', () => {
|
|
|
|
expect(PrometheusDatasourcePlugin.components.ExploreMetricsQueryField).toBeDefined();
|
|
|
|
expect(PrometheusDatasourcePlugin.components.QueryEditor).toBeDefined();
|
|
|
|
});
|
2020-02-05 09:40:37 -06:00
|
|
|
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);
|
|
|
|
});
|
2019-11-08 05:12:34 -06:00
|
|
|
});
|