Skip to content

Commit 3f5adff

Browse files
authored
Revert "[testing] Use latest simulator main (#30664)" (#30706)
This reverts commit 6137fa1.
1 parent 6137fa1 commit 3f5adff

File tree

6 files changed

+14
-21
lines changed

6 files changed

+14
-21
lines changed

eng/devices/ios.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#addin nuget:?package=Cake.AppleSimulator&version=0.2.0
22
#load "./uitests-shared.cake"
33

4-
const string DefaultVersion = "18.4";
5-
const string DefaultTestDevice = $"ios-simulator-64";
4+
const string DefaultVersion = "18.0";
5+
const string DefaultTestDevice = $"ios-simulator-64_{DefaultVersion}";
66

77
// Required arguments
88
string DEFAULT_IOS_PROJECT = "../../src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj";

eng/pipelines/common/device-tests-jobs.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ jobs:
7676
${{ if contains(version, 'device') }}:
7777
device: ios-device
7878
apiVersion: ${{ replace(version, 'device-', '') }}
79-
${{ if contains(version, 'latest') }}:
80-
device: ios-simulator-64
81-
apiVersion: 18.4
8279
${{ else }}:
8380
device: ios-simulator-64_${{ replace(version, 'simulator-', '') }}
8481
apiVersion: ${{ replace(version, 'simulator-', '') }}

eng/pipelines/common/ui-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ stages:
157157
parameters:
158158
platform: ios
159159
${{ if eq(version, 'latest') }}:
160-
version: 18.4
160+
version: 16.4
161161
${{ if ne(version, 'latest') }}:
162162
version: ${{ version }}
163163
path: ${{ project.ios }}
@@ -194,7 +194,7 @@ stages:
194194
parameters:
195195
platform: ios
196196
${{ if eq(version, 'latest') }}:
197-
version: 18.4
197+
version: 16.4
198198
${{ if ne(version, 'latest') }}:
199199
version: ${{ version }}
200200
path: ${{ project.ios }}
@@ -232,7 +232,7 @@ stages:
232232
parameters:
233233
platform: ios
234234
${{ if eq(version, 'latest') }}:
235-
version: 18.4
235+
version: 16.4
236236
${{ if ne(version, 'latest') }}:
237237
version: ${{ version }}
238238
path: ${{ project.ios }}
@@ -276,7 +276,7 @@ stages:
276276
parameters:
277277
platform: ios
278278
${{ if eq(version, 'latest') }}:
279-
version: 18.4
279+
version: 17.2
280280
${{ if ne(version, 'latest') }}:
281281
version: ${{ version }}
282282
path: ${{ project.ios }}
@@ -347,7 +347,7 @@ stages:
347347
- template: ui-tests-steps.yml
348348
parameters:
349349
platform: catalyst
350-
version: "15.3"
350+
version: "13.1"
351351
device: mac
352352
path: ${{ project.mac }}
353353
app: ${{ project.app }}

eng/pipelines/device-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ stages:
116116
targetFrameworkVersion: ${{ targetFrameworkVersion }}
117117
${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}:
118118
androidApiLevels: [ 33, 30, 29, 28, 27, 26, 25, 24, 23 ]
119-
iosVersions: [ 'latest']
119+
iosVersions: [ 'simulator-18.0']
120120
catalystVersions: [ 'latest' ]
121121
windowsVersions: ['packaged', 'unpackaged']
122122
provisionatorChannel: ${{ parameters.provisionatorChannel }}
123123
skipProvisioning: ${{ or(not(parameters.UseProvisionator), false) }}
124124
${{ else }}:
125125
androidApiLevels: [ 33, 23 ]
126-
iosVersions: [ 'latest' ]
126+
iosVersions: [ 'simulator-18.0' ]
127127
catalystVersions: [ 'latest' ]
128128
windowsVersions: ['packaged', 'unpackaged']
129129
provisionatorChannel: ${{ parameters.provisionatorChannel }}

eng/pipelines/ui-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ stages:
150150
agentPoolAccessToken: $(AgentPoolAccessToken)
151151
${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}:
152152
androidApiLevels: [ 30 ]
153-
iosVersions: [ 'latest' ]
153+
iosVersions: [ '18.0' ]
154154
provisionatorChannel: ${{ parameters.provisionatorChannel }}
155155
${{ else }}:
156156
androidApiLevels: [ 30 ]
157-
iosVersions: [ 'latest' ]
157+
iosVersions: [ '18.0' ]
158158
provisionatorChannel: ${{ parameters.provisionatorChannel }}
159159
${{ if parameters.CompatibilityTests }}:
160160
runCompatibilityTests: true

src/Controls/tests/TestCases.Shared.Tests/UITest.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ namespace Microsoft.Maui.TestCases.Tests
1414
#if ANDROID
1515
[TestFixture(TestDevice.Android)]
1616
#elif IOSUITEST
17-
[TestFixture(TestDevice.iOS)]
17+
[TestFixture(TestDevice.iOS)]
1818
#elif MACUITEST
1919
[TestFixture(TestDevice.Mac)]
2020
#elif WINTEST
2121
[TestFixture(TestDevice.Windows)]
2222
#endif
2323
public abstract class UITest : UITestBase
2424
{
25-
string _defaultiOSVersion = "18.4";
26-
2725
protected const int SetupMaxRetries = 1;
2826
readonly VisualRegressionTester _visualRegressionTester;
2927
readonly IImageEditorFactory _imageEditorFactory;
@@ -243,9 +241,7 @@ but both can happen.
243241
var device = (string?)((AppiumApp)App).Driver.Capabilities.GetCapability("deviceName")
244242
?? throw new InvalidOperationException("deviceName capability is missing or null.");
245243

246-
environmentName = "ios";
247-
248-
if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == _defaultiOSVersion)
244+
if (device.Contains(" Xs", StringComparison.OrdinalIgnoreCase) && platformVersion == "18.0")
249245
{
250246
environmentName = "ios";
251247
}
@@ -259,7 +255,7 @@ but both can happen.
259255
}
260256
else
261257
{
262-
//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.");
258+
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.");
263259
}
264260
break;
265261

0 commit comments

Comments
 (0)