summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/integration/QueryRenderedFeaturesBoxCountTest.kt
blob: e94d568e869bfca6f0cb27ab7b75e793b05e1ad6 (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
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.feature.QueryRenderedFeaturesBoxCountActivity
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

/**
 * Regression test that validates reopening an Activity and querying the map before surface recreation #14394
 */
@RunWith(AndroidJUnit4::class)
class QueryRenderedFeaturesBoxCountTest : BaseIntegrationTest() {

  @get:Rule
  var activityRule: ActivityTestRule<QueryRenderedFeaturesBoxCountActivity> =
    ActivityTestRule(QueryRenderedFeaturesBoxCountActivity::class.java)

  @Test
  @LargeTest
  fun reopenQueryRendererFeaturesActivity() {
    device.waitForIdle()
    device.pressHome()
    device.waitForIdle()
    device.launchActivity(activityRule.activity, QueryRenderedFeaturesBoxCountActivity::class.java)
    device.waitForIdle()
  }
}