-
+
diff --git a/public/app/features/plugins/sql/components/visual-query-builder/Preview.tsx b/public/app/features/plugins/sql/components/visual-query-builder/Preview.tsx
index c5dac081086..9ef56b7ea82 100644
--- a/public/app/features/plugins/sql/components/visual-query-builder/Preview.tsx
+++ b/public/app/features/plugins/sql/components/visual-query-builder/Preview.tsx
@@ -18,7 +18,7 @@ export function Preview({ rawSql }: PreviewProps) {
const labelElement = (
-
+ Preview
copyToClipboard(rawSql)} name="copy" />
);
diff --git a/public/app/plugins/datasource/cloud-monitoring/components/AnnotationsHelp.tsx b/public/app/plugins/datasource/cloud-monitoring/components/AnnotationsHelp.tsx
index a6811520410..a9ba642e397 100644
--- a/public/app/plugins/datasource/cloud-monitoring/components/AnnotationsHelp.tsx
+++ b/public/app/plugins/datasource/cloud-monitoring/components/AnnotationsHelp.tsx
@@ -19,7 +19,7 @@ export const AnnotationsHelp = () => {
Example Result: monitoring.googleapis.com/uptime_check/http_status has this value: 502
-
+
Patterns:
{`${'{{metric.value}}'}`}
= value of the metric/point
diff --git a/public/app/plugins/datasource/cloud-monitoring/components/CloudMonitoringCheatSheet.tsx b/public/app/plugins/datasource/cloud-monitoring/components/CloudMonitoringCheatSheet.tsx
index cde823d4ac2..2c3a01cc142 100644
--- a/public/app/plugins/datasource/cloud-monitoring/components/CloudMonitoringCheatSheet.tsx
+++ b/public/app/plugins/datasource/cloud-monitoring/components/CloudMonitoringCheatSheet.tsx
@@ -24,7 +24,7 @@ export default class CloudMonitoringCheatSheet extends PureComponent<
Result:
cpu/usage_time - server1-europe-west-1
-
+
Patterns:
{
describe('filter editor', () => {
it('open the editor on clicking +', () => {
setup();
- fireEvent.click(screen.getByTestId(testIds.open));
+ fireEvent.click(screen.getByRole('button', { name: /Add filter/ }));
expect(screen.getByText('Group by')).toBeInTheDocument();
});
@@ -64,7 +64,7 @@ describe('FilterSection', () => {
it('should call runQuery on adding a filter', () => {
setup();
- fireEvent.click(screen.getByTestId(testIds.open));
+ fireEvent.click(screen.getByRole('button', { name: /Add filter/ }));
fireEvent.click(screen.getByText('add filter'));
expect(onRunQuery).toHaveBeenCalled();
});
@@ -78,7 +78,7 @@ describe('FilterSection', () => {
tags: [{}],
};
setup({ query });
- fireEvent.click(screen.getByTestId(testIds.open));
+ fireEvent.click(screen.getByRole('button', { name: /Add filter/ }));
fireEvent.click(screen.getByText('add filter'));
expect(screen.getByTestId(testIds.error)).toBeInTheDocument();
});
diff --git a/public/app/plugins/datasource/opentsdb/components/FilterSection.tsx b/public/app/plugins/datasource/opentsdb/components/FilterSection.tsx
index 6ae7744d3a5..ba255b948ed 100644
--- a/public/app/plugins/datasource/opentsdb/components/FilterSection.tsx
+++ b/public/app/plugins/datasource/opentsdb/components/FilterSection.tsx
@@ -138,11 +138,9 @@ export function FilterSection({
);
})}
{!addFilterMode && (
-
+
)}
{addFilterMode && (
@@ -225,19 +223,18 @@ export function FilterSection({
/>