Mapbox-gl-native: Dynamically grant permissions in UI tests

Created on 22 Nov 2016  路  4Comments  路  Source: mapbox/mapbox-gl-native

There are some tests excluded from being generated and/or ignored because a way to grant permissions dynamically in tests wasn't implemented.

There are some workarounds to grant permissions dynamically in tests.
Including:

I think the latter would be the best approach.

Below all the activities that request Location permissions:
MyLocationTrackingModeActivity, MyLocationToggleActivity, MyLocationTintActivity, MyLocationDrawableActivity, LocationPickerActivity and MyLocationViewTest.

Cc/ @tobrun @zugaldia

Android feature tests

Most helpful comment

I think the latter would be the best approach.

馃憤 Great thinking here, the wider the coverage the better.

All 4 comments

I think the latter would be the best approach.

馃憤 Great thinking here, the wider the coverage the better.

馃憤 Great thinking here, the wider the coverage the better.

That's the point!

We should revisit this now that the Android Testing Support Library 1.0 is here 馃帀 because it includes a GrantPermissionRule.

Closing as this is no longer relevant for the Maps SDK. We are deprecating everything related to location and moving that into a LocationLayerPlugin. That plugin is already using the GrantPermissionRule mentioned above.

Was this page helpful?
0 / 5 - 0 ratings