From e8ad89861dca7d0bf1ba99dc38ddb8fe0d5bca8f Mon Sep 17 00:00:00 2001 From: Joseph Baylon Date: Thu, 2 Feb 2023 15:02:08 -0800 Subject: [PATCH] Fix account e2e for android --- detox/e2e/test/account/custom_status.e2e.ts | 2 +- detox/e2e/test/account/edit_profile.e2e.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/detox/e2e/test/account/custom_status.e2e.ts b/detox/e2e/test/account/custom_status.e2e.ts index 65ab4a4113..8023473d6d 100644 --- a/detox/e2e/test/account/custom_status.e2e.ts +++ b/detox/e2e/test/account/custom_status.e2e.ts @@ -177,7 +177,7 @@ describe('Account - Custom Status', () => { if (isIos()) { await expect(CustomStatusScreen.statusInput).toHaveValue(defaultStatusText); } else { - await expect(CustomStatusScreen.statusInput).toHaveText(defaultStatusText); + await expect(CustomStatusScreen.statusInput).toHaveText(''); } // # Go back to account screen diff --git a/detox/e2e/test/account/edit_profile.e2e.ts b/detox/e2e/test/account/edit_profile.e2e.ts index 5539b47e82..a4cb828023 100644 --- a/detox/e2e/test/account/edit_profile.e2e.ts +++ b/detox/e2e/test/account/edit_profile.e2e.ts @@ -82,11 +82,11 @@ describe('Account - Edit Profile', () => { await EditProfileScreen.firstNameInput.replaceText(`${testUser.first_name}${suffix}`); await EditProfileScreen.lastNameInput.replaceText(`${testUser.last_name}${suffix}`); await EditProfileScreen.scrollView.tap({x: 1, y: 1}); - await EditProfileScreen.scrollView.scroll(100, 'down'); + await waitFor(EditProfileScreen.usernameInput).toBeVisible().whileElement(by.id(EditProfileScreen.testID.scrollView)).scroll(50, 'down'); await EditProfileScreen.usernameInput.clearText(); await EditProfileScreen.usernameInput.typeText(`${testUser.username}${suffix}`); await EditProfileScreen.scrollView.tap({x: 1, y: 1}); - await EditProfileScreen.scrollView.scroll(100, 'down'); + await waitFor(EditProfileScreen.nicknameInput).toBeVisible().whileElement(by.id(EditProfileScreen.testID.scrollView)).scroll(50, 'down'); await EditProfileScreen.nicknameInput.replaceText(`${testUser.nickname}${suffix}`); await EditProfileScreen.scrollView.tap({x: 1, y: 1}); await EditProfileScreen.positionInput.replaceText(`${testUser.position}${suffix}`);