tapReturnKey

This commit is contained in:
Diego Mello 2023-01-27 10:23:38 -03:00
parent 97a99baca6
commit 86060deb92
2 changed files with 5 additions and 3 deletions

View File

@ -60,8 +60,9 @@ async function login(username: string, password: string) {
.toExist()
.withTimeout(2000);
await element(by.id('login-view-email')).replaceText(username);
await element(by.id('login-view-email')).tapReturnKey();
await element(by.id('login-view-password')).replaceText(password);
await element(by.id('login-view-submit')).tap();
await element(by.id('login-view-password')).tapReturnKey();
await waitFor(element(by.id('rooms-list-view')))
.toExist()
.withTimeout(30000);

View File

@ -74,8 +74,9 @@ describe('Login screen', () => {
it('should insert wrong password and get error', async () => {
await element(by.id('login-view-email')).replaceText(data.users.regular.username);
await element(by.id('login-view-email')).tapReturnKey();
await element(by.id('login-view-password')).replaceText('NotMyActualPassword');
await element(by.id('login-view-submit')).tap();
await element(by.id('login-view-password')).tapReturnKey();
await waitFor(element(by[textMatcher]('Your credentials were rejected! Please try again.')))
.toBeVisible()
.withTimeout(10000);
@ -84,7 +85,7 @@ describe('Login screen', () => {
it('should login with success', async () => {
await element(by.id('login-view-password')).replaceText(data.users.regular.password);
await element(by.id('login-view-submit')).tap();
await element(by.id('login-view-password')).tapReturnKey();
await waitFor(element(by.id('rooms-list-view')))
.toBeVisible()
.withTimeout(60000);