From a7d2b386e3c767eb3157d45c3e0bd544baedcbb4 Mon Sep 17 00:00:00 2001 From: sv-ohorvath Date: Fri, 3 Jun 2022 15:53:44 +0300 Subject: [PATCH] run #3 fix2 --- .../java/org/mozilla/fenix/ui/robots/SearchRobot.kt | 12 +++++++----- automation/taskcluster/androidTest/flank-x86.yml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt index 6bbabb1c1162..4dba634ba880 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SearchRobot.kt @@ -24,6 +24,8 @@ import androidx.test.espresso.ViewInteraction import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.closeSoftKeyboard import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.intent.Intents +import androidx.test.espresso.intent.matcher.IntentMatchers import androidx.test.espresso.matcher.ViewMatchers import androidx.test.espresso.matcher.ViewMatchers.withContentDescription import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility @@ -48,7 +50,7 @@ import org.mozilla.fenix.helpers.Constants.LONG_CLICK_DURATION import org.mozilla.fenix.helpers.SessionLoadedIdlingResource import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort -import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens +import org.mozilla.fenix.helpers.TestHelper.isPackageInstalled import org.mozilla.fenix.helpers.TestHelper.packageName import org.mozilla.fenix.helpers.TestHelper.waitForObjects import org.mozilla.fenix.helpers.click @@ -92,10 +94,10 @@ class SearchRobot { // mDevice.waitNotNull( // Until.findObject(By.pkg(PackageName.GOOGLE_QUICK_SEARCH)), waitingTime // ) - assertNativeAppOpens(Constants.PackageName.GOOGLE_QUICK_SEARCH, "") -// if (TestHelper.isPackageInstalled(Constants.PackageName.GOOGLE_QUICK_SEARCH)) { -// Intents.intended(IntentMatchers.hasAction("android.speech.action.RECOGNIZE_SPEECH")) -// } + // assertNativeAppOpens(Constants.PackageName.GOOGLE_QUICK_SEARCH, "") + if (isPackageInstalled(Constants.PackageName.GOOGLE_QUICK_SEARCH)) { + Intents.intended(IntentMatchers.hasAction("android.speech.action.RECOGNIZE_SPEECH")) + } } } diff --git a/automation/taskcluster/androidTest/flank-x86.yml b/automation/taskcluster/androidTest/flank-x86.yml index c1f85d55b8a9..b0d80408196d 100644 --- a/automation/taskcluster/androidTest/flank-x86.yml +++ b/automation/taskcluster/androidTest/flank-x86.yml @@ -54,7 +54,7 @@ flank: max-test-shards: -1 # num-test-runs: the amount of times to run the tests. # 1 runs the tests once. 10 runs all the tests 10x - num-test-runs: 100 + num-test-runs: 110 ### Output Style flag ## Output style of execution status. May be one of [verbose, multi, single, compact]. ## For runs with only one test execution the default value is 'verbose', in other cases