From 356a1e32314f3367d07f0a7047c3318f05da61bf Mon Sep 17 00:00:00 2001 From: Albin Henriksson <albhe428@student.liu.se> Date: Tue, 6 Apr 2021 07:03:58 +0000 Subject: [PATCH] Fix: Delete AddCompetition.test.tsx --- .../admin/components/AddCompetition.test.tsx | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 client/src/pages/admin/components/AddCompetition.test.tsx diff --git a/client/src/pages/admin/components/AddCompetition.test.tsx b/client/src/pages/admin/components/AddCompetition.test.tsx deleted file mode 100644 index 3455447b..00000000 --- a/client/src/pages/admin/components/AddCompetition.test.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { fireEvent, render, screen } from '@testing-library/react' -import { mount } from 'enzyme' -import React from 'react' -import { Provider } from 'react-redux' -import { BrowserRouter } from 'react-router-dom' -import configureMockStore from 'redux-mock-store' -import thunk from 'redux-thunk' -import store from '../../../store' -import AddCompetition from './AddCompetition' - -const middlewares = [thunk] -const mockStore = configureMockStore(middlewares) - -fit('renders add competition', () => { - render( - <BrowserRouter> - <Provider store={store}> - <AddCompetition /> - </Provider> - </BrowserRouter> - ) -}) - -fit('it adds competitions', () => { - const cities = [ - { - id: 1, - name: 'Link\u00f6ping', - }, - { - id: 2, - name: 'Stockholm', - }, - ] - const store = mockStore({ cities }) - // console.log(store.getState()) - const wrapper = mount( - <Provider store={store}> - <AddCompetition /> - </Provider> - ) - const newCompetitionButton = wrapper.find('button') - newCompetitionButton.simulate('click') - const nameField = screen.getByRole('textbox') - // const nameField = textFields.children().first() - - // nameField.simulate('focus') - // nameField.simulate('change', { target: { value: 'Changed' } }) - console.log(nameField) - fireEvent.click(nameField) - expect(wrapper.text().includes('2')).toBe(true) //TODO: check that SlideSettings exists -}) -- GitLab