diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2016-11-09 12:56:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-09 12:56:49 +0100 |
commit | 33aa14c939cec4b732151b2f864ad84e41cbacd3 (patch) | |
tree | ea3917fa1b7924f935e444775c47b3577a29a870 /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils | |
parent | 2411ec83b12fd2457f6f22fe5a4de9122503a2e2 (diff) | |
download | qtlocation-mapboxgl-33aa14c939cec4b732151b2f864ad84e41cbacd3.tar.gz |
[android] - instrumentation tests upgrade, move view checking to utility class, remove inheritance in runtime style test (#6803)
update gitignore for generated tests
add camera move test
add realtime geojson to be excluded when generating Activity sanity tests
by default show workaround for showing a MapView in a dialog
add annotation tests
remove older camera tests, introduce tests for move, ease and animate, bring back setLatLng and getLatLng on MapView, add tests for internal camera API.
compass view tests
add tests for attribution and logo.
fix annotation tests
Rename Actiivity test class, split up annotation tests, added MarkerView tests, added infowindow tests, added MyLocationView tests
fix addRemoveLayer test by integrating map interactions inside a ViewAction
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils')
2 files changed, 22 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/TestConstants.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/TestConstants.java new file mode 100644 index 0000000000..67556e49fb --- /dev/null +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/TestConstants.java @@ -0,0 +1,15 @@ +package com.mapbox.mapboxsdk.testapp.utils; + +public class TestConstants { + + public static final double LAT_LNG_DELTA_LARGE = 0.1; + public static final double LAT_LNG_DELTA = 0.01; + public static final double BEARING_DELTA = 0.1; + public static final double TILT_DELTA = 0.1; + public static final double ZOOM_DELTA = 0.1; + + public static final String TEXT_MARKER_TEXT = "Text"; + public static final String TEXT_MARKER_TITLE = "Marker"; + public static final String TEXT_MARKER_SNIPPET = "Snippet"; + +} diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/ViewUtils.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/ViewUtils.java index 01ee3e9b9f..188e75edc7 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/ViewUtils.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/utils/ViewUtils.java @@ -4,6 +4,8 @@ import android.support.annotation.IdRes; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; import static android.support.test.espresso.matcher.ViewMatchers.withId; public class ViewUtils { @@ -12,4 +14,9 @@ public class ViewUtils { onView(withId(viewRes)) .perform(click()); } + + public static void checkViewIsDisplayed(int id) { + onView(withId(id)) + .check(matches(isDisplayed())); + } } |