diff --git a/eng/devices/ios.cake b/eng/devices/ios.cake index ea0243a03e7d..d86e1eae1e2f 100644 --- a/eng/devices/ios.cake +++ b/eng/devices/ios.cake @@ -1,8 +1,8 @@ #addin nuget:?package=Cake.AppleSimulator&version=0.2.0 #load "./uitests-shared.cake" -const string DefaultVersion = "18.0"; -const string DefaultTestDevice = $"ios-simulator-64_{DefaultVersion}"; +const string DefaultVersion = "18.4"; +const string DefaultTestDevice = $"ios-simulator-64"; // Required arguments string DEFAULT_IOS_PROJECT = "../../src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj"; diff --git a/eng/pipelines/common/device-tests-jobs.yml b/eng/pipelines/common/device-tests-jobs.yml index 072116326f7d..6a1a0084a6cf 100644 --- a/eng/pipelines/common/device-tests-jobs.yml +++ b/eng/pipelines/common/device-tests-jobs.yml @@ -76,6 +76,9 @@ jobs: ${{ if contains(version, 'device') }}: device: ios-device apiVersion: ${{ replace(version, 'device-', '') }} + ${{ if contains(version, 'latest') }}: + device: ios-simulator-64 + apiVersion: 18.4 ${{ else }}: device: ios-simulator-64_${{ replace(version, 'simulator-', '') }} apiVersion: ${{ replace(version, 'simulator-', '') }} diff --git a/eng/pipelines/common/ui-tests.yml b/eng/pipelines/common/ui-tests.yml index 987004da1fdd..4ae3c99224ac 100644 --- a/eng/pipelines/common/ui-tests.yml +++ b/eng/pipelines/common/ui-tests.yml @@ -157,7 +157,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 16.4 + version: 18.4 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -194,7 +194,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 16.4 + version: 18.4 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -232,7 +232,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 16.4 + version: 18.4 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -276,7 +276,7 @@ stages: parameters: platform: ios ${{ if eq(version, 'latest') }}: - version: 17.2 + version: 18.4 ${{ if ne(version, 'latest') }}: version: ${{ version }} path: ${{ project.ios }} @@ -347,7 +347,7 @@ stages: - template: ui-tests-steps.yml parameters: platform: catalyst - version: "13.1" + version: "15.3" device: mac path: ${{ project.mac }} app: ${{ project.app }} diff --git a/eng/pipelines/device-tests.yml b/eng/pipelines/device-tests.yml index 73258810aad6..cb2b5a3fc751 100644 --- a/eng/pipelines/device-tests.yml +++ b/eng/pipelines/device-tests.yml @@ -116,14 +116,14 @@ stages: targetFrameworkVersion: ${{ targetFrameworkVersion }} ${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}: androidApiLevels: [ 33, 30, 29, 28, 27, 26, 25, 24, 23 ] - iosVersions: [ 'simulator-18.0'] + iosVersions: [ 'latest'] catalystVersions: [ 'latest' ] windowsVersions: ['packaged', 'unpackaged'] provisionatorChannel: ${{ parameters.provisionatorChannel }} skipProvisioning: ${{ or(not(parameters.UseProvisionator), false) }} ${{ else }}: androidApiLevels: [ 33, 23 ] - iosVersions: [ 'simulator-18.0' ] + iosVersions: [ 'latest' ] catalystVersions: [ 'latest' ] windowsVersions: ['packaged', 'unpackaged'] provisionatorChannel: ${{ parameters.provisionatorChannel }} diff --git a/eng/pipelines/ui-tests.yml b/eng/pipelines/ui-tests.yml index 0b27928f8735..3276962ebc23 100644 --- a/eng/pipelines/ui-tests.yml +++ b/eng/pipelines/ui-tests.yml @@ -150,11 +150,11 @@ stages: agentPoolAccessToken: $(AgentPoolAccessToken) ${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}: androidApiLevels: [ 30 ] - iosVersions: [ '18.0' ] + iosVersions: [ 'latest' ] provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ else }}: androidApiLevels: [ 30 ] - iosVersions: [ '18.0' ] + iosVersions: [ 'latest' ] provisionatorChannel: ${{ parameters.provisionatorChannel }} ${{ if parameters.CompatibilityTests }}: runCompatibilityTests: true diff --git a/src/Controls/tests/TestCases.Shared.Tests/UITest.cs b/src/Controls/tests/TestCases.Shared.Tests/UITest.cs index acd5cb7df1e2..2d518818c1e3 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/UITest.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/UITest.cs @@ -14,7 +14,7 @@ namespace Microsoft.Maui.TestCases.Tests #if ANDROID [TestFixture(TestDevice.Android)] #elif IOSUITEST - [TestFixture(TestDevice.iOS)] + [TestFixture(TestDevice.iOS)] #elif MACUITEST [TestFixture(TestDevice.Mac)] #elif WINTEST @@ -22,6 +22,8 @@ namespace Microsoft.Maui.TestCases.Tests #endif public abstract class UITest : UITestBase { + string _defaultiOSVersion = "18.4"; + protected const int SetupMaxRetries = 1; readonly VisualRegressionTester _visualRegressionTester; readonly IImageEditorFactory _imageEditorFactory; @@ -241,7 +243,9 @@ but both can happen. var device = (string?)((AppiumApp)App).Driver.Capabilities.GetCapability("deviceName") ?? throw new InvalidOperationException("deviceName capability is missing or null."); - if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == "18.0") + environmentName = "ios"; + + if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == _defaultiOSVersion) { environmentName = "ios"; } @@ -255,7 +259,7 @@ but both can happen. } else { - 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."); + //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."); } break;