diff --git a/packages/espresso/CHANGELOG.md b/packages/espresso/CHANGELOG.md index ef94d473802cf..e8508198a3fea 100644 --- a/packages/espresso/CHANGELOG.md +++ b/packages/espresso/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.4.0 + +* Updates androidx.test.espresso version to 3.6.1. +* Updates androidx.test to 1.6.1. +* Removes androidx.test.annotation.ExperimentalTestApi. + ## 0.3.0+10 * Removes additional references to v1 Android embedding. diff --git a/packages/espresso/README.md b/packages/espresso/README.md index 95c72e3344234..0e0d7880a9dca 100644 --- a/packages/espresso/README.md +++ b/packages/espresso/README.md @@ -19,9 +19,9 @@ Add the following dependencies in android/app/build.gradle: ```groovy dependencies { testImplementation 'junit:junit:4.13.2' - testImplementation "com.google.truth:truth:1.0" - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + testImplementation "com.google.truth:truth:1.1.3" + androidTestImplementation 'androidx.test:runner:1.6.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' api 'androidx.test:core:1.2.0' } ``` diff --git a/packages/espresso/android/build.gradle b/packages/espresso/android/build.gradle index 18f4f6bb2e9ea..f7abde12f81af 100644 --- a/packages/espresso/android/build.gradle +++ b/packages/espresso/android/build.gradle @@ -67,34 +67,33 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation "com.google.truth:truth:1.1.3" - api 'androidx.test:runner:1.1.1' - api 'androidx.test.espresso:espresso-core:3.5.1' + api 'androidx.test.espresso:espresso-core:3.6.1' // Core library - api 'androidx.test:core:1.0.0' + api 'androidx.test:core:1.6.1' // AndroidJUnitRunner and JUnit Rules - api 'androidx.test:runner:1.1.0' - api 'androidx.test:rules:1.1.0' + api 'androidx.test:runner:1.6.1' + api 'androidx.test:rules:1.6.1' // Assertions - api 'androidx.test.ext:junit:1.1.5' - api 'androidx.test.ext:truth:1.5.0' + api 'androidx.test.ext:junit:1.2.1' + api 'androidx.test.ext:truth:1.6.0' api 'com.google.truth:truth:1.1.3' // Espresso dependencies - api 'androidx.test.espresso:espresso-core:3.5.1' - api 'androidx.test.espresso:espresso-contrib:3.5.1' - api 'androidx.test.espresso:espresso-intents:3.5.1' - api 'androidx.test.espresso:espresso-accessibility:3.5.1' - api 'androidx.test.espresso:espresso-web:3.5.1' - api 'androidx.test.espresso.idling:idling-concurrent:3.5.1' + api 'androidx.test.espresso:espresso-core:3.6.1' + api 'androidx.test.espresso:espresso-contrib:3.6.1' + api 'androidx.test.espresso:espresso-intents:3.6.1' + api 'androidx.test.espresso:espresso-accessibility:3.6.1' + api 'androidx.test.espresso:espresso-web:3.6.1' + api 'androidx.test.espresso.idling:idling-concurrent:3.6.1' // The following Espresso dependency can be either "implementation" // or "androidTestImplementation", depending on whether you want the // dependency to appear on your APK's compile classpath or the test APK // classpath. - api 'androidx.test.espresso:espresso-idling-resource:3.5.1' + api 'androidx.test.espresso:espresso-idling-resource:3.6.1' } diff --git a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/EspressoFlutter.java b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/EspressoFlutter.java index f8644a8e54880..d809d760c6bb8 100644 --- a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/EspressoFlutter.java +++ b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/EspressoFlutter.java @@ -12,7 +12,6 @@ import android.util.Log; import android.view.View; -import androidx.test.annotation.ExperimentalTestApi; import androidx.test.espresso.UiController; import androidx.test.espresso.ViewAction; import androidx.test.espresso.flutter.action.FlutterViewAction; @@ -100,7 +99,6 @@ private WidgetInteraction( * @param widgetActions one or more actions that shall be performed. Cannot be {@code null}. * @return this interaction for further perform/verification calls. */ - @ExperimentalTestApi() public WidgetInteraction perform(@Nonnull final WidgetAction... widgetActions) { checkNotNull(widgetActions); for (WidgetAction widgetAction : widgetActions) { @@ -117,7 +115,6 @@ public WidgetInteraction perform(@Nonnull final WidgetAction... widgetActions) { * @param assertion a widget assertion that shall be made on the matched Flutter widget. Cannot * be {@code null}. */ - @ExperimentalTestApi() public WidgetInteraction check(@Nonnull WidgetAssertion assertion) { checkNotNull( assertion, @@ -133,7 +130,6 @@ public WidgetInteraction check(@Nonnull WidgetAssertion assertion) { return this; } - @ExperimentalTestApi() @SuppressWarnings("unchecked") private T performInternal(FlutterAction flutterAction) { checkNotNull( diff --git a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterActions.java b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterActions.java index 1bc41f01fa60b..2f0c171e780d6 100644 --- a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterActions.java +++ b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterActions.java @@ -4,7 +4,6 @@ package androidx.test.espresso.flutter.action; -import androidx.test.annotation.ExperimentalTestApi; import androidx.test.espresso.flutter.api.WidgetAction; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -44,7 +43,6 @@ public static WidgetAction click() { * by directly injecting key events to the Android system. Uses this {@link #syntheticClick()} * only when there are special cases that {@link #click()} cannot handle properly. */ - @ExperimentalTestApi() public static WidgetAction syntheticClick() { return new SyntheticClickAction(); } diff --git a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java index d18ced4602689..ce7f49610275a 100644 --- a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java +++ b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java @@ -13,7 +13,6 @@ import android.os.Looper; import android.view.View; -import androidx.test.annotation.ExperimentalTestApi; import androidx.test.espresso.IdlingRegistry; import androidx.test.espresso.IdlingResource; import androidx.test.espresso.UiController; @@ -96,7 +95,6 @@ public String getDescription() { "Perform a %s action on the Flutter widget matched %s.", widgetAction, widgetMatcher); } - @ExperimentalTestApi @Override public void perform(UiController uiController, View view) { checkNotNull(view, "The Flutter View instance cannot be null."); @@ -143,7 +141,6 @@ public ListenableFuture apply(Void readyResult) { } } - @ExperimentalTestApi @VisibleForTesting void perform( View flutterView, FlutterTestingProtocol flutterTestingProtocol, UiController uiController) { diff --git a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java index 270d4e43b880d..54d7d80128470 100644 --- a/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java +++ b/packages/espresso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java @@ -5,7 +5,6 @@ package androidx.test.espresso.flutter.action; import android.view.View; -import androidx.test.annotation.ExperimentalTestApi; import androidx.test.espresso.UiController; import androidx.test.espresso.flutter.api.FlutterTestingProtocol; import androidx.test.espresso.flutter.api.SyntheticAction; @@ -23,7 +22,6 @@ */ public final class SyntheticClickAction implements WidgetAction { - @ExperimentalTestApi @Override public Future perform( @Nullable WidgetMatcher targetWidget, diff --git a/packages/espresso/example/android/app/build.gradle b/packages/espresso/example/android/app/build.gradle index 6deacadd65c64..be165715ca28a 100644 --- a/packages/espresso/example/android/app/build.gradle +++ b/packages/espresso/example/android/app/build.gradle @@ -32,7 +32,7 @@ android { defaultConfig { minSdkVersion flutter.minSdkVersion - targetSdkVersion 29 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -62,28 +62,28 @@ dependencies { implementation "androidx.multidex:multidex:2.0.1" // Core library - api 'androidx.test:core:1.2.0' + api 'androidx.test:core:1.6.1' // AndroidJUnitRunner and JUnit Rules - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test:rules:1.1.0' + androidTestImplementation 'androidx.test:runner:1.6.1' + androidTestImplementation 'androidx.test:rules:1.6.1' // Assertions - androidTestImplementation 'androidx.test.ext:junit:1.0.0' - androidTestImplementation 'androidx.test.ext:truth:1.0.0' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.ext:truth:1.6.0' androidTestImplementation 'com.google.truth:truth:1.1.3' // Espresso dependencies - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.0' - androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1' + androidTestImplementation 'androidx.test.espresso:espresso-intents:3.6.1' + androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.6.1' + androidTestImplementation 'androidx.test.espresso:espresso-web:3.6.1' + androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.6.1' // The following Espresso dependency can be either "implementation" // or "androidTestImplementation", depending on whether you want the // dependency to appear on your APK's compile classpath or the test APK // classpath. - androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.6.1' } diff --git a/packages/espresso/example/android/app/src/main/AndroidManifest.xml b/packages/espresso/example/android/app/src/main/AndroidManifest.xml index 0c7891fd04ef2..0ed1d9e02dbab 100644 --- a/packages/espresso/example/android/app/src/main/AndroidManifest.xml +++ b/packages/espresso/example/android/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ android:icon="@mipmap/ic_launcher">