mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
add webdriver tests
This commit is contained in:
@@ -6,8 +6,8 @@ Describe "Chrome" {
|
||||
$env:ChromeWebDriver | Should -Exist
|
||||
}
|
||||
|
||||
It "chromedriver.exe exists" {
|
||||
"$env:ChromeWebDriver\chromedriver.exe" | Should -Exist
|
||||
It "chromedriver.exe is installed" {
|
||||
"$env:ChromeWebDriver\chromedriver.exe --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "versioninfo.txt exists" {
|
||||
@@ -15,7 +15,7 @@ Describe "Chrome" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "Chrome" {
|
||||
Context "Browser" {
|
||||
$chromeRegPath = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe"
|
||||
|
||||
It "$edgeRegPath registry path exists" -TestCases @{chromeRegPath = $chromeRegPath} {
|
||||
@@ -55,8 +55,8 @@ Describe "Edge" {
|
||||
$env:EdgeWebDriver | Should -Exist
|
||||
}
|
||||
|
||||
It "msedgedriver.exe exists" {
|
||||
"$env:EdgeWebDriver\msedgedriver.exe" | Should -Exist
|
||||
It "msedgedriver.exe is installed" {
|
||||
"$env:EdgeWebDriver\msedgedriver.exe --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "versioninfo.txt exists" {
|
||||
@@ -64,7 +64,7 @@ Describe "Edge" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "Firefox" {
|
||||
Context "Browser" {
|
||||
$edgeRegPath = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msedge.exe"
|
||||
|
||||
It "$edgeRegPath registry path exists" -TestCases @{edgeRegPath = $edgeRegPath} {
|
||||
@@ -83,15 +83,15 @@ Describe "Edge" {
|
||||
}
|
||||
|
||||
Describe "Firefox" {
|
||||
Context "GeckoWebDriver" {
|
||||
Context "WebDriver" {
|
||||
It "GeckoWebDriver environment variable and path exists" {
|
||||
$env:GeckoWebDriver | Should -Not -BeNullOrEmpty
|
||||
$env:GeckoWebDriver | Should -BeExactly "C:\SeleniumWebDrivers\GeckoDriver"
|
||||
$env:GeckoWebDriver | Should -Exist
|
||||
}
|
||||
|
||||
It "geckodriver.exe exists" {
|
||||
"$env:GeckoWebDriver\geckodriver.exe" | Should -Exist
|
||||
It "geckodriver.exe is installed" {
|
||||
"$env:GeckoWebDriver\geckodriver.exe --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "versioninfo.txt exists" {
|
||||
@@ -99,7 +99,7 @@ Describe "Firefox" {
|
||||
}
|
||||
}
|
||||
|
||||
Context "Firefox" {
|
||||
Context "Browser" {
|
||||
$firefoxRegPath = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe"
|
||||
|
||||
It "$firefoxRegPath registry path exists" -TestCases @{firefoxRegPath = $firefoxRegPath} {
|
||||
@@ -118,15 +118,15 @@ Describe "Firefox" {
|
||||
}
|
||||
|
||||
Describe "Internet Explorer" {
|
||||
Context "IEWebDriver" {
|
||||
Context "WebDriver" {
|
||||
It "IEWebDriver environment variable and path exists" {
|
||||
$env:IEWebDriver | Should -Not -BeNullOrEmpty
|
||||
$env:IEWebDriver | Should -BeExactly "C:\SeleniumWebDrivers\IEDriver"
|
||||
$env:IEWebDriver | Should -Exist
|
||||
}
|
||||
|
||||
It "geckodriver.exe exists" {
|
||||
"$env:IEWebDriver\IEDriverServer.exe" | Should -Exist
|
||||
It "iedriverserver.exe is intalled" {
|
||||
"$env:IEWebDriver\IEDriverServer.exe --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "versioninfo.txt exists" {
|
||||
|
||||
@@ -21,12 +21,12 @@ Describe "Haskell" {
|
||||
}
|
||||
}
|
||||
|
||||
It "Validation each of GHC version" -TestCases $ghcTestCases {
|
||||
It "<ghcVersion> is installed" -TestCases $ghcTestCases {
|
||||
$binGhcPath = Join-Path $env:ChocolateyInstall "lib\ghc.$ghcVersion\tools\ghc-$ghcVersion\bin\ghc.exe"
|
||||
& $binGhcPath --version | Should -Match $ghcVersion
|
||||
}
|
||||
|
||||
It "Default version of GHC should be the latest installed" {
|
||||
It "Default version of GHC should be the latest installed" -TestCases @{ghcVersionList = $ghcVersionList} {
|
||||
$defaultGhcVersion = $ghcVersionList | Sort-Object {[Version]$_} |Select-Object -Last 1
|
||||
ghc --version | Should -Match $defaultGhcVersion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user