[android] - add config file for excluding generated tests, refactor generation script output
This commit is contained in:
@@ -49,8 +49,9 @@ public abstract class BaseActivityTest {
|
||||
throw new RuntimeException("Could not start test for " + getActivityClass().getSimpleName() + ".\n"
|
||||
+ "The ViewHierarchy doesn't contain a view with resource id = R.id.mapView or \n"
|
||||
+ "the Activity doesn't contain an instance variable with a name equal to mapboxMap.\n"
|
||||
+ "You can resolve this issue be implementing the requirements above or\n add "
|
||||
+ getActivityClass().getSimpleName() + " to the excludeActivities array in `generate-test-code.js`.\n");
|
||||
+ "You can resolve this issue by adding the requirements above or\n add "
|
||||
+ getActivityClass().getSimpleName() + " to the platform/android/scripts/exclude-activity-gen.json to blacklist"
|
||||
+ " the Activity from being generated.\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,8 +68,7 @@ public abstract class BaseActivityTest {
|
||||
protected abstract Class getActivityClass();
|
||||
|
||||
protected void checkViewIsDisplayed(int id) {
|
||||
onView(withId(id))
|
||||
.check(matches(isDisplayed()));
|
||||
onView(withId(id)).check(matches(isDisplayed()));
|
||||
}
|
||||
|
||||
protected void waitLoop() {
|
||||
|
||||
@@ -13,10 +13,8 @@ public class OnMapReadyIdlingResource implements IdlingResource, OnMapReadyCallb
|
||||
|
||||
private MapboxMap mapboxMap;
|
||||
private IdlingResource.ResourceCallback resourceCallback;
|
||||
private Activity activity;
|
||||
|
||||
public OnMapReadyIdlingResource(Activity activity) {
|
||||
this.activity = activity;
|
||||
try {
|
||||
Field field = activity.getClass().getDeclaredField("mapView");
|
||||
field.setAccessible(true);
|
||||
@@ -24,7 +22,6 @@ public class OnMapReadyIdlingResource implements IdlingResource, OnMapReadyCallb
|
||||
} catch (Exception err) {
|
||||
throw new RuntimeException(err);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,4 +50,4 @@ public class OnMapReadyIdlingResource implements IdlingResource, OnMapReadyCallb
|
||||
resourceCallback.onTransitionToIdle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user