[android] - move camera logic to dedicated transform class (#6919)
* [android] - move camera logic to dedicated transform class post camera updates to the message queue, this makes calling an new camera update in the on finish of another update possible. Simplify transform.java implementation. * fail the step if instrumentation tests fail, fixup typo
This commit is contained in:
@@ -45,7 +45,7 @@ public class MarkerViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addMarkerTest() {
|
||||
public void addMarkerViewTest() {
|
||||
ViewUtils.checkViewIsDisplayed(R.id.mapView);
|
||||
MapboxMap mapboxMap = rule.getActivity().getMapboxMap();
|
||||
assertEquals("Markers should be empty", 0, mapboxMap.getMarkers().size());
|
||||
@@ -107,6 +107,8 @@ public class MarkerViewTest {
|
||||
public void perform(UiController uiController, View view) {
|
||||
mapboxMap.getMarkerViewManager().addMarkerViewAdapter(new MarkerViewActivity.TextAdapter(view.getContext(), mapboxMap));
|
||||
marker = mapboxMap.addMarker(options);
|
||||
mapboxMap.invalidate();
|
||||
uiController.loopMainThreadForAtLeast(250);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,11 +133,11 @@ public class MarkerViewTest {
|
||||
@Override
|
||||
public void perform(UiController uiController, View view) {
|
||||
mapboxMap.selectMarker(marker);
|
||||
|
||||
mapboxMap.invalidate();
|
||||
uiController.loopMainThreadForAtLeast(250);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@After
|
||||
public void unregisterIdlingResource() {
|
||||
Espresso.unregisterIdlingResources(idlingResource);
|
||||
|
||||
@@ -231,6 +231,7 @@ public class CameraMoveTest {
|
||||
@Override
|
||||
public void perform(UiController uiController, View view) {
|
||||
mapboxMap.moveCamera(cameraUpdate);
|
||||
uiController.loopMainThreadForAtLeast(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user