Run login only

This commit is contained in:
Diego Mello 2023-01-26 10:22:52 -03:00
parent b332bfecd4
commit efaabd891a
4 changed files with 18 additions and 5 deletions

View File

@ -2,7 +2,7 @@
module.exports = { module.exports = {
rootDir: '..', rootDir: '..',
setupFilesAfterEnv: ['<rootDir>/e2e/tests/init.ts'], setupFilesAfterEnv: ['<rootDir>/e2e/tests/init.ts'],
testMatch: ['<rootDir>/e2e/tests/**/*.spec.ts'], testMatch: ['<rootDir>/e2e/tests/onboarding/05-login.spec.ts'],
testTimeout: 120000, testTimeout: 120000,
maxWorkers: 1, maxWorkers: 1,
globalSetup: 'detox/runners/jest/globalSetup', globalSetup: 'detox/runners/jest/globalSetup',

View File

@ -20,6 +20,7 @@ async function openJoinCode() {
.toExist() .toExist()
.withTimeout(2000); .withTimeout(2000);
let n = 0; let n = 0;
// FIXME: this while is always matching 3 loops
while (n < 3) { while (n < 3) {
try { try {
await element(by.id('room-view-join-button')).tap(); await element(by.id('room-view-join-button')).tap();

View File

@ -52,10 +52,23 @@ describe('Login screen', () => {
}); });
it('should navigate to forgot password', async () => { it('should navigate to forgot password', async () => {
await element(by.id('login-view-forgot-password')).tap(); await expect(element(by.id('login-view-more'))).toBeVisible();
await waitFor(element(by.id('forgot-password-view'))) await waitFor(element(by.id('login-view-forgot-password')))
.toExist() .toBeVisible()
.withTimeout(2000); .withTimeout(2000);
let n = 0;
while (n < 3) {
try {
await element(by.id('login-view-forgot-password')).tap();
await waitFor(element(by.id('forgot-password-view')))
.toExist()
.withTimeout(2000);
n = 3;
} catch (error) {
n += 1;
}
}
await tapBack(); await tapBack();
}); });

View File

@ -1 +0,0 @@
export NODE_BINARY="/Users/diegomello/.nvm/versions/node/v14.20.0/bin/node"