diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/TextSelectionTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/TextSelectionTest.kt index aca9eb2ecc74..f4cda34c62c4 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/TextSelectionTest.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/TextSelectionTest.kt @@ -71,7 +71,6 @@ class TextSelectionTest : TestSetup() { longClickPageObject(itemContainingText("content")) clickContextMenuItem("Copy") }.openNavigationToolbar { - openEditURLView() } searchScreen { @@ -170,7 +169,6 @@ class TextSelectionTest : TestSetup() { longClickPageObject(itemContainingText("Crossing")) clickContextMenuItem("Copy") }.openNavigationToolbar { - openEditURLView() } searchScreen { diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt index d552809bf020..64000f24a512 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/BrowserRobot.kt @@ -1503,7 +1503,7 @@ fun longClickPageObject(item: UiObject) { fun clickContextMenuItem(item: String) { mDevice.waitNotNull( Until.findObject(text(item)), - waitingTime, + waitingTimeShort, ) Log.i(TAG, "clickContextMenuItem: Trying to click context menu item: $item") mDevice.findObject(text(item)).click() diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt index 5f0157400c17..a6bfdcaf87e5 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt @@ -304,13 +304,6 @@ class SearchRobot { } fun longClickToolbar() { - Log.i(TAG, "longClickToolbar: Waiting for $waitingTime ms for $packageName window to be updated") - mDevice.waitForWindowUpdate(packageName, waitingTime) - Log.i(TAG, "longClickToolbar: Waited for $waitingTime ms for $packageName window to be updated") - Log.i(TAG, "longClickToolbar: Waiting for $waitingTime ms for the awesome bar to exist") - mDevice.findObject(UiSelector().resourceId("$packageName:id/awesomeBar")) - .waitForExists(waitingTime) - Log.i(TAG, "longClickToolbar: Waited for $waitingTime ms for the awesome bar to exist") Log.i(TAG, "longClickToolbar: Waiting for $waitingTime ms for the toolbar to exist") mDevice.findObject(UiSelector().resourceId("$packageName:id/toolbar")) .waitForExists(waitingTime) @@ -321,9 +314,9 @@ class SearchRobot { } fun clickPasteText() { - Log.i(TAG, "clickPasteText: Waiting for $waitingTime ms for the \"Paste\" option to exist") - mDevice.findObject(UiSelector().textContains("Paste")).waitForExists(waitingTime) - Log.i(TAG, "clickPasteText: Waited for $waitingTime ms for the \"Paste\" option to exist") + Log.i(TAG, "clickPasteText: Waiting for $waitingTimeShort ms for the \"Paste\" option to exist") + mDevice.findObject(UiSelector().textContains("Paste")).waitForExists(waitingTimeShort) + Log.i(TAG, "clickPasteText: Waited for $waitingTimeShort ms for the \"Paste\" option to exist") Log.i(TAG, "clickPasteText: Trying to click the \"Paste\" button") mDevice.findObject(By.textContains("Paste")).click() Log.i(TAG, "clickPasteText: Clicked the \"Paste\" button") @@ -336,6 +329,7 @@ class SearchRobot { assertUIObjectExists( itemWithResIdAndText("$packageName:id/mozac_browser_toolbar_edit_url_view", expectedText), exists = exists, + waitingTime = waitingTimeShort, ) fun verifySearchBarPosition(bottomPosition: Boolean) {