blob: 5c3d66c462f4da93c8d7ca123a1702b38b8a7c29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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.TextureRecyclerViewActivity
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
/**
* Regression test that validates if a GLSurfaceView surface can be recreated without crashing.
*/
@RunWith(AndroidJUnit4::class)
class TextureViewReuseTest : BaseIntegrationTest() {
@get:Rule
var activityRule: ActivityTestRule<TextureRecyclerViewActivity> = ActivityTestRule(TextureRecyclerViewActivity::class.java)
@Test
@LargeTest
fun scrollRecyclerView() {
device.waitForIdle()
device.scrollRecyclerViewTo("Twenty-one")
device.waitForIdle()
device.scrollRecyclerViewTo("One")
device.waitForIdle()
}
}
|