Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions eng/pipelines/common/ui-tests-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parameters:
testFilter: ''
testConfigurationArgs: ''
skipProvisioning: true
checkoutDirectory: $(System.DefaultWorkingDirectory)

steps:
- task: DownloadPipelineArtifact@2
Expand Down Expand Up @@ -177,3 +178,83 @@ steps:
displayName: 'Enable Notification Center'
continueOnError: true
timeoutInMinutes: 60

- ${{ if eq(parameters.platform, 'android')}}:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$folderPath = "${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.Android.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff"
if (Test-Path $folderPath) {
Write-Host "##vso[task.setvariable variable=androidFolderExists;isOutput=true]true"
} else {
Write-Host "##vso[task.setvariable variable=androidFolderExists;isOutput=true]false"
}
name: CheckAndroidFolderExists

- task: PublishBuildArtifacts@1
condition: eq(variables['CheckAndroidFolderExists.androidFolderExists'], 'true')
displayName: publish Android screenshots artifacts
inputs:
PathToPublish: ${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.Android.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff
ArtifactName: uitest-snapshot-results-android

- ${{ if eq(parameters.platform, 'ios')}}:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$folderPath = "${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.iOS.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff"
if (Test-Path $folderPath) {
Write-Host "##vso[task.setvariable variable=iosFolderExists;isOutput=true]true"
} else {
Write-Host "##vso[task.setvariable variable=iosFolderExists;isOutput=true]false"
}
name: CheckIosFolderExists

- task: PublishBuildArtifacts@1
condition: eq(variables['CheckIosFolderExists.iosFolderExists'], 'true')
displayName: publish iOS screenshots artifacts
inputs:
PathToPublish: ${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.iOS.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff
ArtifactName: uitest-snapshot-results-ios

- ${{ if eq(parameters.platform, 'windows')}}:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$folderPath = "${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.WinUI.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff"
if (Test-Path $folderPath) {
Write-Host "##vso[task.setvariable variable=windowsFolderExists;isOutput=true]true"
} else {
Write-Host "##vso[task.setvariable variable=windowsFolderExists;isOutput=true]false"
}
name: CheckWindowsFolderExists

- task: PublishBuildArtifacts@1
condition: eq(variables['CheckWindowsFolderExists.windowsFolderExists'], 'true')
displayName: publish Windows screenshots artifacts
inputs:
PathToPublish: ${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.WinUI.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff
ArtifactName: uitest-snapshot-results-windows

- ${{ if eq(parameters.platform, 'catalyst')}}:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$folderPath = "${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.Mac.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff"
if (Test-Path $folderPath) {
Write-Host "##vso[task.setvariable variable=macFolderExists;isOutput=true]true"
} else {
Write-Host "##vso[task.setvariable variable=macFolderExists;isOutput=true]false"
}
name: CheckMacFolderExists

- task: PublishBuildArtifacts@1
condition: eq(variables['CheckMacFolderExists.macFolderExists'], 'true')
displayName: publish Mac screenshots artifacts
inputs:
PathToPublish: ${{ parameters.checkoutDirectory }}/artifacts/bin/Controls.TestCases.Mac.Tests/${{ parameters.configuration }}/net9.0/snapshots-diff
ArtifactName: uitest-snapshot-results-mac
Loading