From 84324f52ae03eba4d6e99477b4d410687feb8a09 Mon Sep 17 00:00:00 2001 From: isabelrios Date: Fri, 3 Jul 2020 19:49:40 +0200 Subject: [PATCH] For #12018 - Sync Int tests fixes (#12252) --- .../java/org/mozilla/fenix/components/FxaServer.kt | 7 ++----- .../fenix/syncintegration/SyncIntegrationTest.kt | 10 +++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/components/FxaServer.kt b/app/src/androidTest/java/org/mozilla/fenix/components/FxaServer.kt index 2d853b4ea..71f150c17 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/components/FxaServer.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/components/FxaServer.kt @@ -13,11 +13,8 @@ import mozilla.components.service.fxa.ServerConfig */ object FxaServer { - const val CLIENT_ID = "a2270f727f45f648" - const val REDIRECT_URL = "https://accounts.stage.mozaws.net/oauth/success/$CLIENT_ID" - - @Suppress("UNUSED_PARAMETER") - fun redirectUrl(context: Context) = REDIRECT_URL + private const val CLIENT_ID = "a2270f727f45f648" + const val REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel" @Suppress("UNUSED_PARAMETER") fun config(context: Context): ServerConfig { diff --git a/app/src/androidTest/java/org/mozilla/fenix/syncintegration/SyncIntegrationTest.kt b/app/src/androidTest/java/org/mozilla/fenix/syncintegration/SyncIntegrationTest.kt index 89a932ffc..24235ac46 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/syncintegration/SyncIntegrationTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/syncintegration/SyncIntegrationTest.kt @@ -63,10 +63,12 @@ class SyncIntegrationTest { signInFxSync() tapReturnToPreviousApp() // Let's wait until homescreen is shown to go to three dot menu - mDevice.waitNotNull(Until.findObjects(By.text("Open tabs")), TestAssetHelper.waitingTime) + TestAssetHelper.waitingTime + mDevice.waitNotNull(Until.findObjects(By.res("org.mozilla.fenix.debug:id/counter_root"))) homeScreen { }.openThreeDotMenu { - }.openHistory { } + }.openHistory { + } historyAfterSyncIsShown() } @@ -221,8 +223,10 @@ class SyncIntegrationTest { mDevice.waitNotNull(Until.findObjects(By.text("Save")), TestAssetHelper.waitingTime) mDevice.waitNotNull(Until.findObjects(By.text("Settings")), TestAssetHelper.waitingTime) - // Wait until the Settings shows the account synced + /* Wait until the Settings shows the account synced */ mDevice.waitNotNull(Until.findObjects(By.text("Account")), TestAssetHelper.waitingTime) + mDevice.waitNotNull(Until.findObjects(By.res("org.mozilla.fenix.debug:id/email")), TestAssetHelper.waitingTime) + TestAssetHelper.waitingTime // Go to Homescreen mDevice.pressBack() }