-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[google_map_flutter_ios] fix didBeginDraggingMarker
typo
#5085
Conversation
fix revert bundle id remove test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor comments. Thanks for all the new test code here! It's crazy that this works even without the key set up. I guess it does everything but draw?
@@ -1,3 +1,7 @@ | |||
## 2.3.2 | |||
|
|||
* Fix an issue where the onDragEnd callback for marker is not called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Fixes
(Per repo CHANGELOG style guide.)
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these should be removable; see the list in https://github.com/flutter/flutter/wiki/Plugin-Tests#enabling-xctests-or-xcuitests
|
||
#import <XCTest/XCTest.h> | ||
|
||
static const CGFloat kWaitTime = 15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be much longer (maybe 60), since Flutter policy is to not have timeouts in tests, to avoid flake. It's really inconvenient to have no timeouts with the XCUITest APIs, so a very long value is our best option.
|
||
#import <XCTest/XCTest.h> | ||
|
||
static const CGFloat kWaitTime = 15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This should be an NSTimeInterval
rather than a CGFloat
, since that conveys unit information.
.../google_maps_flutter/google_maps_flutter_ios/example/ios13/ios/RunnerUITests/RunnerUITests.m
Show resolved
Hide resolved
@@ -80,13 +82,25 @@ class PlaceMarkerBodyState extends State<PlaceMarkerBody> { | |||
Future<void> _onMarkerDrag(MarkerId markerId, LatLng newPosition) async { | |||
setState(() { | |||
markerPosition = newPosition; | |||
if (!_onDragXcodeUITestHelperText.contains('\n_onMarkerDrag called')) { | |||
// _onMarkerDrag can be called multiple times during a single drag. | |||
// Only log n_onMarkerDrag once per dragging action to reduce noises in UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: n_
-> _
(looks like copypasta from the newline probably).
Yes it probably does everything but draw. We could possibly add more XCUITests. |
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
CLANG_ENABLE_MODULES = YES; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this to import the google maps module.
Updated the project.pbxproj file, @stuartmorgan Could you please double check to see if I'm missing anything? (I also added a failure in the UITest to make sure the CI picked up the test and fail, I will revert that change before landing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. There may be a couple more build properties that could be removed, but it's a short enough list at this point that it's fine if it's not absolutely minimal.
The test failed so the ci did pick up the test. Reverting the intentional code that made the test fail and landing when green. |
flutter/packages@7de08ec...4b483f2 2023-10-10 15619084+vashworth@users.noreply.github.com Run tests on either macOS 12 or macOS 13 (flutter/packages#5089) 2023-10-10 ychris@google.com [google_map_flutter_ios] fix `didBeginDraggingMarker` typo (flutter/packages#5085) 2023-10-09 stuartmorgan@google.com [process] Import the `process` package (flutter/packages#5095) 2023-10-09 hrkadam.92@gmail.com [go_router] Fixes missing state.extra in onException() (flutter/packages#5077) 2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.0 to 2.22.1 (flutter/packages#5094) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter from 5207a30 to f52fe4f (18 revisions) (flutter/packages#5093) 2023-10-09 chrislangham@rightnow.org [platform] Example app for platform (flutter/packages#4834) 2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.2.0 to 2.3.0 (flutter/packages#5091) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@7de08ec...4b483f2 2023-10-10 15619084+vashworth@users.noreply.github.com Run tests on either macOS 12 or macOS 13 (flutter/packages#5089) 2023-10-10 ychris@google.com [google_map_flutter_ios] fix `didBeginDraggingMarker` typo (flutter/packages#5085) 2023-10-09 stuartmorgan@google.com [process] Import the `process` package (flutter/packages#5095) 2023-10-09 hrkadam.92@gmail.com [go_router] Fixes missing state.extra in onException() (flutter/packages#5077) 2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.0 to 2.22.1 (flutter/packages#5094) 2023-10-09 engine-flutter-autoroll@skia.org Roll Flutter from 5207a30 to f52fe4f (18 revisions) (flutter/packages#5093) 2023-10-09 chrislangham@rightnow.org [platform] Example app for platform (flutter/packages#4834) 2023-10-09 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.2.0 to 2.3.0 (flutter/packages#5091) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
) Fix the typo in `didBeginDraggingMarker` The UITest will drag the marker then looking for the text indications that all the dragging callbacks are called, like the screenshot below: <img width="388" alt="Screenshot 2023-10-06 at 3 36 46 PM" src="https://github.com/flutter/packages/assets/3756895/d9e78c99-bb1d-4f47-a0d4-2f699fa9f743"> fixes flutter/flutter#135778
Fix the typo in
didBeginDraggingMarker
The UITest will drag the marker then looking for the text indications that all the dragging callbacks are called, like the screenshot below:
fixes flutter/flutter#135778
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.