Skip to content

Commit 519885f

Browse files
committed
Fix tests
1 parent 6d535f5 commit 519885f

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

example/integration_test/camera_test.dart

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -429,19 +429,7 @@ void main() {
429429
await tester.pumpAndSettle();
430430
final mapboxMap = await mapFuture;
431431

432-
var destination = ScreenCoordinate(x: 100, y: 100);
433-
434-
// the input has to be scaled on Android,
435-
// as GL Native treats iOS and Android coordinates differently:
436-
// * on iOS screen coordinates are expected to be provided(as well as returned by GL Native) as logical pixels
437-
// * on Android screen coordinates are expected to be physical pixels(both ways)
438-
// TODO: this should be removed once https://mapbox.atlassian.net/browse/MAPSFLT-120 is addressed
439-
if (Platform.isAndroid) {
440-
final BuildContext context = tester.element(find.byType(MapWidget));
441-
final pixelRatio = MediaQuery.of(context).devicePixelRatio;
442-
destination.x = destination.x * pixelRatio;
443-
destination.y = destination.y * pixelRatio;
444-
}
432+
final destination = ScreenCoordinate(x: 100, y: 100);
445433
final options = await mapboxMap.getDragCameraOptions(
446434
ScreenCoordinate(x: 0, y: 0), destination);
447435
final coordinates = options.center!["coordinates"] as List;

example/integration_test/map_interface_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ void main() {
5858
await tester.pumpAndSettle();
5959
final mapboxMap = await mapFuture;
6060
var size = await mapboxMap.getSize();
61-
expect(size.width, tester.binding.window.physicalSize.width);
62-
expect(size.height, tester.binding.window.physicalSize.height);
61+
expect(size.width, tester.binding.renderView.size.width);
62+
expect(size.height, tester.binding.renderView.size.height);
6363
await addDelay(1000);
6464
});
6565

0 commit comments

Comments
 (0)