mirror of
https://github.com/SomboChea/ui
synced 2026-01-12 06:05:43 +07:00
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:
committed by
Juan Picado @jotadeveloper
parent
501845b5f8
commit
42d3bb8508
@@ -30,16 +30,16 @@ describe('/ (Verdaccio Page)', () => {
|
||||
await clickElement('button[data-testid="header--button-login"]');
|
||||
await page.waitFor(500);
|
||||
// we fill the sign in form
|
||||
const signInDialog = await page.$('#login--form-container');
|
||||
const userInput = await signInDialog.$('#login--form-username');
|
||||
const signInDialog = await page.$('#login--dialog');
|
||||
const userInput = await signInDialog.$('#login--dialog-username');
|
||||
expect(userInput).not.toBeNull();
|
||||
const passInput = await signInDialog.$('#login--form-password');
|
||||
const passInput = await signInDialog.$('#login--dialog-password');
|
||||
expect(passInput).not.toBeNull();
|
||||
await userInput.type('test', { delay: 100 });
|
||||
await passInput.type('test', { delay: 100 });
|
||||
await passInput.dispose();
|
||||
// click on log in
|
||||
const loginButton = await page.$('#login--form-submit');
|
||||
const loginButton = await page.$('#login--dialog-button-submit');
|
||||
expect(loginButton).toBeDefined();
|
||||
await loginButton.focus();
|
||||
await loginButton.click({ delay: 100 });
|
||||
@@ -89,8 +89,7 @@ describe('/ (Verdaccio Page)', () => {
|
||||
const signInButton = await page.$('button[data-testid="header--button-login"]');
|
||||
await signInButton.click();
|
||||
await page.waitFor(1000);
|
||||
const signInDialog = await page.$('#login--form-container');
|
||||
|
||||
const signInDialog = await page.$('#login--dialog');
|
||||
expect(signInDialog).not.toBeNull();
|
||||
});
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user