From 606732dd5eba8567fc2729261ca146d2c6b40e41 Mon Sep 17 00:00:00 2001
From: Seyaji <67058118+Seyaji@users.noreply.github.com>
Date: Mon, 20 Jun 2022 13:46:11 +0100
Subject: [PATCH] Chore: Converts ButtonRow tests to RTL (#51068)
---
.betterer.results | 3 -
.../datasources/settings/ButtonRow.test.tsx | 22 +++--
.../__snapshots__/ButtonRow.test.tsx.snap | 81 -------------------
3 files changed, 10 insertions(+), 96 deletions(-)
delete mode 100644 public/app/features/datasources/settings/__snapshots__/ButtonRow.test.tsx.snap
diff --git a/.betterer.results b/.betterer.results
index eb57573c522..27eaf34ea5c 100644
--- a/.betterer.results
+++ b/.betterer.results
@@ -122,9 +122,6 @@ exports[`no enzyme tests`] = {
"public/app/features/datasources/DataSourcesListPage.test.tsx:2960099202": [
[0, 19, 13, "RegExp match", "2409514259"]
],
- "public/app/features/datasources/settings/ButtonRow.test.tsx:1422996720": [
- [0, 19, 13, "RegExp match", "2409514259"]
- ],
"public/app/features/dimensions/editors/ThresholdsEditor/ThresholdsEditor.test.tsx:4164297658": [
[0, 17, 13, "RegExp match", "2409514259"]
],
diff --git a/public/app/features/datasources/settings/ButtonRow.test.tsx b/public/app/features/datasources/settings/ButtonRow.test.tsx
index 9508cfd8e97..0fdc4163fb9 100644
--- a/public/app/features/datasources/settings/ButtonRow.test.tsx
+++ b/public/app/features/datasources/settings/ButtonRow.test.tsx
@@ -1,6 +1,8 @@
-import { shallow } from 'enzyme';
+import { screen, render } from '@testing-library/react';
import React from 'react';
+import { selectors } from '@grafana/e2e-selectors';
+
import ButtonRow, { Props } from './ButtonRow';
jest.mock('app/core/core', () => {
@@ -23,22 +25,18 @@ const setup = (propOverrides?: object) => {
Object.assign(props, propOverrides);
- return shallow(