diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/TextureViewReopenTest.kt')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/TextureViewReopenTest.kt | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/TextureViewReopenTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/TextureViewReopenTest.kt index cd139ccc40..490f279b29 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/TextureViewReopenTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/maps/TextureViewReopenTest.kt @@ -10,9 +10,6 @@ import org.hamcrest.MatcherAssert.assertThat import org.junit.Before import org.junit.Test import org.junit.runner.RunWith -import java.lang.Thread.sleep -import android.support.test.uiautomator.UiSelector -import android.support.test.uiautomator.UiScrollable private const val BASIC_SAMPLE_PACKAGE = "com.mapbox.mapboxsdk.testapp" private const val LAUNCH_TIMEOUT = 5000L @@ -61,17 +58,13 @@ class TextureViewReopenTest { @Test fun reopenTextureViewDebugActivity() { - // return to home screen - device.pressHome() - // press recent apps button device.pressRecentApps() - // click to reopen app - device.findObject(UiSelector().description("Mapbox Android SDK TestApp")).click() + // return to app + device.findObject(UiSelector().text(InstrumentationRegistry.getTargetContext().getString(InstrumentationRegistry.getTargetContext().applicationInfo.labelRes))).click() // wait for idle device.waitForIdle(LAUNCH_TIMEOUT) - sleep(LAUNCH_TIMEOUT) } }
\ No newline at end of file |