Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/espresso/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 0.2.1+1

* Aligns Dart and Flutter SDK constraints.
* Changes the severity of `javac` warnings so that they are treated as errors and fixes the violations.

## 0.2.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private <T> T performInternal(FlutterAction<T> flutterAction) {
"The action cannot be null. You must specify an action to perform on the matched"
+ " Flutter widget.");
FlutterViewAction<T> flutterViewAction =
new FlutterViewAction(
new FlutterViewAction<>(
widgetMatcher, flutterAction, okHttpClient, idGenerator, taskExecutor);
onView(flutterViewMatcher).perform(flutterViewAction);
T result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import android.os.Looper;
import android.view.View;
import androidx.test.annotation.Beta;
import androidx.test.annotation.ExperimentalTestApi;
import androidx.test.espresso.IdlingRegistry;
import androidx.test.espresso.IdlingResource;
import androidx.test.espresso.UiController;
Expand Down Expand Up @@ -47,7 +47,7 @@
* <p>This class acts as a bridge to perform {@code WidgetAction} on a Flutter widget on the given
* {@code FlutterView}.
*/
@Beta
@ExperimentalTestApi
public final class FlutterViewAction<T> implements ViewAction {

private static final String FLUTTER_IDLE_TASK_NAME = "flutterIdlingResource";
Expand Down Expand Up @@ -105,7 +105,7 @@ public void perform(UiController uiController, View flutterView) {
// The url {@code FlutterNativeView} returns is the http url that the Dart VM Observatory http
// server serves at. Need to convert to the one that the WebSocket uses.
URI dartVmServiceProtocolUrl =
DartVmServiceUtil.getServiceProtocolUri(FlutterJNI.getObservatoryUri());
DartVmServiceUtil.getServiceProtocolUri(FlutterJNI.getVMServiceUri());
String isolateId = DartVmServiceUtil.getDartIsolateId(flutterView);
final FlutterTestingProtocol flutterTestingProtocol =
new DartVmService(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package androidx.test.espresso.flutter.action;

import android.view.View;
import androidx.test.annotation.Beta;
import androidx.test.annotation.ExperimentalTestApi;
import androidx.test.espresso.UiController;
import androidx.test.espresso.flutter.api.FlutterTestingProtocol;
import androidx.test.espresso.flutter.api.SyntheticAction;
Expand All @@ -21,7 +21,7 @@
* <p>Note, this is not a real click gesture event issued from Android system. Espresso delegates to
* Flutter engine to perform the {@link SyntheticClick} action.
*/
@Beta
@ExperimentalTestApi
public final class SyntheticClickAction implements WidgetAction {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
public final class AmbiguousWidgetMatcherException extends RuntimeException
implements EspressoException {

private static final long serialVersionUID = 9000L;

public AmbiguousWidgetMatcherException(String message) {
super(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
public final class InvalidFlutterViewException extends RuntimeException
implements EspressoException {

private static final long serialVersionUID = 9001L;

/** Constructs with an error message. */
public InvalidFlutterViewException(String message) {
super(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* hierarchy.
*/
public final class NoMatchingWidgetException extends RuntimeException implements EspressoException {
private static final long serialVersionUID = 9002L;

public NoMatchingWidgetException(String message) {
super(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/** Represents an exception/error relevant to Dart VM service. */
public final class FlutterProtocolException extends RuntimeException {
private static final long serialVersionUID = 8999L;

public FlutterProtocolException(String message) {
super(message);
Expand Down
4 changes: 1 addition & 3 deletions packages/espresso/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ task clean(type: Delete) {
gradle.projectsEvaluated {
project(":espresso") {
tasks.withType(JavaCompile) {
// TODO(stuartmorgan): Enable this. See
// https://github.com/flutter/flutter/issues/91868
//options.compilerArgs << "-Xlint:all" << "-Werror"
options.compilerArgs << "-Xlint:all" << "-Werror"
}
}
}
2 changes: 1 addition & 1 deletion packages/espresso/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso.
Allows driving Flutter widgets from a native Espresso test.
repository: https://github.com/flutter/packages/tree/main/packages/espresso
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22
version: 0.2.1
version: 0.2.1+1

environment:
sdk: ">=2.17.0 <3.0.0"
Expand Down