File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
src/androidTest/java/com/algolia/instantsearch/voice/demo Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ dependencies {
3737 androidTestImplementation dependency_android. junit
3838 androidTestImplementation dependency_android. test_rules
3939 androidTestImplementation dependency_android. test_runner
40+ androidTestImplementation dependency_android. test_ext_junit
4041 androidTestImplementation dependency_android. espresso
4142
4243 debugImplementation dependency_android. leakcanary
Original file line number Diff line number Diff line change 11package com .algolia .instantsearch .voice .demo ;
22
33import android .Manifest ;
4+ import androidx .test .espresso .ViewInteraction ;
45import androidx .test .espresso .matcher .ViewMatchers ;
56import androidx .test .filters .LargeTest ;
67import androidx .test .rule .ActivityTestRule ;
@@ -57,8 +58,9 @@ public void clickInput_thenCancel_displaysError() {
5758 when_clickButtonVoice ();
5859
5960 // Then clicking on the mic button
60- onView (withId (R .id .microphone ))
61- .perform (click ());
61+ ViewInteraction viewInteraction = onView (withId (R .id .microphone ));
62+ viewInteraction .perform (click ());
63+ viewInteraction .perform (click ());
6264
6365 check_displaysError ();
6466 }
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ ext.with {
2222
2323 junit = ' 4.12'
2424 test = ' 1.3.0'
25+ testExt = ' 1.1.2'
2526
2627 voice = ' 1.+'
2728
@@ -40,6 +41,7 @@ ext.with {
4041 junit : " junit:junit:$junit " ,
4142 test_rules : " androidx.test:rules:$test " ,
4243 test_runner : " androidx.test:runner:$test " ,
44+ test_ext_junit : " androidx.test.ext:junit:$testExt " ,
4345 voice : " com.algolia.instantsearch:voice:$voice " ,
4446 leakcanary : " com.squareup.leakcanary:leakcanary-android:$leakcanary "
4547 ]
You can’t perform that action at this time.
0 commit comments