Skip to content

Conversation

rmarinho
Copy link
Member

This reverts commit 6137fa1.

Description of Change

Seems the devicetests are failing , problem with Xcode 16.3 and loading 18.5 simulators.

@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 10:15
@rmarinho rmarinho requested a review from a team as a code owner July 18, 2025 10:15
@rmarinho rmarinho added area-testing Unit tests, device tests testing-green-ci labels Jul 18, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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")
Copy link
Preview

Copilot AI Jul 18, 2025

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.

Suggested change
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.");
Copy link
Preview

Copilot AI Jul 18, 2025

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.

@rmarinho rmarinho merged commit 3f5adff into main Jul 18, 2025
53 of 132 checks passed
@rmarinho rmarinho deleted the revert-change branch July 18, 2025 11:26
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Jul 18, 2025
rmarinho added a commit that referenced this pull request Jul 21, 2025
This reverts commit 3f5adff.

# Conflicts:
#	eng/pipelines/common/device-tests-jobs.yml
#	eng/pipelines/common/ui-tests.yml
#	src/Controls/tests/TestCases.Shared.Tests/UITest.cs
pictos pushed a commit to pictos/maui that referenced this pull request Jul 24, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing Unit tests, device tests testing-green-ci
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant