From cdd6f87caac69a76fde061bf9e00b158f31d7ee4 Mon Sep 17 00:00:00 2001 From: lupusA Date: Sun, 12 Nov 2023 07:36:12 +0100 Subject: [PATCH] Finalize PR to implement the new structure --- src/tests/Preferences.test.js | 15 - src/tests/RepositoryUI.test.jsx | 22 -- .../__snapshots__/Preferences.test.js.snap | 273 ------------------ .../__snapshots__/RepositoryUI.test.jsx.snap | 232 --------------- 4 files changed, 542 deletions(-) delete mode 100644 src/tests/RepositoryUI.test.jsx delete mode 100644 src/tests/__snapshots__/RepositoryUI.test.jsx.snap diff --git a/src/tests/Preferences.test.js b/src/tests/Preferences.test.js index 2ee444e..2660571 100644 --- a/src/tests/Preferences.test.js +++ b/src/tests/Preferences.test.js @@ -37,21 +37,6 @@ describe('Select the light theme', () => { }) }) -/** - * - */ -describe('Select the dark theme', () => { - test('Should select dark theme', () => { - userEvent.selectOptions( - screen.getByRole('combobox', { name: "Theme" }), - screen.getByRole('option', { name: 'dark' })); - - expect(screen.getByRole('option', { name: 'dark' }).selected).toBe(true) - - expect(wrapper).toMatchSnapshot(); - }) -}) - /** * */ diff --git a/src/tests/RepositoryUI.test.jsx b/src/tests/RepositoryUI.test.jsx deleted file mode 100644 index d21dd0c..0000000 --- a/src/tests/RepositoryUI.test.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import axios from 'axios'; -import React from 'react'; -import App from '../App'; -import { render } from '@testing-library/react'; - -jest.mock('axios'); - -// Wrapper -let wrapper; - -/** - * - */ -beforeEach(() => { - wrapper = render() -}); - -describe('Testing the app', () => { - test('Should render the app', () => { - expect(wrapper).toMatchSnapshot(); - }) -}) diff --git a/src/tests/__snapshots__/Preferences.test.js.snap b/src/tests/__snapshots__/Preferences.test.js.snap index 478258e..2298024 100644 --- a/src/tests/__snapshots__/Preferences.test.js.snap +++ b/src/tests/__snapshots__/Preferences.test.js.snap @@ -273,279 +273,6 @@ Object { } `; -exports[`Select the dark theme Should select dark theme 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
- - - - The current active theme - -
-
-
- - - - Specifies the representation of bytes - -
-
-
- - - - Specifies the pagination size in tables - -
-
-
- , - "container":
-
-
- - - - The current active theme - -
-
-
- - - - Specifies the representation of bytes - -
-
-
- - - - Specifies the pagination size in tables - -
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - exports[`Select the light theme Should select light theme 1`] = ` Object { "asFragment": [Function], diff --git a/src/tests/__snapshots__/RepositoryUI.test.jsx.snap b/src/tests/__snapshots__/RepositoryUI.test.jsx.snap deleted file mode 100644 index 5ba4d4f..0000000 --- a/src/tests/__snapshots__/RepositoryUI.test.jsx.snap +++ /dev/null @@ -1,232 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Testing the app Should render the app 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
- -
- -
- -
-
-
- , - "container":
- -
- -
- -
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`;