From 641632db9da9f481fba7f2dd9840927504a46fe2 Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 20 Dec 2022 19:29:30 +0300 Subject: [PATCH] rm tests --- .gitignore | 1 + coverage/junit.xml | 11 ------- .../RemoveCurrentConfigurationButton.test.tsx | 32 ------------------- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 coverage/junit.xml delete mode 100644 src/components/PluginConfigPage/parts/RemoveCurrentConfigurationButton/RemoveCurrentConfigurationButton.test.tsx diff --git a/.gitignore b/.gitignore index ab87270..6cbfb26 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules dist .eslintcache yarn-error.log +coverage diff --git a/coverage/junit.xml b/coverage/junit.xml deleted file mode 100644 index be9d93f..0000000 --- a/coverage/junit.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/components/PluginConfigPage/parts/RemoveCurrentConfigurationButton/RemoveCurrentConfigurationButton.test.tsx b/src/components/PluginConfigPage/parts/RemoveCurrentConfigurationButton/RemoveCurrentConfigurationButton.test.tsx deleted file mode 100644 index 3c1925c..0000000 --- a/src/components/PluginConfigPage/parts/RemoveCurrentConfigurationButton/RemoveCurrentConfigurationButton.test.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; - -import { render, screen } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; - -import RemoveCurrentConfigurationButton from '.'; - -describe('RemoveCurrentConfigurationButton', () => { - test('It renders properly when enabled', () => { - const component = render( {}} disabled={false} />); - expect(component.baseElement).toMatchSnapshot(); - }); - - test('It renders properly when disabled', () => { - const component = render( {}} disabled />); - expect(component.baseElement).toMatchSnapshot(); - }); - - test('It calls the onClick handler when clicked', async () => { - const mockedOnClick = jest.fn(); - - render(); - - // click the button, which opens the modal - await userEvent.click(screen.getByRole('button')); - // click the confirm button within the modal, which actually triggers the callback - await userEvent.click(screen.getByText('Remove')); - - expect(mockedOnClick).toHaveBeenCalledWith(); - expect(mockedOnClick).toHaveBeenCalledTimes(1); - }); -});