Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - instrumentation tests upgrade, move view checking to util…
Browse files Browse the repository at this point in the history
…ity class, remove inheritance in runtime style test (#6803)

update gitignore for generated tests

add camera move test

add realtime geojson to be excluded when generating Activity sanity tests

by default show workaround for showing a MapView in a dialog

add annotation tests

remove older camera tests, introduce tests for move, ease and animate, bring back setLatLng and getLatLng on MapView, add tests for internal camera API.

compass view tests

add tests for attribution and logo.

fix annotation tests

Rename Actiivity test class, split up annotation tests, added MarkerView tests, added infowindow tests, added MyLocationView tests

fix addRemoveLayer test by integrating map interactions inside a ViewAction
  • Loading branch information
tobrun authored Nov 9, 2016
1 parent 2411ec8 commit 33aa14c
Show file tree
Hide file tree
Showing 62 changed files with 2,241 additions and 1,342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,17 @@ void setTilt(Double pitch) {
nativeMapView.setPitch(pitch, 0);
}

//
// Center coordinate
//

LatLng getCenterCoordinate(){
return nativeMapView.getLatLng();
}

void setCenterCoordinate(LatLng centerCoordinate){
nativeMapView.setLatLng(centerCoordinate);
}

//
// Direction
Expand Down
1 change: 1 addition & 0 deletions platform/android/MapboxGLAndroidSDKTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ dependencies {
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.squareup.spoon:spoon-client:1.6.2'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2'
}

apply from: 'gradle-make.gradle'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.mapbox.mapboxsdk.maps;

import com.mapbox.mapboxsdk.geometry.LatLng;

/**
* Utility class to bypass package visibility
*/
public class MapViewUtils {

public static void setDirection(MapView mapView, float direction) {
mapView.setBearing(direction);
}

public static float getDirection(MapView mapView) {
return (float) mapView.getDirection();
}

public static void setTilt(MapView mapView, float tilt) {
mapView.setTilt((double) tilt);
}

public static float getTilt(MapView mapView) {
return (float) mapView.getTilt();
}

public static void setLatLng(MapView mapView, LatLng latLng) {
mapView.setCenterCoordinate(latLng);
}

public static LatLng getLatLng(MapView mapView) {
return mapView.getCenterCoordinate();
}

public static int[] getContentPadding(MapView mapView) {
return new int[]{mapView.getContentPaddingLeft(), mapView.getContentPaddingTop(), mapView.getContentPaddingRight(), mapView.getContentPaddingBottom()};
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 33aa14c

Please sign in to comment.