|
|
|
@ -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
|
|
|
|
@ -43,11 +45,13 @@ import org.junit.Assert.assertEquals
|
|
|
|
|
import org.junit.Assert.assertFalse
|
|
|
|
|
import org.junit.Assert.assertTrue
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.LONG_CLICK_DURATION
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.PackageName
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.SPEECH_RECOGNITION
|
|
|
|
|
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.isPackageInstalled
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.packageName
|
|
|
|
|
import org.mozilla.fenix.helpers.TestHelper.waitForObjects
|
|
|
|
|
import org.mozilla.fenix.helpers.click
|
|
|
|
@ -88,9 +92,9 @@ class SearchRobot {
|
|
|
|
|
allowPermission.click()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mDevice.waitNotNull(
|
|
|
|
|
Until.findObject(By.pkg(PackageName.GOOGLE_QUICK_SEARCH)), waitingTime
|
|
|
|
|
)
|
|
|
|
|
if (isPackageInstalled(Constants.PackageName.GOOGLE_QUICK_SEARCH)) {
|
|
|
|
|
Intents.intended(IntentMatchers.hasAction(SPEECH_RECOGNITION))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|