mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] No issue: Fix recent UI test breakage (https://github.com/mozilla-mobile/fenix/pull/12869)
This commit is contained in:
parent
0d37525151
commit
f0f972a053
@ -366,7 +366,7 @@ class BrowserRobot {
|
||||
}
|
||||
|
||||
fun openNavigationToolbar(interact: NavigationToolbarRobot.() -> Unit): NavigationToolbarRobot.Transition {
|
||||
|
||||
mDevice.waitForIdle(waitingTime)
|
||||
navURLBar().click()
|
||||
|
||||
NavigationToolbarRobot().interact()
|
||||
|
@ -29,6 +29,8 @@ import androidx.test.uiautomator.UiDevice
|
||||
import androidx.test.uiautomator.Until
|
||||
import androidx.test.uiautomator.Until.findObject
|
||||
import org.hamcrest.CoreMatchers.allOf
|
||||
import org.hamcrest.CoreMatchers.anyOf
|
||||
import org.hamcrest.CoreMatchers.containsString
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
||||
@ -179,10 +181,21 @@ private fun tabMediaControlButton() = onView(withId(R.id.play_pause_button))
|
||||
|
||||
private fun closeTabButton() = onView(withId(R.id.mozac_browser_tabstray_close))
|
||||
private fun assertCloseTabsButton(title: String) =
|
||||
onView(allOf(withId(R.id.mozac_browser_tabstray_close), withContentDescription("Close tab $title")))
|
||||
onView(
|
||||
allOf(
|
||||
withId(R.id.mozac_browser_tabstray_close),
|
||||
withContentDescription("Close tab $title")
|
||||
)
|
||||
)
|
||||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
||||
|
||||
private fun normalBrowsingButton() = onView(withContentDescription("Open tabs"))
|
||||
private fun normalBrowsingButton() = onView(
|
||||
anyOf(
|
||||
withContentDescription(containsString("open tabs. Tap to switch tabs.")),
|
||||
withContentDescription(containsString("open tab. Tap to switch tabs."))
|
||||
)
|
||||
)
|
||||
|
||||
private fun privateBrowsingButton() = onView(withContentDescription("Private tabs"))
|
||||
private fun newTabButton() = onView(withId(R.id.new_tab_button))
|
||||
private fun threeDotMenu() = onView(withId(R.id.tab_tray_overflow))
|
||||
|
Loading…
Reference in New Issue
Block a user