diff --git a/.betterer.results b/.betterer.results
index c31ceff3895..b841ff6f0a1 100644
--- a/.betterer.results
+++ b/.betterer.results
@@ -173,9 +173,6 @@ exports[`no enzyme tests`] = {
"public/app/features/dimensions/editors/ThresholdsEditor/ThresholdsEditor.test.tsx:4164297658": [
[0, 17, 13, "RegExp match", "2409514259"]
],
- "public/app/features/explore/RichHistory/RichHistoryStarredTab.test.tsx:523695501": [
- [0, 17, 13, "RegExp match", "2409514259"]
- ],
"public/app/features/folders/FolderSettingsPage.test.tsx:1109052730": [
[0, 19, 13, "RegExp match", "2409514259"]
],
diff --git a/public/app/features/explore/RichHistory/RichHistoryStarredTab.test.tsx b/public/app/features/explore/RichHistory/RichHistoryStarredTab.test.tsx
index e0434713f69..4cedf1e8e8f 100644
--- a/public/app/features/explore/RichHistory/RichHistoryStarredTab.test.tsx
+++ b/public/app/features/explore/RichHistory/RichHistoryStarredTab.test.tsx
@@ -1,4 +1,4 @@
-import { mount } from 'enzyme';
+import { render } from '@testing-library/react';
import React from 'react';
import { SortOrder } from 'app/core/utils/richHistory';
@@ -44,27 +44,27 @@ const setup = (activeDatasourceOnly = false) => {
},
};
- const wrapper = mount();
- return wrapper;
+ const container = render();
+ return container;
};
describe('RichHistoryStarredTab', () => {
describe('sorter', () => {
it('should render sorter', () => {
- const wrapper = setup();
- expect(wrapper.find({ 'aria-label': 'Sort queries' })).toHaveLength(1);
+ const container = setup();
+ expect(container.queryByLabelText('Sort queries')).toBeInTheDocument();
});
});
describe('select datasource', () => {
it('should render select datasource if activeDatasourceOnly is false', () => {
- const wrapper = setup();
- expect(wrapper.find({ 'aria-label': 'Filter queries for data sources(s)' }).exists()).toBeTruthy();
+ const container = setup();
+ expect(container.queryByLabelText('Filter queries for data sources(s)')).toBeInTheDocument();
});
it('should not render select datasource if activeDatasourceOnly is true', () => {
- const wrapper = setup(true);
- expect(wrapper.find({ 'aria-label': 'Filter queries for data sources(s)' }).exists()).toBeFalsy();
+ const container = setup(true);
+ expect(container.queryByLabelText('Filter queries for data sources(s)')).not.toBeInTheDocument();
});
});
});