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

Update Activity test generation #9276

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
public class FillExtrusionActivity extends AppCompatActivity {

private MapView mapView;
private MapboxMap mapboxMap;

@Override
public void onCreate(Bundle savedInstanceState) {
Expand All @@ -36,8 +37,8 @@ public void onCreate(Bundle savedInstanceState) {
mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(@NonNull
final MapboxMap map) {
public void onMapReady(@NonNull final MapboxMap map) {
mapboxMap = map;
Polygon domTower = Polygon.fromCoordinates(new double[][][] {
new double[][] {
new double[] {
Expand Down Expand Up @@ -66,7 +67,7 @@ public void onMapReady(@NonNull
GeoJsonSource source = new GeoJsonSource("extrusion-source", domTower);
map.addSource(source);

map.addLayer(
mapboxMap.addLayer(
new FillExtrusionLayer("extrusion-layer", source.getId())
.withProperties(
fillExtrusionHeight(40f),
Expand All @@ -75,7 +76,7 @@ public void onMapReady(@NonNull
)
);

map.animateCamera(
mapboxMap.animateCamera(
CameraUpdateFactory.newCameraPosition(
new CameraPosition.Builder()
.target(new LatLng(52.09071040847704, 5.12112557888031))
Expand Down
2 changes: 1 addition & 1 deletion platform/android/scripts/generate-test-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ global.camelize = function (str) {
}


const excludeActivities = ["DeleteRegionActivity","RealTimeGeoJsonActivity","UpdateMetadataActivity","CarDrivingActivity","MyLocationTrackingModeActivity","MyLocationToggleActivity","MyLocationTintActivity","MyLocationDrawableActivity","DoubleMapActivity", "LocationPickerActivity","GeoJsonClusteringActivity","RuntimeStyleTestActivity", "AnimatedMarkerActivity", "ViewPagerActivity","MapFragmentActivity","SupportMapFragmentActivity","SnapshotActivity","NavigationDrawerActivity", "QueryRenderedFeaturesBoxHighlightActivity", "MultiMapActivity", "MapInDialogActivity", "SimpleMapActivity"];
const excludeActivities = ["BaseLocationActivity","MockLocationEngine","DeleteRegionActivity","RealTimeGeoJsonActivity","UpdateMetadataActivity","CarDrivingActivity","MyLocationTrackingModeActivity","MyLocationToggleActivity","MyLocationTintActivity","MyLocationDrawableActivity","DoubleMapActivity", "LocationPickerActivity","GeoJsonClusteringActivity","RuntimeStyleTestActivity", "AnimatedMarkerActivity", "ViewPagerActivity","MapFragmentActivity","SupportMapFragmentActivity","SnapshotActivity","NavigationDrawerActivity", "QueryRenderedFeaturesBoxHighlightActivity", "MultiMapActivity", "MapInDialogActivity", "SimpleMapActivity"];
const appBasePath = 'platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity';
const testBasePath = 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/activity/gen';
const subPackages = fs.readdirSync(appBasePath);
Expand Down