-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from bible-technology/lint-test-fixes
Fixing lint and test issues
- Loading branch information
Showing
10 changed files
with
96 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* eslint-disable no-tabs */ | ||
// import React from 'react'; | ||
// import { render, fireEvent } from '@testing-library/react'; | ||
// import Login from '../Login'; | ||
// import CustomLogin from '../CustomLogin'; | ||
// import { isElectron } from '../../../core/handleElectron'; | ||
// import AuthenticationContextProvider from '../AuthenticationContextProvider'; | ||
// // import { act } from 'react-dom/test-utils'; | ||
|
||
// describe('Login component tests', () => { | ||
// test('Should render Login component without error', () => { | ||
// render( | ||
// <AuthenticationContextProvider> | ||
// <Login /> | ||
// </AuthenticationContextProvider>, | ||
// ); | ||
// }); | ||
// describe('Offline test', () => { | ||
// if (isElectron()) { | ||
// test('Should have tabs', async () => { | ||
// const { getByTestId } = render(<Login />); | ||
// const element = getByTestId('tabs'); | ||
// expect(element).toHaveTextContent('OfflineOnline'); | ||
// }); | ||
// } | ||
// test('Should have called CustomLogin', async () => { | ||
// render(<CustomLogin />); | ||
// }); | ||
// }); | ||
|
||
// // describe('Online test', () => { | ||
// // test('Update state on password change', async () => { | ||
// // const { getByTestId } = render(<Login />); | ||
// // const element = getByTestId('password-textfield'); | ||
// // const passwordTextfield = element.children[0]; | ||
// // await act(async () => { | ||
// // fireEvent.change(passwordTextfield, {target: { value: 'testPassword' },}); | ||
// // }); | ||
// // expect(passwordTextfield.value).toEqual('testPassword'); | ||
// // }); | ||
// // }); | ||
|
||
// // test('Should click login button', async () => { | ||
// // const mockLogin = jest.fn(); | ||
// // React.useState = jest.fn(() => ['', mockLogin]); | ||
// // const { getByTestId } = render(<Login />); | ||
// // const usernameTextfield = getByTestId('username-textfield'); | ||
// // const element = getByTestId('password-textfield'); | ||
// // const passwordTextfield = element.children[0]; | ||
// // const loginButton = getByTestId('login-button'); | ||
// // await act(async () => { | ||
// // fireEvent.change(usernameTextfield, { target: { value: 'testUser' } }); | ||
// // fireEvent.change(passwordTextfield, { | ||
// // target: { value: 'testPassword' }, | ||
// // }); | ||
// // fireEvent.click(loginButton); | ||
// // }); | ||
// // expect(mockLogin).toHaveBeenCalled(); | ||
// // // expect(mockLogin).toBeCalledWith({ | ||
// // // username: "testUser", | ||
// // // password: "testPassword", | ||
// // // showPassword: false, | ||
// // // }); | ||
// // }); | ||
// }); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// import React from "react"; | ||
// import { render } from "@testing-library/react"; | ||
// import "@testing-library/jest-dom/extend-expect"; | ||
// import Signup from "./Signup"; | ||
// import CustomLogin from '../Login/CustomLogin' | ||
|
||
// describe('Signup component tests', () => { | ||
// test("renders without fail", () => { | ||
// render(<Signup />); | ||
// }); | ||
// test('Should have called CustomLogin', async () => { | ||
// render(<CustomLogin />); | ||
// }); | ||
// test("Signup should have link to Login page.", () => { | ||
// const { getByTestId } = render(<Signup />); | ||
// const link = getByTestId('signup'); | ||
// expect(link.href).toBe("http://localhost/login"); | ||
// }); | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters