Repository navigation
[image_picker_ios] Fix FLTPHPickerSaveImageToPathOperation property attributes - #6890
Conversation
| BuildableIdentifier = "primary" | ||
| BlueprintIdentifier = "BE7AEE6B26403C46006181AA" | ||
| BuildableName = "RunnerUITestiOS14.xctest" | ||
| BlueprintName = "RunnerUITestiOS14" |
There was a problem hiding this comment.
This was removed at some point.
| * Creates a mock picker result using NSItemProvider. | ||
| * | ||
| * @param itemProvider an item provider that will be used as picker result | ||
| * @param identifier local identifier of the asset |
There was a problem hiding this comment.
There is no such parameter.
|
|
||
| XCUIElement *imageFromGalleryButton = | ||
| [self.app.otherElements elementMatchingPredicate:predicateToFindImageFromGalleryButton]; | ||
| self.app.otherElements[@"image_picker_example_from_gallery"].firstMatch; |
There was a problem hiding this comment.
Prefer subscripting over predicates for easier reading.
| @(kElementWaitingTime)); | ||
| } | ||
|
|
||
| XCTAssertTrue(imageFromGalleryButton.exists); |
There was a problem hiding this comment.
Don't need to check that it exists, waitForExistenceWithTimeout right above does this already.
| [self launchPickerAndCancel]; | ||
| } | ||
|
|
||
| - (void)launchPickerAndCancel { |
There was a problem hiding this comment.
Remove unnecessary utility method.
| } | ||
|
|
||
| XCUIElement *pickButton = [self.app.buttons elementMatchingPredicate:predicateToFindPickButton]; | ||
| if (quality != nil) { |
There was a problem hiding this comment.
This tests the fix, and crashes on master without it.
|
|
||
| - (void)testSelectingFromGallery { | ||
| // Test the `Select Photos` button which is available after iOS 14. | ||
| if (@available(iOS 14, *)) { |
There was a problem hiding this comment.
Use API_AVAILABLE in the method signature instead.
| XCUIElement *aImage; | ||
| if (@available(iOS 14, *)) { | ||
| aImage = [self.app.scrollViews.firstMatch.images elementBoundByIndex:1]; | ||
| } else { |
There was a problem hiding this comment.
This else was dead code, this only runs on iOS 14.
| // Find an image and tap on it to have access to selected photos. | ||
| if (@available(iOS 14, *)) { | ||
| aImage = [self.app.scrollViews.firstMatch.images elementBoundByIndex:1]; | ||
| } else { |
| @property(strong, nonatomic) NSNumber *maxHeight; | ||
| @property(strong, nonatomic) NSNumber *maxWidth; | ||
| @property(strong, nonatomic) NSNumber *desiredImageQuality; |
There was a problem hiding this comment.
This is the actual fix.
* 6df3ef23f [in_app_pur] Add screenshots to pubspec.yaml (flutter-team-archive/plugins#6540) * 42f8093c2 [google_maps_flutter] Fixed minor syntax error in the README.md (flutter-team-archive/plugins#6909) * f9dda6a27 [image_picker_ios] Fix FLTPHPickerSaveImageToPathOperation property attributes (flutter-team-archive/plugins#6890)
…#117972) * 6df3ef23f [in_app_pur] Add screenshots to pubspec.yaml (flutter-team-archive/plugins#6540) * 42f8093c2 [google_maps_flutter] Fixed minor syntax error in the README.md (flutter-team-archive/plugins#6909) * f9dda6a27 [image_picker_ios] Fix FLTPHPickerSaveImageToPathOperation property attributes (flutter-team-archive/plugins#6890)
…#117972) * 6df3ef23f [in_app_pur] Add screenshots to pubspec.yaml (flutter-team-archive/plugins#6540) * 42f8093c2 [google_maps_flutter] Fixed minor syntax error in the README.md (flutter-team-archive/plugins#6909) * f9dda6a27 [image_picker_ios] Fix FLTPHPickerSaveImageToPathOperation property attributes (flutter-team-archive/plugins#6890)
FLTPHPickerSaveImageToPathOperationNSNumberproperties tostrong, notassignXCUIElementQuerysubscripting to find elements instead of label predicates.Fixes flutter/flutter#117670
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto 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.