From 92bf0b66d24669272c3edfe28a9dc43d7fcab3dc Mon Sep 17 00:00:00 2001 From: Aaron Train Date: Mon, 14 Feb 2022 10:42:12 -0500 Subject: [PATCH] For #6347 - Upgrade Espresso libraries for API 30 (#6348) * For #6347 - Upgrade Espresso libraries for API 30 misc: fixes * fix: more fixes fix: ktlint detekt fix: notification tray * fix: reportSiteIssue fix add RetryTestRule fix: add RetryTestRule to DownloadFileTest fix: Add more Retry rules fix: more RetryTestRule fix: DownloadFileTest tweak fix: DownloadFileTest try: swipeUp in DownloadNotificationTest fix: ktlint * fix: add RetryTestRule to MultitaskingTest Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- app/build.gradle | 13 ++-- .../focus/activity/AddToHomescreenTest.kt | 9 ++- .../mozilla/focus/activity/CustomTabTest.kt | 8 ++- .../focus/activity/DownloadFileTest.kt | 20 +++--- .../EnhancedTrackingProtectionSettingsTest.kt | 32 ++++++++-- .../focus/activity/EraseBrowsingDataTest.kt | 6 ++ .../focus/activity/MultitaskingTest.kt | 5 ++ .../org/mozilla/focus/activity/SearchTest.kt | 4 +- .../focus/activity/ShareWebsiteTest.kt | 4 +- .../focus/activity/ThreeDotMainMenuTest.kt | 7 ++- .../focus/activity/robots/BrowserRobot.kt | 32 +++++----- .../focus/activity/robots/CustomTabRobot.kt | 2 +- .../focus/activity/robots/DownloadRobot.kt | 7 +-- .../activity/robots/NotificationRobot.kt | 61 +++++++++---------- .../focus/activity/robots/SearchRobot.kt | 7 +-- .../robots/SettingsGeneralMenuRobot.kt | 4 +- .../robots/SettingsMozillaMenuRobot.kt | 7 +-- .../robots/SiteSecurityInfoSheetRobot.kt | 6 +- .../activity/robots/ThreeDotMainMenuRobot.kt | 26 +++++--- .../focus/helpers/MainActivityTestRule.kt | 2 + .../mozilla/focus/helpers/RetryTestRule.kt | 44 +++++++++++++ .../org/mozilla/focus/helpers/TestHelper.kt | 1 - .../SessionLoadedIdlingResource.kt | 8 ++- .../focus/screenshots/FirstRunScreenshots.kt | 2 + .../screenshots/HomeScreenScreenshots.kt | 2 + .../focus/screenshots/SettingsScreenshots.kt | 2 + .../androidTest/flank-x86-beta.yml | 4 +- .../androidTest/flank-x86-start-test.yml | 4 +- .../taskcluster/androidTest/flank-x86.yml | 4 +- build.gradle | 2 +- 30 files changed, 226 insertions(+), 109 deletions(-) create mode 100644 app/src/androidTest/java/org/mozilla/focus/helpers/RetryTestRule.kt diff --git a/app/build.gradle b/app/build.gradle index fa8d9f237fc..8e48ed6cd5f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -303,13 +303,16 @@ dependencies { exclude group: 'com.android.support', module: 'design' exclude group: 'com.android.support', module: 'recyclerview-v7' } - testImplementation 'androidx.test:core:1.2.0' - testImplementation 'androidx.test:runner:1.2.0' - testImplementation 'androidx.test:rules:1.2.0' + testImplementation 'androidx.test:core:1.4.0' + testImplementation 'androidx.test:runner:1.4.0' + testImplementation 'androidx.test:rules:1.4.0' + androidTestImplementation 'androidx.test:core-ktx:1.4.0' + androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.3' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestUtil 'androidx.test:orchestrator:1.2.0' + androidTestImplementation 'androidx.test:runner:1.4.0' + androidTestUtil 'androidx.test:orchestrator:1.4.1' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' } diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/AddToHomescreenTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/AddToHomescreenTest.kt index a6e49e81e3e..9c6e48e40fe 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/AddToHomescreenTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/AddToHomescreenTest.kt @@ -14,8 +14,9 @@ import org.junit.runner.RunWith import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule +import org.mozilla.focus.helpers.RetryTestRule import org.mozilla.focus.helpers.TestHelper.readTestAsset -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime +import org.mozilla.focus.helpers.TestHelper.waitingTime import org.mozilla.focus.testAnnotations.SmokeTest import java.io.IOException @@ -30,6 +31,10 @@ class AddToHomescreenTest { @get: Rule var mActivityTestRule = MainActivityFirstrunTestRule(showFirstRun = false) + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) + @Before fun setup() { webServer = MockWebServer() @@ -64,7 +69,7 @@ class AddToHomescreenTest { // Open website, and click 'Add to homescreen' searchScreen { }.loadPage(pageUrl) { - progressBar.waitUntilGone(webPageLoadwaitingTime) + progressBar.waitUntilGone(waitingTime) }.openThreeDotMenu { }.openAddToHSDialog { addShortcutWithTitle(pageTitle) diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/CustomTabTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/CustomTabTest.kt index 78e97a20c2d..9720ee9857a 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/CustomTabTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/CustomTabTest.kt @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +@file:Suppress("DEPRECATION") + package org.mozilla.focus.activity import android.app.PendingIntent @@ -32,7 +34,7 @@ import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.TestHelper.createMockResponseFromAsset import org.mozilla.focus.helpers.TestHelper.mDevice -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime +import org.mozilla.focus.helpers.TestHelper.waitingTime import org.mozilla.focus.testAnnotations.SmokeTest import org.mozilla.focus.utils.IntentUtils import java.io.IOException @@ -76,7 +78,7 @@ class CustomTabTest { val customTabActivity = launchActivity(createCustomTabIntent(customTabPage)) browserScreen { - progressBar.waitUntilGone(webPageLoadwaitingTime) + progressBar.waitUntilGone(waitingTime) verifyPageContent(TEST_PAGE_HEADER_TEXT) verifyPageURL(customTabPage) } @@ -113,7 +115,7 @@ class CustomTabTest { launchActivity(createCustomTabIntent(customTabPage)) customTab { - progressBar.waitUntilGone(webPageLoadwaitingTime) + progressBar.waitUntilGone(waitingTime) verifyPageURL(customTabPage) openCustomTabMenu() clickOpenInFocusButton() diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/DownloadFileTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/DownloadFileTest.kt index 532be0f4191..5eb7c524854 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/DownloadFileTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/DownloadFileTest.kt @@ -5,7 +5,6 @@ package org.mozilla.focus.activity import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.rule.GrantPermissionRule import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import org.junit.After @@ -14,10 +13,12 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.mozilla.focus.activity.robots.downloadRobot +import org.mozilla.focus.activity.robots.notificationTray import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.helpers.DeleteFilesHelper.deleteFileUsingDisplayName import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityIntentsTestRule +import org.mozilla.focus.helpers.RetryTestRule import org.mozilla.focus.helpers.TestHelper import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.readTestAsset @@ -34,11 +35,9 @@ class DownloadFileTest { @get:Rule var mActivityTestRule = MainActivityIntentsTestRule(showFirstRun = false) - @get:Rule - var mGrantPermissions = GrantPermissionRule.grant( - android.Manifest.permission.WRITE_EXTERNAL_STORAGE, - android.Manifest.permission.READ_EXTERNAL_STORAGE - ) + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) @Before fun setUp() { @@ -90,6 +89,11 @@ class DownloadFileTest { val downloadPageUrl = webServer.url("").toString() val downloadFileName = "download.jpg" + notificationTray { + mDevice.openNotification() + clearNotifications() + } + // Load website with service worker searchScreen { }.loadPage(downloadPageUrl) { } @@ -104,7 +108,9 @@ class DownloadFileTest { clickDownloadButton() verifySnackBarText("finished") mDevice.openNotification() - verifyDownloadNotification() + notificationTray { + verifyDownloadNotification("Download completed", downloadFileName) + } } } diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/EnhancedTrackingProtectionSettingsTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/EnhancedTrackingProtectionSettingsTest.kt index f7f76881a3f..e5a4a261d4e 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/EnhancedTrackingProtectionSettingsTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/EnhancedTrackingProtectionSettingsTest.kt @@ -16,10 +16,11 @@ import org.mozilla.focus.activity.robots.homeScreen import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule +import org.mozilla.focus.helpers.RetryTestRule import org.mozilla.focus.helpers.TestHelper.createMockResponseFromAsset import org.mozilla.focus.helpers.TestHelper.exitToBrowser import org.mozilla.focus.helpers.TestHelper.exitToTop -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime +import org.mozilla.focus.helpers.TestHelper.waitingTime import org.mozilla.focus.testAnnotations.SmokeTest import java.io.IOException @@ -31,6 +32,10 @@ class EnhancedTrackingProtectionSettingsTest { @get: Rule var mActivityTestRule = MainActivityFirstrunTestRule(showFirstRun = false) + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) + @Before fun setUp() { featureSettingsHelper.setShieldIconCFREnabled(false) @@ -263,12 +268,19 @@ class EnhancedTrackingProtectionSettingsTest { @Test fun addURLToTPExceptionsListTest() { webServer.enqueue(createMockResponseFromAsset("plain_test.html")) + webServer.enqueue(createMockResponseFromAsset("etpPages/otherTrackers.html")) val genericPage = webServer.url("plain_test.html").toString() + val trackingPage = webServer.url("etpPages/otherTrackers.html").toString() searchScreen { }.loadPage(genericPage) { + verifyPageContent("focus test page") + }.openSearchBar { + }.loadPage(trackingPage) { + verifyPageContent("Tracker Blocking") }.openSiteSecurityInfoSheet { }.clickTrackingProtectionSwitch { + progressBar.waitUntilGone(waitingTime) }.openMainMenu { }.openSettings { }.openPrivacySettingsMenu { @@ -281,13 +293,19 @@ class EnhancedTrackingProtectionSettingsTest { @Test fun removeOneExceptionURLTest() { webServer.enqueue(createMockResponseFromAsset("plain_test.html")) + webServer.enqueue(createMockResponseFromAsset("etpPages/otherTrackers.html")) val genericPage = webServer.url("plain_test.html").toString() + val trackingPage = webServer.url("etpPages/otherTrackers.html").toString() searchScreen { }.loadPage(genericPage) { + verifyPageContent("focus test page") + }.openSearchBar { + }.loadPage(trackingPage) { + verifyPageContent("Tracker Blocking") }.openSiteSecurityInfoSheet { }.clickTrackingProtectionSwitch { - progressBar.waitUntilGone(webPageLoadwaitingTime) + progressBar.waitUntilGone(waitingTime) }.openMainMenu { }.openSettings { }.openPrivacySettingsMenu { @@ -306,19 +324,25 @@ class EnhancedTrackingProtectionSettingsTest { @Test fun removeAllExceptionURLTest() { webServer.enqueue(createMockResponseFromAsset("plain_test.html")) + webServer.enqueue(createMockResponseFromAsset("etpPages/otherTrackers.html")) val genericPage = webServer.url("plain_test.html").toString() + val trackingPage = webServer.url("etpPages/otherTrackers.html").toString() searchScreen { }.loadPage(genericPage) { + verifyPageContent("focus test page") + }.openSearchBar { + }.loadPage(trackingPage) { + verifyPageContent("Tracker Blocking") }.openSiteSecurityInfoSheet { }.clickTrackingProtectionSwitch { + progressBar.waitUntilGone(waitingTime) }.openMainMenu { }.openSettings { }.openPrivacySettingsMenu { openExceptionsList() removeAllExceptions() - // Failing due to: https://github.com/mozilla-mobile/focus-android/issues/5738 - // verifyExceptionsListDisabled() + verifyExceptionsListDisabled() exitToBrowser() } browserScreen { diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/EraseBrowsingDataTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/EraseBrowsingDataTest.kt index 19bb81f59f8..bb10a29d990 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/EraseBrowsingDataTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/EraseBrowsingDataTest.kt @@ -23,6 +23,7 @@ import org.mozilla.focus.activity.robots.notificationTray import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule +import org.mozilla.focus.helpers.RetryTestRule import org.mozilla.focus.helpers.TestHelper.getStringResource import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.pressHomeKey @@ -41,6 +42,10 @@ class EraseBrowsingDataTest { @get: Rule var mActivityTestRule = MainActivityFirstrunTestRule(showFirstRun = false) + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) + @Before fun setUp() { webServer = MockWebServer() @@ -142,6 +147,7 @@ class EraseBrowsingDataTest { mDevice.openNotification() notificationTray { verifySystemNotificationExists(getStringResource(R.string.notification_erase_text)) + expandEraseBrowsingNotification() }.clickNotificationMessage { // Wait for launcher assertThat(launcherPackage, IsNull.notNullValue()) diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/MultitaskingTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/MultitaskingTest.kt index 14a515aff56..214836c3422 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/MultitaskingTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/MultitaskingTest.kt @@ -18,6 +18,7 @@ import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.ext.components import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule +import org.mozilla.focus.helpers.RetryTestRule import org.mozilla.focus.helpers.TestHelper.clickSnackBarActionButton import org.mozilla.focus.helpers.TestHelper.createMockResponseFromAsset import org.mozilla.focus.helpers.TestHelper.getStringResource @@ -40,6 +41,10 @@ class MultitaskingTest { @get: Rule var mActivityTestRule = MainActivityFirstrunTestRule(showFirstRun = false) + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) + @Before @Throws(Exception::class) fun startWebServer() { diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/SearchTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/SearchTest.kt index f663a28840e..8d29c3a3949 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/SearchTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/SearchTest.kt @@ -15,7 +15,7 @@ import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule import org.mozilla.focus.helpers.TestHelper.exitToTop import org.mozilla.focus.helpers.TestHelper.pressEnterKey -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime +import org.mozilla.focus.helpers.TestHelper.waitingTime import org.mozilla.focus.testAnnotations.SmokeTest // This test checks the search engine can be changed and that search suggestions appear @@ -123,7 +123,7 @@ class SearchTest { } browserScreen { verifyPageContent(searchString) - progressBar.waitUntilGone(webPageLoadwaitingTime) + progressBar.waitUntilGone(waitingTime) }.openSearchBar { // Tap URL bar, check it displays search term (instead of URL) verifySearchEditBarContainsText(searchString) diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/ShareWebsiteTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/ShareWebsiteTest.kt index d49e3ceb66e..f8d6fb67f1f 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/ShareWebsiteTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/ShareWebsiteTest.kt @@ -16,7 +16,7 @@ import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.readTestAsset -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime +import org.mozilla.focus.helpers.TestHelper.waitingTime import org.mozilla.focus.testAnnotations.SmokeTest import java.io.IOException @@ -60,7 +60,7 @@ class ShareWebsiteTest { /* Go to a webpage */ searchScreen { }.loadPage(webServer.url("").toString()) { - progressBar.waitUntilGone(webPageLoadwaitingTime) + progressBar.waitUntilGone(waitingTime) }.openMainMenu { }.openShareScreen { verifyShareAppsListOpened() diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/ThreeDotMainMenuTest.kt b/app/src/androidTest/java/org/mozilla/focus/activity/ThreeDotMainMenuTest.kt index d1116867d66..7af3e1a5219 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/ThreeDotMainMenuTest.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/ThreeDotMainMenuTest.kt @@ -12,6 +12,7 @@ import org.mozilla.focus.activity.robots.homeScreen import org.mozilla.focus.activity.robots.searchScreen import org.mozilla.focus.helpers.FeatureSettingsHelper import org.mozilla.focus.helpers.MainActivityFirstrunTestRule +import org.mozilla.focus.helpers.RetryTestRule import org.mozilla.focus.helpers.TestHelper import org.mozilla.focus.testAnnotations.SmokeTest @@ -25,6 +26,10 @@ class ThreeDotMainMenuTest { @get: Rule val mActivityTestRule = MainActivityFirstrunTestRule(showFirstRun = false) + @Rule + @JvmField + val retryTestRule = RetryTestRule(3) + @Before fun startWebServer() { webServer = MockWebServer() @@ -59,7 +64,7 @@ class ThreeDotMainMenuTest { verifyPageContent("Tab 1") }.openMainMenu { verifyShareButtonExists() - verifyAddToHSButtonExists() + verifyAddToHomeButtonExists() verifyFindInPageExists() verifyOpenInButtonExists() verifyRequestDesktopSiteExists() diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/BrowserRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/BrowserRobot.kt index d3cf1385c2e..b2f04a53c9f 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/BrowserRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/BrowserRobot.kt @@ -16,14 +16,15 @@ import androidx.test.espresso.matcher.ViewMatchers.withContentDescription import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withParentIndex import androidx.test.espresso.matcher.ViewMatchers.withText +import androidx.test.uiautomator.By import androidx.test.uiautomator.UiSelector +import androidx.test.uiautomator.Until import org.hamcrest.Matchers.allOf import org.junit.Assert.assertTrue import org.mozilla.focus.R import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.packageName import org.mozilla.focus.helpers.TestHelper.waitingTime -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime import org.mozilla.focus.idlingResources.SessionLoadedIdlingResource class BrowserRobot { @@ -36,27 +37,28 @@ class BrowserRobot { fun verifyBrowserView() = assertTrue( mDevice.findObject(UiSelector().resourceId("$packageName:id/engineView")) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) fun verifyPageContent(expectedText: String) { val sessionLoadedIdlingResource = SessionLoadedIdlingResource() mDevice.findObject(UiSelector().resourceId("$packageName:id/engineView")) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) runWithIdleRes(sessionLoadedIdlingResource) { assertTrue( mDevice.findObject(UiSelector().textContains(expectedText)) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) } } fun verifyTrackingProtectionAlert(expectedText: String) { + mDevice.wait(Until.findObject(By.textContains(expectedText)), waitingTime) assertTrue( mDevice.findObject(UiSelector().textContains(expectedText)) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) // close the JavaScript alert mDevice.pressBack() @@ -65,12 +67,12 @@ class BrowserRobot { fun verifyPageURL(expectedText: String) { val sessionLoadedIdlingResource = SessionLoadedIdlingResource() - browserURLbar.waitForExists(webPageLoadwaitingTime) + browserURLbar.waitForExists(waitingTime) runWithIdleRes(sessionLoadedIdlingResource) { assertTrue( mDevice.findObject(UiSelector().textContains(expectedText)) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) } } @@ -84,7 +86,7 @@ class BrowserRobot { fun longPressLink(linkText: String) { val link = mDevice.findObject(UiSelector().text(linkText)) - link.waitForExists(webPageLoadwaitingTime) + link.waitForExists(waitingTime) link.longClick() } @@ -118,30 +120,30 @@ class BrowserRobot { fun selectTab(tabTitle: String): ViewInteraction = onView(withText(tabTitle)).perform(click()) fun verifyShareAppsListOpened() = - assertTrue(shareAppsList.waitForExists(webPageLoadwaitingTime)) + assertTrue(shareAppsList.waitForExists(waitingTime)) fun clickPlayButton() { val playButton = mDevice.findObject(UiSelector().text("Play")) - playButton.waitForExists(webPageLoadwaitingTime) + playButton.waitForExists(waitingTime) playButton.click() } fun clickPauseButton() { val pauseButton = mDevice.findObject(UiSelector().text("Pause")) - pauseButton.waitForExists(webPageLoadwaitingTime) + pauseButton.waitForExists(waitingTime) pauseButton.click() } fun waitForPlaybackToStart() { val playStateMessage = mDevice.findObject(UiSelector().text("Media file is playing")) - assertTrue(playStateMessage.waitForExists(webPageLoadwaitingTime)) + assertTrue(playStateMessage.waitForExists(waitingTime)) } fun verifyPlaybackStopped() { val playStateMessage = mDevice.findObject(UiSelector().text("Media file is paused")) - assertTrue(playStateMessage.waitForExists(webPageLoadwaitingTime)) + assertTrue(playStateMessage.waitForExists(waitingTime)) } fun dismissMediaPlayingAlert() { @@ -161,7 +163,7 @@ class BrowserRobot { class Transition { fun openSearchBar(interact: SearchRobot.() -> Unit): SearchRobot.Transition { - browserURLbar.waitForExists(webPageLoadwaitingTime) + browserURLbar.waitForExists(waitingTime) browserURLbar.click() SearchRobot().interact() @@ -178,7 +180,7 @@ class BrowserRobot { } fun openMainMenu(interact: ThreeDotMainMenuRobot.() -> Unit): ThreeDotMainMenuRobot.Transition { - browserURLbar.waitForExists(webPageLoadwaitingTime) + browserURLbar.waitForExists(waitingTime) mainMenu .check(matches(isDisplayed())) .perform(click()) diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/CustomTabRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/CustomTabRobot.kt index 6d9ba526c01..a5b2b8a9e17 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/CustomTabRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/CustomTabRobot.kt @@ -66,7 +66,7 @@ class CustomTabRobot { fun verifyPageURL(expectedText: String) { val sessionLoadedIdlingResource = SessionLoadedIdlingResource() - customTabUrl.waitForExists(TestHelper.webPageLoadwaitingTime) + customTabUrl.waitForExists(TestHelper.waitingTime) runWithIdleRes(sessionLoadedIdlingResource) { assertTrue( diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/DownloadRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/DownloadRobot.kt index 1490ff90c18..d142e7553c1 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/DownloadRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/DownloadRobot.kt @@ -16,7 +16,6 @@ import org.mozilla.focus.helpers.TestHelper.isPackageInstalled import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.packageName import org.mozilla.focus.helpers.TestHelper.waitingTime -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime import org.mozilla.focus.idlingResources.SessionLoadedIdlingResource class DownloadRobot { @@ -29,14 +28,12 @@ class DownloadRobot { fun verifyDownloadDialogGone() = assertTrue(downloadDialogTitle.waitUntilGone(waitingTime)) - fun verifyDownloadNotification() = NotificationRobot().verifySystemNotificationExists(downloadNotificationText) - fun verifyPhotosOpens() = assertPhotosOpens() fun clickDownloadIconAsset() { val sessionLoadedIdlingResource = SessionLoadedIdlingResource() runWithIdleRes(sessionLoadedIdlingResource) { - downloadIconAsset.waitForExists(webPageLoadwaitingTime) + downloadIconAsset.waitForExists(waitingTime) downloadIconAsset.click() } } @@ -54,7 +51,7 @@ class DownloadRobot { fun openDownloadedFile() { val snackBarButton = mDevice.findObject(UiSelector().resourceId("$packageName:id/snackbar_action")) snackBarButton.waitForExists(waitingTime) - snackBarButton.clickAndWaitForNewWindow(webPageLoadwaitingTime) + snackBarButton.clickAndWaitForNewWindow(waitingTime) } class Transition diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/NotificationRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/NotificationRobot.kt index 99346d47abd..ffab2b87bc4 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/NotificationRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/NotificationRobot.kt @@ -4,10 +4,10 @@ package org.mozilla.focus.activity.robots -import android.util.Log -import androidx.test.uiautomator.UiObjectNotFoundException +import androidx.test.uiautomator.By import androidx.test.uiautomator.UiScrollable import androidx.test.uiautomator.UiSelector +import androidx.test.uiautomator.Until import org.junit.Assert.assertTrue import org.mozilla.focus.R import org.mozilla.focus.helpers.TestHelper.appName @@ -17,6 +17,8 @@ import org.mozilla.focus.helpers.TestHelper.waitingTime class NotificationRobot { + private val NOTIFICATION_SHADE = "com.android.systemui:id/notification_stack_scroller" + fun clearNotifications() { if (clearButton.exists()) { clearButton.click() @@ -31,39 +33,34 @@ class NotificationRobot { } fun expandEraseBrowsingNotification() { - val PINCH_PERCENT = 50 - val PINCH_STEPS = 5 - - if (!notificationEraseAndOpenButton.waitForExists(waitingTime)) { - if (!notificationTray.ensureFullyVisible(notificationHeader)) { - eraseBrowsingNotification.pinchOut( - PINCH_PERCENT, - PINCH_STEPS - ) - } else { - notificationHeader.click() - } - notificationTray.ensureFullyVisible(notificationEraseAndOpenButton) - assertTrue(notificationEraseAndOpenButton.exists()) - } + notificationHeader.click() } fun verifySystemNotificationExists(notificationMessage: String) { - var notificationFound = false - - do { - try { - notificationFound = notificationTray.getChildByText( - UiSelector().text(notificationMessage), notificationMessage, true - ).waitForExists(waitingTime) - assertTrue(notificationFound) - } catch (e: UiObjectNotFoundException) { - Log.d("TestLog", e.message.toString()) - // scrolls down the notifications until it reaches the end, then it will close - notificationTray.scrollForward() - mDevice.waitForIdle() - } - } while (!notificationFound) + val notificationInTray = mDevice.wait( + Until.hasObject( + By.res(NOTIFICATION_SHADE).hasDescendant( + By.text(notificationMessage) + ) + ), + waitingTime + ) + + assertTrue(notificationInTray) + } + + fun verifyDownloadNotification(notificationMessage: String, fileName: String) { + val notification = UiSelector().text(notificationMessage) + var notificationFound = mDevice.findObject(notification).waitForExists(waitingTime) + val downloadFilename = mDevice.findObject(UiSelector().text(fileName)) + + while (!notificationFound) { + notificationTray.swipeUp(2) + notificationFound = mDevice.findObject(notification).waitForExists(waitingTime) + } + + assertTrue(notificationFound) + assertTrue(downloadFilename.exists()) } class Transition { diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SearchRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SearchRobot.kt index 0b2704888a8..4609f732a44 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SearchRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SearchRobot.kt @@ -16,7 +16,6 @@ import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.packageName import org.mozilla.focus.helpers.TestHelper.pressEnterKey import org.mozilla.focus.helpers.TestHelper.waitingTime -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime import org.mozilla.focus.idlingResources.SessionLoadedIdlingResource class SearchRobot { @@ -74,11 +73,11 @@ class SearchRobot { runWithIdleRes(sessionLoadedIdlingResource) { assertTrue( - BrowserRobot().progressBar.waitUntilGone(webPageLoadwaitingTime) + BrowserRobot().progressBar.waitUntilGone(waitingTime) ) assertTrue( - geckoEngineView.waitForExists(webPageLoadwaitingTime) || - trackingProtectionDialog.waitForExists(webPageLoadwaitingTime) + geckoEngineView.waitForExists(waitingTime) || + trackingProtectionDialog.waitForExists(waitingTime) ) } diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsGeneralMenuRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsGeneralMenuRobot.kt index ff5d0d3f83c..c83560c9766 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsGeneralMenuRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsGeneralMenuRobot.kt @@ -24,7 +24,7 @@ import org.mozilla.focus.helpers.TestHelper.waitingTime class SettingsGeneralMenuRobot { companion object { - const val DEFAULT_APPS_SETTINGS_ACTION = "android.settings.MANAGE_DEFAULT_APPS_SETTINGS" + const val ACTION_REQUEST_ROLE = "android.app.role.action.REQUEST_ROLE" } fun verifyGeneralSettingsItems() { @@ -39,7 +39,7 @@ class SettingsGeneralMenuRobot { } fun verifyAndroidDefaultAppsMenuAppears() { - intended(IntentMatchers.hasAction(DEFAULT_APPS_SETTINGS_ACTION)) + intended(IntentMatchers.hasAction(ACTION_REQUEST_ROLE)) } fun verifyOpenWithDialog() { diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsMozillaMenuRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsMozillaMenuRobot.kt index c1f812392df..c7d650e5b47 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsMozillaMenuRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SettingsMozillaMenuRobot.kt @@ -17,7 +17,6 @@ import org.mozilla.focus.helpers.TestHelper import org.mozilla.focus.helpers.TestHelper.appName import org.mozilla.focus.helpers.TestHelper.mDevice import org.mozilla.focus.helpers.TestHelper.waitingTime -import org.mozilla.focus.helpers.TestHelper.webPageLoadwaitingTime import org.mozilla.focus.idlingResources.SessionLoadedIdlingResource class SettingsMozillaMenuRobot { @@ -48,19 +47,19 @@ class SettingsMozillaMenuRobot { assertTrue( "Expected app version number not found", mDevice.findObject(UiSelector().textContains(versionName)) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) assertTrue( "Expected GV version not found", mDevice.findObject(UiSelector().textContains(gvVersion)) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) assertTrue( "Expected GV build ID not found", mDevice.findObject(UiSelector().textContains(gvBuildId)) - .waitForExists(webPageLoadwaitingTime) + .waitForExists(waitingTime) ) } } diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SiteSecurityInfoSheetRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SiteSecurityInfoSheetRobot.kt index 82aa0dc634d..67346a1bf26 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/SiteSecurityInfoSheetRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/SiteSecurityInfoSheetRobot.kt @@ -6,6 +6,7 @@ package org.mozilla.focus.activity.robots import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.matcher.RootMatchers.isDialog import androidx.test.espresso.matcher.ViewMatchers.hasSibling import androidx.test.espresso.matcher.ViewMatchers.isChecked import androidx.test.espresso.matcher.ViewMatchers.isDisplayed @@ -67,7 +68,6 @@ private val site_identity_Icon = onView(withId(R.id.site_favicon)) private val trackingProtectionSwitch = onView( allOf( - withId(R.id.switch_widget), - hasSibling(withText("Enhanced Tracking Protection")) + withId(R.id.switch_widget), hasSibling(withText("Enhanced Tracking Protection")) ) - ) + ).inRoot(isDialog()) diff --git a/app/src/androidTest/java/org/mozilla/focus/activity/robots/ThreeDotMainMenuRobot.kt b/app/src/androidTest/java/org/mozilla/focus/activity/robots/ThreeDotMainMenuRobot.kt index dcda472d33a..317b9c6058e 100644 --- a/app/src/androidTest/java/org/mozilla/focus/activity/robots/ThreeDotMainMenuRobot.kt +++ b/app/src/androidTest/java/org/mozilla/focus/activity/robots/ThreeDotMainMenuRobot.kt @@ -11,7 +11,9 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility import androidx.test.espresso.matcher.ViewMatchers.withSubstring import androidx.test.espresso.matcher.ViewMatchers.withText +import androidx.test.uiautomator.By import androidx.test.uiautomator.UiSelector +import androidx.test.uiautomator.Until import junit.framework.TestCase.assertTrue import org.hamcrest.Matchers.allOf import org.mozilla.focus.R @@ -24,7 +26,7 @@ class ThreeDotMainMenuRobot { fun verifyShareButtonExists() = assertTrue(shareBtn.exists()) - fun verifyAddToHSButtonExists() = assertTrue(addToHSmenuItem.exists()) + fun verifyAddToHomeButtonExists() = assertTrue(addToHomeButton.exists()) fun verifyFindInPageExists() = findInPageButton.check(matches(isDisplayed())) @@ -34,7 +36,19 @@ class ThreeDotMainMenuRobot { fun verifySettingsButtonExists() = settingsMenuButton().check(matches(isDisplayed())) - fun verifyReportSiteIssueButtonExists() = reportSiteIssueButton.check(matches(isDisplayed())) + fun verifyReportSiteIssueButtonExists() { + // Report Site Issue lazily appears, so we need to wait + val reportSiteIssueButton = mDevice.wait( + Until.hasObject( + By.res("$packageName:id/mozac_browser_menu_menuView").hasDescendant( + By.text("Report Site Issue…") + ) + ), + waitingTime + ) + + assertTrue(reportSiteIssueButton) + } fun verifyHelpPageLinkExists() = helpPageMenuLink.check(matches(isDisplayed())) @@ -78,8 +92,8 @@ class ThreeDotMainMenuRobot { } fun openAddToHSDialog(interact: AddToHomeScreenRobot.() -> Unit): AddToHomeScreenRobot.Transition { - addToHSmenuItem.waitForExists(waitingTime) - addToHSmenuItem.click() + addToHomeButton.waitForExists(waitingTime) + addToHomeButton.click() AddToHomeScreenRobot().interact() return AddToHomeScreenRobot.Transition() @@ -106,7 +120,7 @@ private val shareBtn = mDevice.findObject( .description("Share…") ) -private val addToHSmenuItem = mDevice.findObject( +private val addToHomeButton = mDevice.findObject( UiSelector() .text("Add to Home screen") ) @@ -131,5 +145,3 @@ private val openWithList = mDevice.findObject( ) private val requestDesktopSiteButton = onView(withSubstring("Desktop site")) - -private val reportSiteIssueButton = onView(withText("Report Site Issue…")) diff --git a/app/src/androidTest/java/org/mozilla/focus/helpers/MainActivityTestRule.kt b/app/src/androidTest/java/org/mozilla/focus/helpers/MainActivityTestRule.kt index da9cd2a90b3..29d6aea13b1 100644 --- a/app/src/androidTest/java/org/mozilla/focus/helpers/MainActivityTestRule.kt +++ b/app/src/androidTest/java/org/mozilla/focus/helpers/MainActivityTestRule.kt @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +@file:Suppress("DEPRECATION") + package org.mozilla.focus.helpers import android.view.ViewConfiguration.getLongPressTimeout diff --git a/app/src/androidTest/java/org/mozilla/focus/helpers/RetryTestRule.kt b/app/src/androidTest/java/org/mozilla/focus/helpers/RetryTestRule.kt new file mode 100644 index 00000000000..e854df24966 --- /dev/null +++ b/app/src/androidTest/java/org/mozilla/focus/helpers/RetryTestRule.kt @@ -0,0 +1,44 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.focus.helpers + +import androidx.test.espresso.NoMatchingViewException +import androidx.test.uiautomator.UiObjectNotFoundException +import org.junit.rules.TestRule +import org.junit.runner.Description +import org.junit.runners.model.Statement +import java.lang.AssertionError + +class RetryTestRule(private val retryCount: Int = 5) : TestRule { + + override fun apply(base: Statement, description: Description): Statement { + return statement { + for (i in 1..retryCount) { + try { + base.evaluate() + break + } catch (t: AssertionError) { + if (i == retryCount) { + throw t + } + } catch (t: UiObjectNotFoundException) { + if (i == retryCount) { + throw t + } + } catch (t: NoMatchingViewException) { + if (i == retryCount) { + throw t + } + } + } + } + } + + private inline fun statement(crossinline eval: () -> Unit): Statement { + return object : Statement() { + override fun evaluate() = eval() + } + } +} diff --git a/app/src/androidTest/java/org/mozilla/focus/helpers/TestHelper.kt b/app/src/androidTest/java/org/mozilla/focus/helpers/TestHelper.kt index 27aa6aea55b..177da2e502a 100644 --- a/app/src/androidTest/java/org/mozilla/focus/helpers/TestHelper.kt +++ b/app/src/androidTest/java/org/mozilla/focus/helpers/TestHelper.kt @@ -40,7 +40,6 @@ object TestHelper { @JvmField var mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) const val waitingTime = DateUtils.SECOND_IN_MILLIS * 15 - const val webPageLoadwaitingTime = DateUtils.SECOND_IN_MILLIS * 15 @JvmStatic val appContext: Context = InstrumentationRegistry.getInstrumentation().targetContext diff --git a/app/src/androidTest/java/org/mozilla/focus/idlingResources/SessionLoadedIdlingResource.kt b/app/src/androidTest/java/org/mozilla/focus/idlingResources/SessionLoadedIdlingResource.kt index 5ec80dc99d2..63cb622f0d2 100644 --- a/app/src/androidTest/java/org/mozilla/focus/idlingResources/SessionLoadedIdlingResource.kt +++ b/app/src/androidTest/java/org/mozilla/focus/idlingResources/SessionLoadedIdlingResource.kt @@ -27,8 +27,12 @@ class SessionLoadedIdlingResource : IdlingResource { return if (tab?.content?.loading == true) { false } else { - invokeCallback() - true + if (tab?.content?.progress == 100) { + invokeCallback() + true + } else { + false + } } } diff --git a/app/src/androidTest/java/org/mozilla/focus/screenshots/FirstRunScreenshots.kt b/app/src/androidTest/java/org/mozilla/focus/screenshots/FirstRunScreenshots.kt index 3ef63638f3c..af3fd6d0165 100644 --- a/app/src/androidTest/java/org/mozilla/focus/screenshots/FirstRunScreenshots.kt +++ b/app/src/androidTest/java/org/mozilla/focus/screenshots/FirstRunScreenshots.kt @@ -1,6 +1,8 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +@file:Suppress("DEPRECATION") + package org.mozilla.focus.screenshots import android.os.SystemClock diff --git a/app/src/androidTest/java/org/mozilla/focus/screenshots/HomeScreenScreenshots.kt b/app/src/androidTest/java/org/mozilla/focus/screenshots/HomeScreenScreenshots.kt index e7d4152aa8e..1aae33db65a 100644 --- a/app/src/androidTest/java/org/mozilla/focus/screenshots/HomeScreenScreenshots.kt +++ b/app/src/androidTest/java/org/mozilla/focus/screenshots/HomeScreenScreenshots.kt @@ -1,6 +1,8 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +@file:Suppress("DEPRECATION") + package org.mozilla.focus.screenshots import android.os.SystemClock diff --git a/app/src/androidTest/java/org/mozilla/focus/screenshots/SettingsScreenshots.kt b/app/src/androidTest/java/org/mozilla/focus/screenshots/SettingsScreenshots.kt index 3caf7cbd95c..cf051b0f4c9 100644 --- a/app/src/androidTest/java/org/mozilla/focus/screenshots/SettingsScreenshots.kt +++ b/app/src/androidTest/java/org/mozilla/focus/screenshots/SettingsScreenshots.kt @@ -1,6 +1,8 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +@file:Suppress("DEPRECATION") + package org.mozilla.focus.screenshots import android.os.SystemClock diff --git a/automation/taskcluster/androidTest/flank-x86-beta.yml b/automation/taskcluster/androidTest/flank-x86-beta.yml index bdea532cffa..622983ecc15 100644 --- a/automation/taskcluster/androidTest/flank-x86-beta.yml +++ b/automation/taskcluster/androidTest/flank-x86-beta.yml @@ -42,8 +42,8 @@ gcloud: - class org.mozilla.focus.activity.EraseBrowsingDataTest#deleteHistoryOnRestartTest device: - - model: Pixel2 - version: 28 + - model: Pixel3 + version: 30 flank: project: GOOGLE_PROJECT diff --git a/automation/taskcluster/androidTest/flank-x86-start-test.yml b/automation/taskcluster/androidTest/flank-x86-start-test.yml index bdea532cffa..622983ecc15 100644 --- a/automation/taskcluster/androidTest/flank-x86-start-test.yml +++ b/automation/taskcluster/androidTest/flank-x86-start-test.yml @@ -42,8 +42,8 @@ gcloud: - class org.mozilla.focus.activity.EraseBrowsingDataTest#deleteHistoryOnRestartTest device: - - model: Pixel2 - version: 28 + - model: Pixel3 + version: 30 flank: project: GOOGLE_PROJECT diff --git a/automation/taskcluster/androidTest/flank-x86.yml b/automation/taskcluster/androidTest/flank-x86.yml index 4a7a7eafdc6..13ed3c85d35 100644 --- a/automation/taskcluster/androidTest/flank-x86.yml +++ b/automation/taskcluster/androidTest/flank-x86.yml @@ -42,8 +42,8 @@ gcloud: - package org.mozilla.focus.privacy device: - - model: Pixel2 - version: 28 + - model: Pixel3 + version: 30 flank: project: GOOGLE_PROJECT diff --git a/build.gradle b/build.gradle index 380efa067cb..61322d23e01 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ import org.mozilla.focus.gradle.tasks.GithubDetailsTask buildscript { - ext.espresso_version = '3.1.0-alpha4' + ext.espresso_version = '3.4.0' ext.coroutines_version = '1.4.2' ext.jna_version = "5.6.0" // Pinning the last working version of the service-telemetry component until we decide