Skip to content
Merged
Next Next commit
try fix failing tests
  • Loading branch information
bparrishMines committed Mar 13, 2024
commit d024148d52d91106302df3e7b6fefce36262d7b7
Original file line number Diff line number Diff line change
Expand Up @@ -2384,10 +2384,9 @@ void main() {

testWidgets('onCameraResolutionChanged emits an empty stream',
(WidgetTester tester) async {
expect(
CameraPlatform.instance.onCameraResolutionChanged(cameraId),
emits(isEmpty),
);
final Stream<CameraResolutionChangedEvent> stream =
CameraPlatform.instance.onCameraResolutionChanged(cameraId);
expect(await stream.isEmpty, isTrue);
});

testWidgets(
Expand Down Expand Up @@ -2968,20 +2967,18 @@ void main() {
(WidgetTester tester) async {
when(() => window.screen).thenReturn(null);

expect(
CameraPlatform.instance.onDeviceOrientationChanged(),
emits(isEmpty),
);
final Stream<DeviceOrientationChangedEvent> stream =
CameraPlatform.instance.onDeviceOrientationChanged();
expect(await stream.isEmpty, isTrue);
});

testWidgets('when screen orientation is not supported',
(WidgetTester tester) async {
when(() => screen.orientation).thenReturn(null);

expect(
CameraPlatform.instance.onDeviceOrientationChanged(),
emits(isEmpty),
);
final Stream<DeviceOrientationChangedEvent> stream =
CameraPlatform.instance.onDeviceOrientationChanged();
expect(await stream.isEmpty, isTrue);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ void runTests() {

final LatLngBounds secondVisibleRegion =
await mapController.getVisibleRegion();
await tester.pumpAndSettle();

expect(secondVisibleRegion, isNot(zeroLatLngBounds));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ void main() {
12,
),
);
await tester.pump();

final LatLng coords = await controller.getLatLng(
ScreenCoordinate(x: size.width ~/ 2, y: size.height ~/ 2),
Expand Down