[android] fix naming for re-open tests
This commit is contained in:
committed by
Ivo van Dongen
parent
4b8cff5b15
commit
7c874ab815
@@ -11,8 +11,6 @@ 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
|
||||
@@ -50,21 +48,19 @@ class GLSurfaceViewReopenTest {
|
||||
LAUNCH_TIMEOUT
|
||||
)
|
||||
|
||||
// open TextureView debug activity
|
||||
val appView = UiScrollable(UiSelector().scrollable(true))
|
||||
appView.scrollIntoView(UiSelector().text("TextureView debug"))
|
||||
device.findObject(UiSelector().text("TextureView debug")).clickAndWaitForNewWindow()
|
||||
// open SimpleMapActivity
|
||||
device.findObject(UiSelector().text("Simple Map")).clickAndWaitForNewWindow()
|
||||
|
||||
// wait for idle
|
||||
device.waitForIdle(LAUNCH_TIMEOUT)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun reopenTextureViewDebugActivity() {
|
||||
fun reopenSimpleMapActivity() {
|
||||
// return to home screen
|
||||
device.pressHome()
|
||||
|
||||
// press recent apps button
|
||||
// press recents apps button
|
||||
device.pressRecentApps()
|
||||
|
||||
// click to reopen app
|
||||
|
||||
@@ -11,6 +11,8 @@ 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
|
||||
@@ -48,19 +50,21 @@ class TextureViewReopenTest {
|
||||
LAUNCH_TIMEOUT
|
||||
)
|
||||
|
||||
// open SimpleMapActivity
|
||||
device.findObject(UiSelector().text("Simple Map")).clickAndWaitForNewWindow()
|
||||
// open TextureView debug activity
|
||||
val appView = UiScrollable(UiSelector().scrollable(true))
|
||||
appView.scrollIntoView(UiSelector().text("TextureView debug"))
|
||||
device.findObject(UiSelector().text("TextureView debug")).clickAndWaitForNewWindow()
|
||||
|
||||
// wait for idle
|
||||
device.waitForIdle(LAUNCH_TIMEOUT)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun reopenSimpleMapActivity() {
|
||||
fun reopenTextureViewDebugActivity() {
|
||||
// return to home screen
|
||||
device.pressHome()
|
||||
|
||||
// press recents apps button
|
||||
// press recent apps button
|
||||
device.pressRecentApps()
|
||||
|
||||
// click to reopen app
|
||||
|
||||
Reference in New Issue
Block a user