[android] - add ktlint, optimise code for ktlint validation
This commit is contained in:
@@ -8,7 +8,6 @@ abstract class AppCenter {
|
||||
@get:Rule
|
||||
var reportHelper = Factory.getReportHelper()!!
|
||||
|
||||
|
||||
@After
|
||||
open fun afterTest() {
|
||||
reportHelper.label(javaClass.simpleName)
|
||||
|
||||
@@ -8,4 +8,4 @@ class InstrumentationRunner : AndroidJUnitRunner() {
|
||||
override fun newApplication(cl: ClassLoader?, className: String?, context: Context?): Application {
|
||||
return super.newApplication(cl, InstrumentationApplication::class.java.name, context)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,5 +140,4 @@ class CameraUpdateFactoryTest : BaseTest() {
|
||||
assertEquals("tilt should match:", 40.0, cameraPosition.tilt, 0.1)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import org.junit.Before
|
||||
|
||||
const val TIMEOUT_UI_SEARCH_WAIT = 5000L
|
||||
|
||||
abstract class BaseIntegrationTest : AppCenter(){
|
||||
abstract class BaseIntegrationTest : AppCenter() {
|
||||
|
||||
protected lateinit var device: UiDevice
|
||||
|
||||
|
||||
@@ -3,15 +3,8 @@ package com.mapbox.mapboxsdk.integration
|
||||
import android.support.test.filters.LargeTest
|
||||
import android.support.test.rule.ActivityTestRule
|
||||
import android.support.test.runner.AndroidJUnit4
|
||||
import android.support.test.uiautomator.By
|
||||
import android.support.test.uiautomator.SearchCondition
|
||||
import android.support.test.uiautomator.UiSelector
|
||||
import android.support.test.uiautomator.Until
|
||||
import com.mapbox.mapboxsdk.testapp.R
|
||||
import com.mapbox.mapboxsdk.testapp.activity.fragment.FragmentBackStackActivity
|
||||
import com.mapbox.mapboxsdk.testapp.activity.maplayout.SimpleMapActivity
|
||||
import kotlinx.android.synthetic.main.activity_backstack_fragment.view.*
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
|
||||
/**
|
||||
* Regression test that validates reopening an Activity with a GLSurfaceView
|
||||
*/
|
||||
@@ -27,4 +26,4 @@ class GLSurfaceViewReopenTest : BaseIntegrationTest() {
|
||||
device.launchActivity(activityRule.activity, SimpleMapActivity::class.java)
|
||||
device.waitForIdle()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,6 @@ 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.SimpleMapActivity
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@@ -3,9 +3,7 @@ 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.SimpleMapActivity
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@@ -27,4 +27,4 @@ class QueryRenderedFeaturesBoxCountTest : BaseIntegrationTest() {
|
||||
device.launchActivity(activityRule.activity, QueryRenderedFeaturesBoxCountActivity::class.java)
|
||||
device.waitForIdle()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,10 @@ 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.SimpleMapActivity
|
||||
import com.mapbox.mapboxsdk.testapp.activity.textureview.TextureViewDebugModeActivity
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import java.lang.Thread.sleep
|
||||
|
||||
/**
|
||||
* Regression test that validates reopening an Activity with a TextureView
|
||||
|
||||
@@ -3,9 +3,7 @@ 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
|
||||
|
||||
@@ -5,8 +5,6 @@ import android.support.test.rule.ActivityTestRule
|
||||
import android.support.test.runner.AndroidJUnit4
|
||||
import android.support.test.uiautomator.UiSelector
|
||||
import com.mapbox.mapboxsdk.testapp.activity.fragment.ViewPagerActivity
|
||||
import com.mapbox.mapboxsdk.testapp.activity.maplayout.GLSurfaceRecyclerViewActivity
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@@ -54,7 +54,6 @@ class LocationComponentTest : EspressoTest() {
|
||||
|
||||
private lateinit var locationComponentActivationOptions: LocationComponentActivationOptions
|
||||
|
||||
|
||||
override fun validateTestSetup() {
|
||||
super.validateTestSetup()
|
||||
assertThat(mapboxMap.style, notNullValue())
|
||||
@@ -71,8 +70,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponent_initializesLocationEngineCorrectlyWhenOnesNotProvided() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
@@ -93,9 +97,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponent_initializesLocationEngineCorrectlyWhenOnesNotProvidedButHasOptions() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.locationComponentOptions(
|
||||
@@ -131,9 +139,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponent_doesntInitializeEngineWhenNullProvided() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.locationEngine(null)
|
||||
@@ -170,8 +182,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun settingMapStyleImmediatelyBeforeLoadingComponent_throwsInvalidStyle() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
mapboxMap.setStyle(Style.Builder().fromUrl(Style.LIGHT))
|
||||
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
@@ -188,9 +205,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponent_doesntShowUntilFirstLocationFix() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -222,10 +243,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponentOptions_disablingStaleStateDoesWorkCorrectly() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -258,9 +282,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponentOptions_loadsForegroundBitmapFromNameOption() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -306,9 +334,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponentOptions_loadsGpsNameWithGpsRenderMode() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -343,9 +375,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponentOptions_customIconNameRevertsToDefault() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -379,9 +415,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun locationComponentOptions_customGpsIconNameChangeBackWithMode() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -414,9 +454,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun stillStaleAfterResuming() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -451,9 +495,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun stillNotStaleAfterResuming() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -483,9 +531,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
val rgbaColor = ColorUtils.colorToRgbaString(color)
|
||||
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
locationComponentActivationOptions = LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -516,9 +568,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun forceLocationUpdate_doesMoveLocationLayerIconToCorrectPosition() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -541,9 +597,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun disablingComponentHidesPuck() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -568,9 +628,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun disablingComponentAndChangingStyleAllowsToEnableAgain() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -592,9 +656,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_isDisabledOnStart() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.onStop()
|
||||
component.onStart()
|
||||
|
||||
@@ -619,9 +687,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_keepsEnabledWhenStoppedAndStarted() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -641,8 +713,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_keepsDisabledWhenStoppedAndStarted() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(
|
||||
LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
@@ -663,8 +740,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_ableToChangeStyleAfterResuming() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -685,8 +767,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_interruptedDuringStyleChange() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -705,8 +792,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_forceLocationUpdateAfterStopped() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -726,8 +818,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_acceptAndReuseLocationUpdatesBeforeLayerStarted() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -750,8 +847,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun lifecycle_lifecycleChangeRightAfterStyleReload() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -781,8 +883,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun mapChange_settingComponentStyle() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -810,8 +917,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun mapChange_forcingLocation() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -836,8 +948,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun mapChange_settingMapStyleBeforeComponentCreation() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
styleChangeIdlingResource.waitForStyle(mapboxMap, MAPBOX_HEAVY_STYLE)
|
||||
TestingAsyncUtils.waitForLayer(uiController, mapView)
|
||||
|
||||
@@ -868,8 +985,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
fun animators_layerBearingCorrect() {
|
||||
validateTestSetup()
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -896,8 +1018,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_cameraLatLngBearingCorrect() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -932,8 +1059,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_cameraBearingCorrect() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -971,8 +1103,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_cameraNoneCorrect() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1011,8 +1148,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_focalPointAdjustment() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1033,8 +1175,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_dontZoomWhileNotTracking() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1056,8 +1203,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_zoomWhileTracking() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1079,8 +1231,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Ignore
|
||||
fun animators_zoomWhileTrackingCanceledOnModeChange() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1103,8 +1260,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_dontZoomWhileStopped() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1130,8 +1292,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Ignore
|
||||
fun animators_cancelZoomWhileTracking() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1154,8 +1321,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_dontTiltWhileNotTracking() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1177,8 +1349,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_tiltWhileTracking() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1200,8 +1377,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Ignore
|
||||
fun animators_tiltWhileTrackingCanceledOnModeChange() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1224,8 +1406,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun animators_dontTiltWhileStopped() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1250,8 +1437,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Ignore
|
||||
fun animators_cancelTiltWhileTracking() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1273,8 +1465,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun cameraPositionAdjustedToTrackingModeWhenComponentEnabled() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1301,8 +1498,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun cameraPositionSnappedToTargetIfExceedsThreshold() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1330,8 +1532,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun compassEngine_onComponentInitializedDefaultIsProvided() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -1347,8 +1554,13 @@ class LocationComponentTest : EspressoTest() {
|
||||
@Test
|
||||
fun compassEngine_changesWhenNewProvided() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import kotlin.math.abs
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class LocationLayerControllerTest : EspressoTest() {
|
||||
@@ -67,8 +68,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun renderModeNormal_sourceDoesGetAdded() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -90,8 +96,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun renderModeNormal_trackingNormalLayersDoGetAdded() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -114,8 +125,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun renderModeCompass_bearingLayersDoGetAdded() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -138,8 +154,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun renderModeGps_navigationLayersDoGetAdded() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -162,8 +183,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun dontShowPuckWhenRenderModeSetAndComponentDisabled() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -187,8 +213,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun whenLocationComponentDisabled_doesSetAllLayersToVisibilityNone() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -213,8 +244,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun onMapChange_locationComponentLayersDoGetRedrawn() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -245,8 +281,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun whenStyleChanged_continuesUsingStaleIcons() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -271,8 +312,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun whenStyleChanged_isDisabled_hasLayerBelow_staysHidden() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -300,8 +346,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun whenStyleChanged_staleStateChanges() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -323,8 +374,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun whenStyleChanged_layerVisibilityUpdates() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
styleChangeIdlingResource.waitForStyle(mapboxMap, MAPBOX_HEAVY_STYLE)
|
||||
uiController.loopMainThreadForAtLeast(100)
|
||||
var show = true
|
||||
@@ -349,8 +405,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun accuracy_visibleWithNewLocation() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -372,8 +433,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun accuracy_visibleWhenCameraEased() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -387,10 +453,9 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
uiController.loopMainThreadForAtLeast(300)
|
||||
TestingAsyncUtils.waitForLayer(uiController, mapView)
|
||||
|
||||
|
||||
assertThat(Math.abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1
|
||||
&& Math.abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1
|
||||
&& Math.abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1,
|
||||
assertThat(Math.abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1 &&
|
||||
Math.abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1 &&
|
||||
Math.abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1,
|
||||
`is`(true))
|
||||
|
||||
val expectedRadius = Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/
|
||||
@@ -405,8 +470,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun accuracy_visibleWhenCameraMoved() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -419,9 +489,10 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.newLatLngZoom(target, zoom))
|
||||
TestingAsyncUtils.waitForLayer(uiController, mapView)
|
||||
|
||||
assertThat(Math.abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1
|
||||
&& Math.abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1
|
||||
&& Math.abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1,
|
||||
assertThat(
|
||||
abs(zoom - mapboxMap.cameraPosition.zoom) < 0.1 &&
|
||||
abs(target.latitude - mapboxMap.cameraPosition.target.latitude) < 0.1 &&
|
||||
abs(target.longitude - mapboxMap.cameraPosition.target.longitude) < 0.1,
|
||||
`is`(true))
|
||||
|
||||
val expectedRadius = Utils.calculateZoomLevelRadius(mapboxMap, location) /*meters projected to radius on zoom 16*/
|
||||
@@ -436,8 +507,13 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
@Test
|
||||
fun applyStyle_layerBelow_restoreLayerVisibility() {
|
||||
val componentAction = object : LocationComponentAction.OnPerformLocationComponentAction {
|
||||
override fun onLocationComponentAction(component: LocationComponent, mapboxMap: MapboxMap,
|
||||
style: Style, uiController: UiController, context: Context) {
|
||||
override fun onLocationComponentAction(
|
||||
component: LocationComponent,
|
||||
mapboxMap: MapboxMap,
|
||||
style: Style,
|
||||
uiController: UiController,
|
||||
context: Context
|
||||
) {
|
||||
component.activateLocationComponent(LocationComponentActivationOptions
|
||||
.builder(context, style)
|
||||
.useDefaultLocationEngine(false)
|
||||
@@ -467,4 +543,4 @@ class LocationLayerControllerTest : EspressoTest() {
|
||||
private fun executeComponentTest(listener: LocationComponentAction.OnPerformLocationComponentAction) {
|
||||
onView(withId(R.id.content)).perform(LocationComponentAction(mapboxMap, listener))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,10 @@ import com.mapbox.mapboxsdk.location.LocationComponent
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import org.hamcrest.Matcher
|
||||
|
||||
class LocationComponentAction(private val mapboxMap: MapboxMap,
|
||||
private val onPerformLocationComponentAction: OnPerformLocationComponentAction) : ViewAction {
|
||||
class LocationComponentAction(
|
||||
private val mapboxMap: MapboxMap,
|
||||
private val onPerformLocationComponentAction: OnPerformLocationComponentAction
|
||||
) : ViewAction {
|
||||
|
||||
override fun getConstraints(): Matcher<View> {
|
||||
return isDisplayed()
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.graphics.drawable.Drawable
|
||||
import android.location.Location
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.support.test.espresso.UiController
|
||||
import com.mapbox.geojson.Feature
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mapbox.mapboxsdk.location.utils
|
||||
import android.support.test.espresso.IdlingResource
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import java.util.logging.Handler
|
||||
|
||||
/**
|
||||
* Resource, that's idling until the provided style is loaded.
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.mapbox.mapboxsdk.style.layers.Layer
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
abstract class BaseLayerTest : AppCenter(){
|
||||
abstract class BaseLayerTest : AppCenter() {
|
||||
private lateinit var nativeMapView: NativeMap
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -95,7 +95,6 @@ class NativeMapViewTest : AppCenter() {
|
||||
assertEquals("Longitude should match", expected.longitude, actual.longitude, DELTA)
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@UiThreadTest
|
||||
fun testBearingDefault() {
|
||||
@@ -160,7 +159,7 @@ class NativeMapViewTest : AppCenter() {
|
||||
@UiThreadTest
|
||||
fun testLatLngForPixel() {
|
||||
val expected = LATLNG_TEST
|
||||
nativeMapView.setLatLng(LATLNG_TEST,0)
|
||||
nativeMapView.setLatLng(LATLNG_TEST, 0)
|
||||
val actual = nativeMapView.latLngForPixel(
|
||||
PointF((WIDTH / 2).toFloat(), (HEIGHT / 2).toFloat())
|
||||
)
|
||||
@@ -367,11 +366,11 @@ class NativeMapViewTest : AppCenter() {
|
||||
class DummyRenderer(context: Context) : MapRenderer(context, null) {
|
||||
|
||||
override fun requestRender() {
|
||||
//no-op
|
||||
// no-op
|
||||
}
|
||||
|
||||
override fun queueEvent(runnable: Runnable?) {
|
||||
//no-op
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,10 @@ import com.mapbox.mapboxsdk.testapp.activity.EspressoTest
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class TransformTest: EspressoTest() {
|
||||
class TransformTest : EspressoTest() {
|
||||
|
||||
companion object {
|
||||
val initialCameraUpdate = CameraUpdateFactory.newLatLngZoom(LatLng(12.0,12.0), 12.0)!!
|
||||
val initialCameraUpdate = CameraUpdateFactory.newLatLngZoom(LatLng(12.0, 12.0), 12.0)!!
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -23,7 +23,7 @@ class TransformTest: EspressoTest() {
|
||||
val expectedCameraPosition = mapboxMap.cameraPosition
|
||||
|
||||
mapboxMap.moveCamera(initialCameraUpdate)
|
||||
mapboxMap.setPadding(250,250,0,0)
|
||||
mapboxMap.setPadding(250, 250, 0, 0)
|
||||
mapboxMap.scrollBy(400.0f, 0.0f)
|
||||
val actualCameraPosition = mapboxMap.cameraPosition
|
||||
|
||||
|
||||
@@ -384,9 +384,8 @@ class VisibleRegionTest : BaseTest() {
|
||||
mapboxMap.getLatLngFromScreenCoords(mapView.width / 2f, mapView.height / 2f + d / 2f)
|
||||
)
|
||||
|
||||
|
||||
for (bearing in 45 until 360 step 45) {
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.bearingTo(bearing.toDouble()));
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.bearingTo(bearing.toDouble()))
|
||||
val visibleRegion = mapboxMap.projection.visibleRegion
|
||||
assertTrue(latLngs.all { visibleRegion.latLngBounds.contains(it) })
|
||||
}
|
||||
@@ -398,7 +397,7 @@ class VisibleRegionTest : BaseTest() {
|
||||
validateTestSetup()
|
||||
invoke(mapboxMap) { _: UiController, mapboxMap: MapboxMap ->
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(0.0, 180.0), 8.0))
|
||||
val d = Math.min(mapboxMap.width, mapboxMap.height) / 4;
|
||||
val d = Math.min(mapboxMap.width, mapboxMap.height) / 4
|
||||
val latLngs = listOf(
|
||||
mapboxMap.getLatLngFromScreenCoords(mapView.width / 2f, mapView.height / 2f),
|
||||
mapboxMap.getLatLngFromScreenCoords(mapView.width / 2f - d / 2f, mapView.height / 2f),
|
||||
@@ -408,9 +407,8 @@ class VisibleRegionTest : BaseTest() {
|
||||
mapboxMap.getLatLngFromScreenCoords(mapView.width / 2f, mapView.height / 2f + d / 2f)
|
||||
)
|
||||
|
||||
|
||||
for (bearing in 45 until 360 step 45) {
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.bearingTo(bearing.toDouble()));
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.bearingTo(bearing.toDouble()))
|
||||
val visibleRegion = mapboxMap.projection.visibleRegion
|
||||
assertTrue(latLngs.all { visibleRegion.latLngBounds.contains(it) })
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import android.support.test.rule.ActivityTestRule
|
||||
import android.support.test.runner.AndroidJUnit4
|
||||
import com.mapbox.mapboxsdk.AppCenter
|
||||
import com.mapbox.mapboxsdk.testapp.R
|
||||
import com.mapbox.mapboxsdk.testapp.action.WaitAction
|
||||
import com.mapbox.mapboxsdk.testapp.activity.maplayout.MapInDialogActivity
|
||||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.TimeoutException
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ImageMissingTest : AppCenter(){
|
||||
class ImageMissingTest : AppCenter() {
|
||||
|
||||
@Rule
|
||||
@JvmField
|
||||
@@ -152,4 +152,4 @@ class ImageMissingTest : AppCenter(){
|
||||
}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
rule.runOnUiThread {
|
||||
mapView = rule.activity.findViewById(R.id.mapView)
|
||||
mapView.getMapAsync {
|
||||
mapboxMap = it;
|
||||
mapboxMap = it
|
||||
mapboxMap.setStyle(Style.Builder().fromJson(styleJson))
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
var callbackLatch = CountDownLatch(2)
|
||||
rule.runOnUiThread {
|
||||
mapView.addOnStyleImageMissingListener {
|
||||
mapboxMap.style!!.addImage(it, Bitmap.createBitmap(512, 512, Bitmap.Config.ARGB_8888))
|
||||
mapboxMap.style!!.addImage(it, Bitmap.createBitmap(512, 512, Bitmap.Config.ARGB_8888))
|
||||
}
|
||||
|
||||
// Remove layer and source, so that rendered tiles are no longer used, therefore, map must
|
||||
@@ -69,7 +69,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
}
|
||||
}
|
||||
|
||||
if(!latch.await(5, TimeUnit.SECONDS) && !callbackLatch.await(5, TimeUnit.SECONDS)){
|
||||
if (!latch.await(5, TimeUnit.SECONDS) && !callbackLatch.await(5, TimeUnit.SECONDS)) {
|
||||
throw TimeoutException()
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
fun testRemoveUnusedImagesDefaultListener() {
|
||||
rule.runOnUiThread {
|
||||
mapView.addOnStyleImageMissingListener {
|
||||
mapboxMap.style!!.addImage(it, Bitmap.createBitmap(512, 512, Bitmap.Config.ARGB_8888))
|
||||
mapboxMap.style!!.addImage(it, Bitmap.createBitmap(512, 512, Bitmap.Config.ARGB_8888))
|
||||
}
|
||||
|
||||
// Remove layer and source, so that rendered tiles are no longer used, thus
|
||||
@@ -97,7 +97,7 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
}
|
||||
}
|
||||
|
||||
if(!latch.await(5, TimeUnit.SECONDS)){
|
||||
if (!latch.await(5, TimeUnit.SECONDS)) {
|
||||
throw TimeoutException()
|
||||
}
|
||||
}
|
||||
@@ -160,4 +160,4 @@ class RemoveUnusedImagesTest : AppCenter() {
|
||||
}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,13 @@ package com.mapbox.mapboxsdk.testapp.maps
|
||||
|
||||
import android.support.test.espresso.UiController
|
||||
import android.support.test.runner.AndroidJUnit4
|
||||
import com.mapbox.mapboxsdk.maps.MapView
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap
|
||||
import com.mapbox.mapboxsdk.maps.Style
|
||||
import com.mapbox.mapboxsdk.style.layers.SymbolLayer
|
||||
import com.mapbox.mapboxsdk.style.sources.GeoJsonSource
|
||||
import com.mapbox.mapboxsdk.testapp.action.MapboxMapAction
|
||||
import com.mapbox.mapboxsdk.testapp.activity.EspressoTest
|
||||
import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity
|
||||
import com.mapbox.mapboxsdk.testapp.utils.TestingAsyncUtils
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
|
||||
@@ -85,5 +85,4 @@ class CacheTest {
|
||||
}
|
||||
countDownLatch.await()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,8 @@ open class FileSourceMapTest : AppCenter() {
|
||||
}
|
||||
|
||||
override fun onError(message: String) {
|
||||
Assert.assertEquals("Cannot set path, file source is activated."
|
||||
+ " Make sure that the map or a resources download is not running.", message)
|
||||
Assert.assertEquals("Cannot set path, file source is activated." +
|
||||
" Make sure that the map or a resources download is not running.", message)
|
||||
latch.countDown()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user