Revert "[testing] Use latest simulator main (#30664)"#30706
Conversation
This reverts commit 6137fa1.
There was a problem hiding this comment.
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.
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) |
| 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.
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.
This reverts commit 6137fa1.
Description of Change
Seems the devicetests are failing , problem with Xcode 16.3 and loading 18.5 simulators.