Skip to content

[image_picker_ios] Update UITests for Xcode 15/iOS 17 #5176

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 2 commits into from
Oct 19, 2023

Conversation

vashworth
Copy link
Contributor

@vashworth vashworth commented Oct 18, 2023

With Xcode 15, XCTest's addUIInterruptionMonitorWithDescription sometimes doesn't work. To fix, I added a fallback to query for the buttons in the permissions dialog.

Also, the Allow text in the permissions dialog is different in iOS 17 than previous versions.

Fixes flutter/flutter#136747

Example passing on Xcode 15 with iOS 17 simulator: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_3%20master/7604/overview

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@vashworth vashworth marked this pull request as ready for review October 18, 2023 19:44
@vashworth
Copy link
Contributor Author

@stuartmorgan I ran it locally on Xcode 14/iOS 16 but I don't think the CI test ran the image_picker_ios native tests: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_3%20master/7605/overview
Is there any way I can trigger that?

@stuartmorgan-g
Copy link
Contributor

@vashworth It's in different shard: https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_1%20master/7574/overview
log: (they passed) https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8766871620514207761/+/u/Run_package_tests/native_test/stdout?format=raw

Oh excellent! Thanks!

For general future reference: the way the sharding works in this repo (to try to minimize total time spent waiting on tests regardless of the change) is that the tooling figures out every package that could be affected by the PR, and then evenly distributes that list across the shards, which means packages don't have stable mapping to specific shards. If you compare runs that run every package it'll be stable (modulo changes to the overall list size), but if you are only touching one package it'll always be in shard 1. (And if you touch, say, 3 packages, they will be in shards 1, 2, and 3.)

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

But also, yuck :( If we have a simple repro case for the handler not being reliable in Xcode 15 we should report it to Apple.

@vashworth
Copy link
Contributor Author

LGTM

But also, yuck :( If we have a simple repro case for the handler not being reliable in Xcode 15 we should report it to Apple.

Yeah unfortunately it's not consistent, I had to run it a bunch of times to reproduce. Also, there's a forum open about it and one of the people filed a Feedback ticket https://developer.apple.com/forums/thread/737880

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 19, 2023
@auto-submit auto-submit bot merged commit 353e9a2 into flutter:main Oct 19, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 20, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 20, 2023
flutter/packages@09c6b11...be915be

2023-10-20 737941+loic-sharma@users.noreply.github.com [ci] Finalize migration to x64 specific Windows platform (flutter/packages#5174)
2023-10-19 15619084+vashworth@users.noreply.github.com [image_picker_ios] Update UITests for Xcode 15/iOS 17 (flutter/packages#5176)
2023-10-19 stuartmorgan@google.com [ci] Add emulator tests on older Android version (flutter/packages#4616)
2023-10-19 engine-flutter-autoroll@skia.org Roll Flutter from 189196d to c2bd2c1 (11 revisions) (flutter/packages#5183)
2023-10-19 stuartmorgan@google.com [tool] Fix `filter-packages-to` when everything is changed (flutter/packages#5182)
2023-10-19 tarrinneal@gmail.com [pigeon] add flutter api protocol (flutter/packages#5181)

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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: image_picker platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[image_picker_ios] Some tests fail on iOS 17 simulator with Xcode 15
3 participants