#6427 - SMS Recover Password #2037

Open
jsegarra wants to merge 72 commits from 6427_sms_resetPassword into dev
1 changed files with 18 additions and 16 deletions
Showing only changes of commit 1d04ca1c8a - Show all commits

View File

@ -21,27 +21,17 @@ fdescribe('RecoverPassword path', async() => {
await page.write(selectors.recoverPassword.email, 'fakeEmail@mydomain.com');
await page.waitToClick(selectors.recoverPassword.emailOption);
await page.waitToClick(selectors.recoverPassword.sendEmailButton);
const httpDataResponse = await page.waitForResponse(response => {
return response.status() === 204 && response.url().includes(`VnUsers/recoverPassword`);
});
const code = await httpDataResponse.ok();
expect(code).toBeTrue();
const message = await page.waitForSnackbar();
expect(message.text).toContain('Notification sent!');
});
it('should not throw error if not exist user when select sms option', async() => {
await page.waitForState('login');
await page.waitToClick(selectors.recoverPassword.recoverPasswordButton);
await page.write(selectors.recoverPassword.email, 'fakeEmail@mydomain.com');
await page.waitToClick(selectors.recoverPassword.emailOption);
// await page.waitToClick(selectors.recoverPassword.smsOption);
await page.waitToClick(selectors.recoverPassword.sendEmailButton);
const message = await page.waitForSnackbar();
// await page.waitForState('login');
expect(message.text).toContain('Credentials not valid');
expect(await page.getState()).toContain('recover-password');
});
it('should send email using email', async() => {
await page.waitForState('login');
await page.waitToClick(selectors.recoverPassword.recoverPasswordButton);
@ -68,9 +58,21 @@ fdescribe('RecoverPassword path', async() => {
expect(message.text).toContain('Notification sent!');
});
it('should send sms using username', async() => {
it('should not throw error if not exist user when select sms option', async() => {
await page.waitForState('login');
await page.waitToClick(selectors.recoverPassword.recoverPasswordButton);
await page.write(selectors.recoverPassword.email, 'fakeEmail@mydomain.com');
await page.waitToClick(selectors.recoverPassword.smsOption);
await page.waitToClick(selectors.recoverPassword.sendEmailButton);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Credentials not valid');
expect(await page.getState()).toContain('recover-password');
});
it('should send sms using username', async() => {
await page.clearInput(selectors.recoverPassword.email);
await page.write(selectors.recoverPassword.email, 'BruceWayne');
await page.waitToClick(selectors.recoverPassword.smsOption);