Skip to content

Commit 007ec66

Browse files
authored
Update espresso dependencies (#7048)
- **Update espresso dependencies** fixes #151188
1 parent 0152717 commit 007ec66

File tree

10 files changed

+37
-42
lines changed

10 files changed

+37
-42
lines changed

packages/espresso/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.4.0
2+
3+
* Updates androidx.test.espresso version to 3.6.1.
4+
* Updates androidx.test to 1.6.1.
5+
* Removes androidx.test.annotation.ExperimentalTestApi.
6+
17
## 0.3.0+10
28

39
* Removes additional references to v1 Android embedding.

packages/espresso/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Add the following dependencies in android/app/build.gradle:
1919
```groovy
2020
dependencies {
2121
testImplementation 'junit:junit:4.13.2'
22-
testImplementation "com.google.truth:truth:1.0"
23-
androidTestImplementation 'androidx.test:runner:1.1.1'
24-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
22+
testImplementation "com.google.truth:truth:1.1.3"
23+
androidTestImplementation 'androidx.test:runner:1.6.1'
24+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
2525
api 'androidx.test:core:1.2.0'
2626
}
2727
```

packages/espresso/android/build.gradle

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,33 @@ dependencies {
6767

6868
testImplementation 'junit:junit:4.13.2'
6969
testImplementation "com.google.truth:truth:1.1.3"
70-
api 'androidx.test:runner:1.1.1'
71-
api 'androidx.test.espresso:espresso-core:3.5.1'
70+
api 'androidx.test.espresso:espresso-core:3.6.1'
7271

7372
// Core library
74-
api 'androidx.test:core:1.0.0'
73+
api 'androidx.test:core:1.6.1'
7574

7675
// AndroidJUnitRunner and JUnit Rules
77-
api 'androidx.test:runner:1.1.0'
78-
api 'androidx.test:rules:1.1.0'
76+
api 'androidx.test:runner:1.6.1'
77+
api 'androidx.test:rules:1.6.1'
7978

8079
// Assertions
81-
api 'androidx.test.ext:junit:1.1.5'
82-
api 'androidx.test.ext:truth:1.5.0'
80+
api 'androidx.test.ext:junit:1.2.1'
81+
api 'androidx.test.ext:truth:1.6.0'
8382
api 'com.google.truth:truth:1.1.3'
8483

8584
// Espresso dependencies
86-
api 'androidx.test.espresso:espresso-core:3.5.1'
87-
api 'androidx.test.espresso:espresso-contrib:3.5.1'
88-
api 'androidx.test.espresso:espresso-intents:3.5.1'
89-
api 'androidx.test.espresso:espresso-accessibility:3.5.1'
90-
api 'androidx.test.espresso:espresso-web:3.5.1'
91-
api 'androidx.test.espresso.idling:idling-concurrent:3.5.1'
85+
api 'androidx.test.espresso:espresso-core:3.6.1'
86+
api 'androidx.test.espresso:espresso-contrib:3.6.1'
87+
api 'androidx.test.espresso:espresso-intents:3.6.1'
88+
api 'androidx.test.espresso:espresso-accessibility:3.6.1'
89+
api 'androidx.test.espresso:espresso-web:3.6.1'
90+
api 'androidx.test.espresso.idling:idling-concurrent:3.6.1'
9291

9392
// The following Espresso dependency can be either "implementation"
9493
// or "androidTestImplementation", depending on whether you want the
9594
// dependency to appear on your APK's compile classpath or the test APK
9695
// classpath.
97-
api 'androidx.test.espresso:espresso-idling-resource:3.5.1'
96+
api 'androidx.test.espresso:espresso-idling-resource:3.6.1'
9897
}
9998

10099

packages/espresso/android/src/main/java/androidx/test/espresso/flutter/EspressoFlutter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import android.util.Log;
1414
import android.view.View;
15-
import androidx.test.annotation.ExperimentalTestApi;
1615
import androidx.test.espresso.UiController;
1716
import androidx.test.espresso.ViewAction;
1817
import androidx.test.espresso.flutter.action.FlutterViewAction;
@@ -100,7 +99,6 @@ private WidgetInteraction(
10099
* @param widgetActions one or more actions that shall be performed. Cannot be {@code null}.
101100
* @return this interaction for further perform/verification calls.
102101
*/
103-
@ExperimentalTestApi()
104102
public WidgetInteraction perform(@Nonnull final WidgetAction... widgetActions) {
105103
checkNotNull(widgetActions);
106104
for (WidgetAction widgetAction : widgetActions) {
@@ -117,7 +115,6 @@ public WidgetInteraction perform(@Nonnull final WidgetAction... widgetActions) {
117115
* @param assertion a widget assertion that shall be made on the matched Flutter widget. Cannot
118116
* be {@code null}.
119117
*/
120-
@ExperimentalTestApi()
121118
public WidgetInteraction check(@Nonnull WidgetAssertion assertion) {
122119
checkNotNull(
123120
assertion,
@@ -133,7 +130,6 @@ public WidgetInteraction check(@Nonnull WidgetAssertion assertion) {
133130
return this;
134131
}
135132

136-
@ExperimentalTestApi()
137133
@SuppressWarnings("unchecked")
138134
private <T> T performInternal(FlutterAction<T> flutterAction) {
139135
checkNotNull(

packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterActions.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
package androidx.test.espresso.flutter.action;
66

7-
import androidx.test.annotation.ExperimentalTestApi;
87
import androidx.test.espresso.flutter.api.WidgetAction;
98
import java.util.concurrent.ExecutorService;
109
import java.util.concurrent.Executors;
@@ -44,7 +43,6 @@ public static WidgetAction click() {
4443
* by directly injecting key events to the Android system. Uses this {@link #syntheticClick()}
4544
* only when there are special cases that {@link #click()} cannot handle properly.
4645
*/
47-
@ExperimentalTestApi()
4846
public static WidgetAction syntheticClick() {
4947
return new SyntheticClickAction();
5048
}

packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import android.os.Looper;
1515
import android.view.View;
16-
import androidx.test.annotation.ExperimentalTestApi;
1716
import androidx.test.espresso.IdlingRegistry;
1817
import androidx.test.espresso.IdlingResource;
1918
import androidx.test.espresso.UiController;
@@ -96,7 +95,6 @@ public String getDescription() {
9695
"Perform a %s action on the Flutter widget matched %s.", widgetAction, widgetMatcher);
9796
}
9897

99-
@ExperimentalTestApi
10098
@Override
10199
public void perform(UiController uiController, View view) {
102100
checkNotNull(view, "The Flutter View instance cannot be null.");
@@ -143,7 +141,6 @@ public ListenableFuture<Void> apply(Void readyResult) {
143141
}
144142
}
145143

146-
@ExperimentalTestApi
147144
@VisibleForTesting
148145
void perform(
149146
View flutterView, FlutterTestingProtocol flutterTestingProtocol, UiController uiController) {

packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package androidx.test.espresso.flutter.action;
66

77
import android.view.View;
8-
import androidx.test.annotation.ExperimentalTestApi;
98
import androidx.test.espresso.UiController;
109
import androidx.test.espresso.flutter.api.FlutterTestingProtocol;
1110
import androidx.test.espresso.flutter.api.SyntheticAction;
@@ -23,7 +22,6 @@
2322
*/
2423
public final class SyntheticClickAction implements WidgetAction {
2524

26-
@ExperimentalTestApi
2725
@Override
2826
public Future<Void> perform(
2927
@Nullable WidgetMatcher targetWidget,

packages/espresso/example/android/app/build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ android {
3232

3333
defaultConfig {
3434
minSdkVersion flutter.minSdkVersion
35-
targetSdkVersion 29
35+
targetSdkVersion 34
3636
versionCode flutterVersionCode.toInteger()
3737
versionName flutterVersionName
3838
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -62,28 +62,28 @@ dependencies {
6262
implementation "androidx.multidex:multidex:2.0.1"
6363

6464
// Core library
65-
api 'androidx.test:core:1.2.0'
65+
api 'androidx.test:core:1.6.1'
6666

6767
// AndroidJUnitRunner and JUnit Rules
68-
androidTestImplementation 'androidx.test:runner:1.2.0'
69-
androidTestImplementation 'androidx.test:rules:1.1.0'
68+
androidTestImplementation 'androidx.test:runner:1.6.1'
69+
androidTestImplementation 'androidx.test:rules:1.6.1'
7070

7171
// Assertions
72-
androidTestImplementation 'androidx.test.ext:junit:1.0.0'
73-
androidTestImplementation 'androidx.test.ext:truth:1.0.0'
72+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
73+
androidTestImplementation 'androidx.test.ext:truth:1.6.0'
7474
androidTestImplementation 'com.google.truth:truth:1.1.3'
7575

7676
// Espresso dependencies
77-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
78-
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
79-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
80-
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.1.0'
81-
androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.0'
82-
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.0'
77+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
78+
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1'
79+
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1'
80+
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.6.1'
81+
androidTestImplementation 'androidx.test.espresso:espresso-web:3.6.1'
82+
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.6.1'
8383

8484
// The following Espresso dependency can be either "implementation"
8585
// or "androidTestImplementation", depending on whether you want the
8686
// dependency to appear on your APK's compile classpath or the test APK
8787
// classpath.
88-
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
88+
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.6.1'
8989
}

packages/espresso/example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
android:icon="@mipmap/ic_launcher">
66
<activity
77
android:name=".MainActivity"
8+
android:exported="true"
89
android:launchMode="singleTop"
910
android:theme="@style/LaunchTheme"
1011
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"

packages/espresso/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso.
33
Allows driving Flutter widgets from a native Espresso test.
44
repository: https://github.com/flutter/packages/tree/main/packages/espresso
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22
6-
version: 0.3.0+10
6+
version: 0.4.0
77

88
environment:
99
sdk: ^3.4.0

0 commit comments

Comments
 (0)