From 03c4ea21082b5a9935167bfa911017101d820d12 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 28 Mar 2024 22:44:23 +0000 Subject: [PATCH] Bug 1888285 - Fix org.mozilla.fenix.ui.PwaTest UI tests r=android-reviewers,Roger,ohorvath,aaronmt Regressed from Bug 1885563 which removed the notification dot and changed the menu item name from "Install" to "Add to Home screen" Differential Revision: https://phabricator.services.mozilla.com/D205973 --- .../fenix/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt | 3 --- .../java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt index 6ce798c2fee1..d9ac033a9c37 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/PwaTest.kt @@ -37,7 +37,6 @@ class PwaTest : TestSetup() { navigationToolbar { }.enterURLAndEnterToBrowser(externalLinksPWAPage.toUri()) { waitForPageToLoad() - verifyNotificationDotOnMainMenu() }.openThreeDotMenu { }.clickInstall { clickAddAutomaticallyButton() @@ -56,7 +55,6 @@ class PwaTest : TestSetup() { navigationToolbar { }.enterURLAndEnterToBrowser(externalLinksPWAPage.toUri()) { waitForPageToLoad() - verifyNotificationDotOnMainMenu() }.openThreeDotMenu { }.clickInstall { clickAddAutomaticallyButton() @@ -77,7 +75,6 @@ class PwaTest : TestSetup() { navigationToolbar { }.enterURLAndEnterToBrowser(pwaPage.toUri()) { - verifyNotificationDotOnMainMenu() }.openThreeDotMenu { }.clickInstall { clickAddAutomaticallyButton() diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt index 89978b092259..acbcf804c36f 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt @@ -688,7 +688,8 @@ private fun readerViewAppearanceToggle() = private fun removeFromShortcutsButton() = onView(allOf(withText(R.string.browser_menu_remove_from_shortcuts))) -private fun installPWAButton() = mDevice.findObject(UiSelector().text("Install")) +private fun installPWAButton() = + itemContainingText(getStringResource(R.string.browser_menu_add_to_homescreen)) private fun openInAppButton() = onView( -- 2.11.4.GIT