diff --git a/.betterer.results b/.betterer.results index e8f68744fd2..d915d1eeae9 100644 --- a/.betterer.results +++ b/.betterer.results @@ -125,9 +125,6 @@ exports[`no enzyme tests`] = { "public/app/features/datasources/DataSourcesListPage.test.tsx:2960099202": [ [0, 19, 13, "RegExp match", "2409514259"] ], - "public/app/features/datasources/settings/BasicSettings.test.tsx:625016324": [ - [0, 19, 13, "RegExp match", "2409514259"] - ], "public/app/features/datasources/settings/ButtonRow.test.tsx:1422996720": [ [0, 19, 13, "RegExp match", "2409514259"] ], diff --git a/public/app/features/datasources/settings/BasicSettings.test.tsx b/public/app/features/datasources/settings/BasicSettings.test.tsx index 389c6618fcc..0f58cf241f4 100644 --- a/public/app/features/datasources/settings/BasicSettings.test.tsx +++ b/public/app/features/datasources/settings/BasicSettings.test.tsx @@ -1,6 +1,8 @@ -import { shallow } from 'enzyme'; +import { render, screen } from '@testing-library/react'; import React from 'react'; +import { selectors } from '@grafana/e2e-selectors'; + import BasicSettings, { Props } from './BasicSettings'; const setup = () => { @@ -11,13 +13,14 @@ const setup = () => { onNameChange: jest.fn(), }; - return shallow(); + return render(); }; -describe('Render', () => { +describe('Basic Settings', () => { it('should render component', () => { - const wrapper = setup(); + setup(); - expect(wrapper).toMatchSnapshot(); + expect(screen.getByRole('textbox', { name: selectors.pages.DataSource.name })).toBeInTheDocument(); + expect(screen.getByRole('checkbox', { name: 'Default' })).toBeInTheDocument(); }); }); diff --git a/public/app/features/datasources/settings/__snapshots__/BasicSettings.test.tsx.snap b/public/app/features/datasources/settings/__snapshots__/BasicSettings.test.tsx.snap deleted file mode 100644 index e1d5f3203d3..00000000000 --- a/public/app/features/datasources/settings/__snapshots__/BasicSettings.test.tsx.snap +++ /dev/null @@ -1,43 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Render should render component 1`] = ` -
-
-
- - - -
- - - -
-
-`;