blob: 9f4b7591b6aefde761fd30d00758541b876e3127 (
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
32
33
34
35
36
37
|
package com.mapbox.mapboxsdk.integration
import android.support.test.filters.LargeTest
import android.support.test.runner.AndroidJUnit4
import android.support.test.uiautomator.UiSelector
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
/**
* Regression test that validates MapFragment integration with a ViewPager
*/
@RunWith(AndroidJUnit4::class)
class ViewPagerScrollTest : BaseIntegrationTest() {
@Before
override fun beforeTest() {
super.beforeTest()
openFeature("ViewPager")
}
@Test
@LargeTest
fun scrollViewPager() {
for (i in 1..5) {
clickTab(i)
}
for (i in 4 downTo 0) {
clickTab(i)
}
}
private fun clickTab(index: Int) {
device.findObject(UiSelector().text("Page $index")).click()
}
}
|