-
Notifications
You must be signed in to change notification settings - Fork 6k
[iOS ] Fix errors in unittest and scenario tests running against iOS 17 simulators (details in the description) #45391
Conversation
testing/scenario_app/ios/Scenarios/ScenariosUITests/LocalizationInitializationTest.m
Outdated
Show resolved
Hide resolved
| NSString* expectedIdenntifier = [NSString stringWithFormat:@"[%@]", localeDart]; | ||
| XCUIElement* textInputSemanticsObject = | ||
| [self.application.textFields matchingIdentifier:@"[en]"].element; | ||
| [self.application.textFields matchingIdentifier:expectedIdenntifier].element; |
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.
What is the value for the expectedIdenntifier? Curious how to differs. Also, is that difference going to be a problem in other part of our code other than just this 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.
It becomes en_US instead of en. Based on the old comment, I thought it should have always been en_US, I'm not sure why it passed before.
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.
When I ran with older XCode it shows en_US for me, I think the value change might be due to MacOS update rather than simulator version.
|
I ran these changes against Xcode 15 on a CI bot, and it fixes the @cyanglaz Is this the error you were expecting from your comment flutter/flutter#133783 (comment)? |
vashworth
left a comment
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.
Can you rename the PR title since it involves two changes now?
Other than that, LGTM
|
Yes, updating the simulator requires a change of the golden name. |
|
auto label is removed for flutter/engine/45391, Failed to merge flutter/engine/45391 with FormatException: Unexpected end of input (at character 1) ^ |
6589aad to
f96175a
Compare
…ainst iOS 17 simulators (details in the description) (flutter/engine#45391)
…134081) flutter/engine@5b2cc9d...5903490 2023-09-05 [email protected] [iOS ] Fix errors in unittest and scenario tests running against iOS 17 simulators (details in the description) (flutter/engine#45391) 2023-09-05 [email protected] Roll Skia from 2b9fc6a2c250 to 1019c10a2d38 (2 revisions) (flutter/engine#45466) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] 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
| XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot]; | ||
| if (!_goldenImage.image) { | ||
| XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot.image]; | ||
| XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot]; |
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.
fascinating - how did it pass before!
New Mac version seems to have updated the locale data, to match the mac change, we can dynamically read the data when testing instead of hard coding.
"we are sending a UIImage type as parameter to
XCTAttachment attachmentWithScreenshot:, which takes aXCUIScreenshotas parameter, this is not supposed to pass in old iOS versions." In this PR we updated the parameter to use theXCUIScreenshottype.Fixes flutter/flutter#133783
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.