Skip to content

Commit

Permalink
[ci] Only run on 17.2 and latest 33 (#20455)
Browse files Browse the repository at this point in the history
* [ci] Only run on 17.2 and latest 33

* Update screenshots for iPhoneXs

* [uitests] Run on API 30 on android

* Update more images

* Fix looking for simulators

* [testing] Fix test navigation when it fails

* [ci] Fix naming of task

* [testing] Update more testing screenshots
  • Loading branch information
rmarinho authored Feb 9, 2024
1 parent 3fdb6b0 commit 40649b6
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 23 deletions.
10 changes: 3 additions & 7 deletions eng/devices/ios.cake
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,11 @@ void Cleanup()
return;
}
var simulatorName = "XHarness";
if(iosVersion.Contains("17"))
simulatorName = "iPhone Xs";
Information("Looking for simulator: {0} iosversion {1}", simulatorName, iosVersion);
Information("Looking for simulator: {0} ios version {1}", simulatorName, iosVersion);
var xharness = sims.Where(s => s.Name.Contains(simulatorName))?.ToArray();
if(xharness == null || xharness.Length == 0)
{
Information("No XHarness simulators found to delete.");
Information("No simulators with {0} found to delete.", simulatorName);
return;
}
foreach (var sim in xharness) {
Expand Down Expand Up @@ -451,11 +449,9 @@ void InstallIpa(string testApp, string testAppPackageName, string testDevice, st
else
{
var simulatorName = "XHarness";
if(iosVersionToRun.Contains("17"))
simulatorName = "iPhone Xs";
Information("Looking for simulator: {0} iosversion {1}", simulatorName, iosVersionToRun);
var sims = ListAppleSimulators();
var simXH = sims.Where(s => s.Name.Contains(simulatorName)).FirstOrDefault();
var simXH = sims.Where(s => s.Name.Contains(simulatorName) && s.Name.Contains(iosVersionToRun)).FirstOrDefault();
if(simXH == null)
throw new Exception("No simulator was found to run tests on.");

Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ steps:
# Prepare Both
- task: UseDotNet@2 # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops
displayName: 'Use .NET SDK 7'
displayName: 'Use .NET SDK $(DOTNET_VERSION)'
inputs:
packageType: sdk
version: $(DOTNET_VERSION)
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/device-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ stages:
agentPoolAccessToken: $(AgentPoolAccessToken)
${{ 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-17.2', 'simulator-16.4','simulator-15.5' ]
iosVersions: [ 'simulator-17.2']
catalystVersions: [ 'latest' ]
windowsVersions: ['packaged', 'unpackaged']
provisionatorChannel: ${{ parameters.provisionatorChannel }}
${{ if not(or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv')))) }}:
androidApiLevels: [ 30, 23 ]
androidApiLevels: [ 33, 23 ]
iosVersions: [ 'simulator-17.2' ]
catalystVersions: [ 'latest' ]
windowsVersions: ['packaged', 'unpackaged']
Expand Down
4 changes: 1 addition & 3 deletions eng/pipelines/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,11 @@ stages:
agentPoolAccessToken: $(AgentPoolAccessToken)
${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}:
androidApiLevels: [ 30 ]
# androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21 ] # fix the issue of getting the test results off
iosVersions: [ '17.2' ]
provisionatorChannel: ${{ parameters.provisionatorChannel }}
${{ if not(or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv')))) }}:
androidApiLevels: [ 30 ]
# androidApiLevels: [ 30, 21 ] # fix the issue of getting the test results off
iosVersions: [ '17.2','16.4' ]
iosVersions: [ '17.2' ]
provisionatorChannel: ${{ parameters.provisionatorChannel }}
${{ if or(parameters.CompatibilityTests, ne(variables['Build.Reason'], 'PullRequest')) }}:
runCompatibilityTests: true
Expand Down
27 changes: 18 additions & 9 deletions src/Controls/tests/UITests/Tests/Issues/Issue17022.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,28 @@ public void Issue17022Test(string testButtonID, bool isTopOfScreen, bool require
Assert.NotNull(boxView);
var rect = boxView.GetRect();

if (requiresScreenshot)
{
VerifyScreenshot(TestContext.CurrentContext.Test.MethodName + testButtonID);
try {
if (requiresScreenshot)
{
VerifyScreenshot(TestContext.CurrentContext.Test.MethodName + testButtonID);
}
else
{
if (isTopOfScreen)
Assert.AreEqual(rect.Y, 0);
else
Assert.AreNotEqual(rect.Y, 0);
}
}
else
catch
{
Assert.Fail("Failed with exception");
}
finally
{
if (isTopOfScreen)
Assert.AreEqual(rect.Y, 0);
else
Assert.AreNotEqual(rect.Y, 0);
App.WaitForElement("PopPageButton").Click();
}

App.WaitForElement("PopPageButton").Click();
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/Controls/tests/UITests/snapshots/ios/Issue16094Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/Controls/tests/UITests/snapshots/ios/Issue17366Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/Controls/tests/UITests/snapshots/ios/Issue18751Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class Simulator
{
readonly string XCRunTool = "xcrun";

public string XHarnessID { get; set; } = "ios-simulator-64_16.4";
public string XHarnessID { get; set; } = "ios-simulator-64";

string _udid = "";
public string GetUDID()
Expand Down

0 comments on commit 40649b6

Please sign in to comment.