From c9ca6f01b58a1969fae118b5dbd183725f7a2ccf Mon Sep 17 00:00:00 2001 From: AndiAJ Date: Fri, 8 Oct 2021 11:42:34 +0300 Subject: [PATCH] Fix for ambiguous mozac_browser_tabstray_close and with content description --- .../org/mozilla/fenix/ui/robots/TabDrawerRobot.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt index 2271ce5025..1ad0e98939 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt @@ -375,13 +375,13 @@ private fun tabMediaControlButton() = onView(withId(R.id.play_pause_button)) private fun closeTabButton() = mDevice.findObject(UiSelector().resourceId("$packageName:id/mozac_browser_tabstray_close")) private fun assertCloseTabsButton(title: String) = - onView( - allOf( - withId(R.id.mozac_browser_tabstray_close), - withContentDescription("Close tab $title") - ) + assertTrue( + mDevice.findObject( + UiSelector() + .resourceId("$packageName:id/mozac_browser_tabstray_close") + .descriptionContains("Close tab $title") + ).waitForExists(waitingTime) ) - .check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) private fun normalBrowsingButton() = onView( anyOf(