Skip to content

Commit f756c1f

Browse files
committed
reverted removal of waitForValueMatchingPredicate
1 parent e8bc47c commit f756c1f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,13 @@ void googleMapsTests() {
949949
expect(iwVisibleStatus, false);
950950

951951
await controller.showMarkerInfoWindow(marker.markerId);
952-
iwVisibleStatus = await controller.isMarkerInfoWindowShown(marker.markerId);
952+
// The Maps SDK doesn't always return true for whether it is shown
953+
// immediately after showing it, so wait for it to report as shown.
954+
iwVisibleStatus = await waitForValueMatchingPredicate<bool>(
955+
tester,
956+
() => controller.isMarkerInfoWindowShown(marker.markerId),
957+
(bool visible) => visible) ??
958+
false;
953959
expect(iwVisibleStatus, true);
954960

955961
await controller.hideMarkerInfoWindow(marker.markerId);

0 commit comments

Comments
 (0)