diff --git a/public/app/plugins/datasource/grafana/components/AnnotationQueryEditor.test.tsx b/public/app/plugins/datasource/grafana/components/AnnotationQueryEditor.test.tsx index 60d84d14c63..6adca6ef35a 100644 --- a/public/app/plugins/datasource/grafana/components/AnnotationQueryEditor.test.tsx +++ b/public/app/plugins/datasource/grafana/components/AnnotationQueryEditor.test.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { GrafanaAnnotationType, GrafanaAnnotationQuery } from '../types'; import AnnotationQueryEditor from './AnnotationQueryEditor'; -describe('AnnotationQuery', () => { +describe('AnnotationQueryEditor', () => { const mockOnChange = jest.fn(); let mockQuery: GrafanaAnnotationQuery; @@ -27,6 +27,20 @@ describe('AnnotationQuery', () => { expect(maxLimit).toBeInTheDocument(); }); + describe('when the query type is "Tags"', () => { + it('has a "Match any" toggle', () => { + render(); + const matchAny = screen.getByLabelText('Match any'); + expect(matchAny).toBeInTheDocument(); + }); + + it('has a "Tags" input', () => { + render(); + const tags = screen.getByLabelText('Tags'); + expect(tags).toBeInTheDocument(); + }); + }); + describe('when the query type is "Dashboard"', () => { beforeEach(() => { mockQuery.type = GrafanaAnnotationType.Dashboard; @@ -44,18 +58,4 @@ describe('AnnotationQuery', () => { expect(tags).toBeNull(); }); }); - - describe('when the query type is "Tags"', () => { - it('has a "Match any" toggle', () => { - render(); - const matchAny = screen.getByLabelText('Match any'); - expect(matchAny).toBeInTheDocument(); - }); - - it('has a "Tags" input', () => { - render(); - const tags = screen.getByLabelText('Tags'); - expect(tags).toBeInTheDocument(); - }); - }); });