feat: login Dialog Component - Replaced class by func. comp + added react-hook-form (#341)

* refactor: convert class to func

* refactor: changed login form logic

* refactor: conver to testing-library tests

* refactor: moved dependency

* refactor: replaced uglifyjs-webpack-plugin by terser-webpack-plugin

* fix: fixed e2e errors

* fix: fixed e2e test

* Delete settings.json

* fix: vscode settings rollback

* refactor: rollback webpack config

* refactor: updated eslint rule

* fix: removed --fix

* refactor: incresed the bundle size
This commit is contained in:
Priscila Oliveira
2019-12-06 18:09:01 +01:00
committed by Juan Picado @jotadeveloper
parent 501845b5f8
commit 42d3bb8508
34 changed files with 416 additions and 497 deletions

View File

@@ -44,7 +44,7 @@ describe('<Header /> component with logged in state', () => {
});
test('should open login dialog', async () => {
const { getByText, getByTestId } = render(
const { getByText } = render(
<Router>
<AppContextProvider packages={props.packages}>
<Header />
@@ -54,9 +54,8 @@ describe('<Header /> component with logged in state', () => {
const loginBtn = getByText('Login');
fireEvent.click(loginBtn);
// wait for login modal appearance and return the element
const registrationInfoModal = await waitForElement(() => getByTestId('login--form-container'));
expect(registrationInfoModal).toBeTruthy();
const loginDialog = await waitForElement(() => getByText('Sign in'));
expect(loginDialog).toBeTruthy();
});
test('should logout the user', async () => {