-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Revert "[testing] Use latest simulator main (#30664)" #30706
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
Conversation
This reverts commit 6137fa1.
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.
Pull Request Overview
This PR reverts a previous change that updated iOS simulator versions to the latest version (18.4) due to compatibility issues with Xcode 16.3 and iOS 18.5 simulators causing device test failures.
- Reverts iOS simulator versions from 18.4 back to earlier versions (18.0, 17.2, 16.4)
- Updates pipeline configurations to use specific iOS versions instead of 'latest'
- Removes the dynamic iOS version variable from test code and hardcodes version checks
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
UITest.cs | Removes dynamic iOS version variable and reverts to hardcoded version checks |
ui-tests.yml | Changes iOS versions from 'latest' back to '18.0' |
device-tests.yml | Updates iOS versions from 'latest' to 'simulator-18.0' |
ui-tests.yml (common) | Reverts 'latest' iOS version mappings from 18.4 to earlier versions |
device-tests-jobs.yml | Removes 'latest' version handling for iOS simulators |
ios.cake | Updates default iOS version from 18.4 to 18.0 |
environmentName = "ios"; | ||
|
||
if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == _defaultiOSVersion) | ||
if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == "18.0") |
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.
Hardcoding the iOS version "18.0" directly in the condition creates a magic number that will need to be updated in multiple places when versions change. Consider using a constant to make future version updates easier to maintain.
if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == "18.0") | |
if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == IOS_VERSION_18_0) |
Copilot uses AI. Check for mistakes.
@@ -259,7 +255,7 @@ but both can happen. | |||
} | |||
else | |||
{ | |||
//Assert.Fail($"iOS visual tests should be run on iPhone Xs (iOS {_defaultiOSVersion}) or iPhone X (iOS 16.4) simulator images, but the current device is '{deviceName}' '{platformVersion}'. Follow the steps on the MAUI UI testing wiki."); | |||
Assert.Fail($"iOS visual tests should be run on iPhone Xs (iOS 17.2) or iPhone X (iOS 16.4) simulator images, but the current device is '{deviceName}'. Follow the steps on the MAUI UI testing wiki."); |
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.
The error message contains hardcoded iOS versions (17.2 and 16.4) that may become inconsistent with the actual version check above (18.0). This creates a maintenance burden where multiple version references need to be kept in sync.
Copilot uses AI. Check for mistakes.
This reverts commit 6137fa1.
Description of Change
Seems the devicetests are failing , problem with Xcode 16.3 and loading 18.5 simulators.