From d31cb8fa23fb44700cfa4e40e33727a21ad865a8 Mon Sep 17 00:00:00 2001 From: Shubham Goyal Date: Mon, 18 Sep 2023 12:42:13 -0500 Subject: [PATCH] Adds wait after making HQ API calls to make sure HQ registers those changes well before we do login --- .../src/org/commcare/androidTests/AsyncRestoreTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/instrumentation-tests/src/org/commcare/androidTests/AsyncRestoreTest.java b/app/instrumentation-tests/src/org/commcare/androidTests/AsyncRestoreTest.java index ae6ea88efc..dd9ce1ca8b 100644 --- a/app/instrumentation-tests/src/org/commcare/androidTests/AsyncRestoreTest.java +++ b/app/instrumentation-tests/src/org/commcare/androidTests/AsyncRestoreTest.java @@ -68,6 +68,7 @@ public void testRestoreOnLogin() { // Make sure user is present in the group. HQApi.addUserInGroup(userId, groupId); + InstrumentationUtility.sleep(5); installAppAndClearCache(); @@ -97,6 +98,7 @@ public void testRestoreOnSync() { // Make sure user is not present in the group. HQApi.removeUserFromGroup(userId, groupId); + InstrumentationUtility.sleep(5); installAppAndClearCache(); @@ -113,6 +115,7 @@ public void testRestoreOnSync() { // Add user to the group. HQApi.addUserInGroup(userId, groupId); + InstrumentationUtility.sleep(5); // Sync with server. onView(withText("Sync with Server"))