summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-03-22 09:37:21 +0100
committerTobrun <tobrun@mapbox.com>2019-03-22 18:39:29 +0100
commitdcd6efd5b5c806c524095500ae1d832765816f47 (patch)
tree5ca8133a1b90552cdc71942529c73c3cad0e527c /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt
parent1e8622378db0e03561bd7528b37918079020eede (diff)
downloadqtlocation-mapboxgl-dcd6efd5b5c806c524095500ae1d832765816f47.tar.gz
[android] - revert onDismiss workaround, refactor tests, adress review
comments
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt17
1 files changed, 9 insertions, 8 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt
index 95f05566c3..945fac677e 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReuseTest.kt
@@ -1,8 +1,12 @@
package com.mapbox.mapboxsdk.integration
import android.support.test.filters.LargeTest
+import android.support.test.rule.ActivityTestRule
import android.support.test.runner.AndroidJUnit4
+import com.mapbox.mapboxsdk.testapp.activity.maplayout.GLSurfaceRecyclerViewActivity
+import com.mapbox.mapboxsdk.testapp.activity.maplayout.SimpleMapActivity
import org.junit.Before
+import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -12,19 +16,16 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class GLSurfaceViewReuseTest : BaseIntegrationTest() {
- @Before
- override fun beforeTest() {
- super.beforeTest()
- openFeature("RecyclerView GLSurfaceView")
- }
+ @get:Rule
+ var activityRule: ActivityTestRule<GLSurfaceRecyclerViewActivity> = ActivityTestRule(GLSurfaceRecyclerViewActivity::class.java)
@Test
@LargeTest
- fun scrollRecylerView() {
+ fun scrollRecyclerView() {
device.waitForIdle()
- scrollRecyclerViewTo("Twenty-one")
+ device.scrollRecyclerViewTo("Twenty-one")
device.waitForIdle()
- scrollRecyclerViewTo("One")
+ device.scrollRecyclerViewTo("One")
device.waitForIdle()
}
} \ No newline at end of file