Skip to content

Commit a4735d0

Browse files
committed
Restore ci stuff
1 parent 3eadbc6 commit a4735d0

File tree

3 files changed

+39
-42
lines changed

3 files changed

+39
-42
lines changed

CI/CI.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if ($Platform -like 'win*6') {
1111
}
1212

1313
#Make sure we have the modules we need
14-
Import-Module .\Output\Selenium\Selenium.psd1 -Force -ErrorAction Stop
14+
Import-Module .\Selenium.psd1 -Force -ErrorAction Stop
1515
$checkImportExcel = Get-Module -ListAvailable ImportExcel
1616
if (-not ($checkImportExcel)) {
1717
Write-Verbose -Verbose 'Installing ImportExcel'

CI/pipeline.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
# https://aka.ms/yaml
22

33
trigger:
4-
branches:
5-
include:
6-
- '*'
7-
# - master
8-
# - releases/*
9-
paths:
10-
exclude:
4+
branches:
5+
include:
6+
- "*"
7+
# - master
8+
# - releases/*
9+
paths:
10+
exclude:
1111
- additions.md
1212
- ChangeLog.Txt
1313
- README.md
1414

1515
jobs:
16-
- job: 'Windows'
16+
- job: "Windows"
1717
pool:
18-
vmImage: 'windows-latest'
18+
vmImage: "windows-latest"
1919
steps:
20-
- powershell: './CI/CI.ps1 -browserlist Chrome,Firefox,IE'
21-
displayName: 'Run Test on Windows PowerShell'
22-
- pwsh: './CI/CI.ps1 -browserlist Chrome'
23-
displayName: 'Run Test on PowerShell core on Windows'
24-
- task: PublishPipelineArtifact@1
25-
inputs:
26-
targetPath: '$(Build.ArtifactStagingDirectory)/results'
27-
artifact: 'Windows Results'
28-
- task: PublishTestResults@2
29-
inputs:
30-
testResultsFormat: 'NUnit'
31-
testResultsFiles: '**/TestResults*.xml'
32-
failTaskOnFailedTests: true
20+
- powershell: "./CI/CI.ps1 -browserlist Chrome,Firefox,IE"
21+
displayName: "Run Test on Windows PowerShell"
22+
- pwsh: "./CI/CI.ps1 -browserlist Chrome"
23+
displayName: "Run Test on PowerShell core on Windows"
24+
- task: PublishPipelineArtifact@1
25+
inputs:
26+
targetPath: "$(Build.ArtifactStagingDirectory)/results"
27+
artifact: "Windows Results"
28+
- task: PublishTestResults@2
29+
inputs:
30+
testResultsFormat: "NUnit"
31+
testResultsFiles: "**/TestResults*.xml"
32+
failTaskOnFailedTests: true
3333

34-
- job: 'Ubuntu'
34+
- job: "Ubuntu"
3535
pool:
36-
vmImage: 'ubuntu-latest'
36+
vmImage: "ubuntu-latest"
3737
steps:
38-
- powershell: './CI/CI.ps1 -browserlist Chrome,Firefox'
39-
displayName: 'Run Test on Linux'
40-
- task: PublishPipelineArtifact@1
41-
inputs:
42-
targetPath: '$(Build.ArtifactStagingDirectory)/results'
43-
artifact: 'Linux Results'
44-
- task: PublishTestResults@2
45-
inputs:
46-
testResultsFormat: 'NUnit'
47-
testResultsFiles: '**/TestResults*.xml'
48-
failTaskOnFailedTests: true
38+
- powershell: "./CI/CI.ps1 -browserlist Chrome,Firefox"
39+
displayName: "Run Test on Linux"
40+
- task: PublishPipelineArtifact@1
41+
inputs:
42+
targetPath: "$(Build.ArtifactStagingDirectory)/results"
43+
artifact: "Linux Results"
44+
- task: PublishTestResults@2
45+
inputs:
46+
testResultsFormat: "NUnit"
47+
testResultsFiles: "**/TestResults*.xml"
48+
failTaskOnFailedTests: true

Examples/Combined.tests.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,12 @@ $ModaltestCases = @(
5757
modalXPath = '//*[@id="profile-modal-1"]/div/div'
5858
}
5959
)
60-
61-
$Global:BrowserOptHash = $TestCaseSettings[$env:DefaultBrowser].DefaultOptions
60+
$BrowserOptHash = $TestCaseSettings[$env:DefaultBrowser].DefaultOptions
6261
$BrowserOptText = Build-StringFromHash $BrowserOptHash
6362
Describe "Testing the tailspin toys demo site at $env:SITE_URL" {
6463
BeforeAll {
6564
#Relying on environment variable to pick the browser. Capture ID for use in logs by requesting verbose and redirecting it.
66-
Write-Verbose $env:SITE_URL -Verbose
67-
Write-Verbose $env:DefaultBrowser -Verbose
68-
$BrowserID = SeOpen -URL $env:SITE_URL -Options $Global:BrowserOptHash -In $env:DefaultBrowser 4>&1
65+
$BrowserID = SeOpen -URL $env:SITE_URL -Options $BrowserOptHash -Verbose 4>&1
6966
$BrowserID = ($BrowserID.Message -replace '^Opened ', '') + ' on ' + [System.Environment]::OSVersion.Platform
7067
}
7168
Context "in $BrowserID with settings ($BrowserOptText)" {
@@ -254,7 +251,7 @@ if ($BrowserOptText) {
254251
$Global:SeDriver | Should -BeNullOrEmpty
255252
if ($DriverProcess.Id) {
256253
(Get-Process -id $DriverProcess.id ).HasExited | Should -Be $true
257-
}
254+
}
258255
if ($BrowserProcess.Id) {
259256
(Get-Process -id $BrowserProcess.id).HasExited | Should -Be $true
260257
}

0 commit comments

Comments
 (0)