2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Bug 1821993 - Fix SearchTest#scanButtonDenyPermissionTest

This commit is contained in:
oana.horvath 2023-05-05 14:00:08 +03:00 committed by mergify[bot]
parent 4c7fd23d06
commit c3cf484b8a
3 changed files with 3 additions and 15 deletions

View File

@ -76,7 +76,6 @@ import org.mozilla.fenix.utils.IntentUtils
import org.mozilla.gecko.util.ThreadUtils
import java.io.File
import java.util.Locale
import java.util.regex.Pattern
object TestHelper {
@ -363,19 +362,8 @@ object TestHelper {
// Permission deny dialogs differ on various Android APIs
fun denyPermission() {
if (Build.VERSION.SDK_INT >= 23) {
mDevice.findObject(
By.text(
when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.R -> Pattern.compile(
"DENY",
Pattern.CASE_INSENSITIVE,
)
else -> Pattern.compile("Deny", Pattern.CASE_INSENSITIVE)
},
),
).click()
}
mDevice.findObject(UiSelector().textContains("Deny")).waitForExists(waitingTime)
mDevice.findObject(UiSelector().textContains("Deny")).click()
}
fun isTestLab(): Boolean {

View File

@ -93,7 +93,6 @@ class SearchTest {
}
}
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1821993")
@SmokeTest
@Test
fun scanButtonDenyPermissionTest() {

View File

@ -570,6 +570,7 @@ class HomeScreenRobot {
fun openSearch(interact: SearchRobot.() -> Unit): SearchRobot.Transition {
navigationToolbar.waitForExists(waitingTime)
navigationToolbar.click()
mDevice.waitForIdle()
SearchRobot().interact()
return SearchRobot.Transition()