diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2019-03-22 09:37:21 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2019-03-25 15:22:29 +0100 |
commit | 7dea381161006e00b007ab01e491acc7166bd075 (patch) | |
tree | 6aec44f348d8876ca50f804bce1b951eb239a1d8 /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt | |
parent | e7c9d3ca55fc74cf0ca978b48797549d5a0a4812 (diff) | |
download | qtlocation-mapboxgl-7dea381161006e00b007ab01e491acc7166bd075.tar.gz |
[android] - revert onDismiss workaround, refactor tests, adress review
comments
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt index 07fea012eb..755c5fc560 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/GLSurfaceViewReopenTest.kt @@ -1,27 +1,29 @@ package com.mapbox.mapboxsdk.integration import android.support.test.filters.LargeTest +import android.support.test.rule.ActivityTestRule import android.support.test.runner.AndroidJUnit4 -import org.junit.Before +import com.mapbox.mapboxsdk.testapp.activity.maplayout.SimpleMapActivity +import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith + /** * Regression test that validates reopening an Activity with a GLSurfaceView */ @RunWith(AndroidJUnit4::class) class GLSurfaceViewReopenTest : BaseIntegrationTest() { - @Before - override fun beforeTest() { - super.beforeTest() - openFeature("Simple Map") - } + @get:Rule + var activityRule: ActivityTestRule<SimpleMapActivity> = ActivityTestRule(SimpleMapActivity::class.java) @Test @LargeTest fun reopenSimpleMapActivity() { - pressHomeReturnWithRecentApps() device.waitForIdle() + device.pressHome() + device.waitForIdle() + device.launchActivity(activityRule.activity.applicationContext, SimpleMapActivity::class.java) } -}
\ No newline at end of file +} |