From 4944af825e4e3613906f84079866d703e213f60e Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Thu, 29 Sep 2022 20:02:58 +0300 Subject: [PATCH] Add Chrome + Chromedriver test (#6326) --- images/macos/tests/Browsers.Tests.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/images/macos/tests/Browsers.Tests.ps1 b/images/macos/tests/Browsers.Tests.ps1 index 6020a8df..cf8ce3a2 100644 --- a/images/macos/tests/Browsers.Tests.ps1 +++ b/images/macos/tests/Browsers.Tests.ps1 @@ -1,6 +1,9 @@ Describe "Chrome" { - It "Chrome" { + BeforeAll { $chromeLocation = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" + } + + It "Chrome" { $chromeLocation | Should -Exist "'$chromeLocation' --version" | Should -ReturnZeroExitCode } @@ -8,6 +11,12 @@ Describe "Chrome" { It "Chrome Driver" { "chromedriver --version" | Should -ReturnZeroExitCode } + + It "Chrome and Chrome Driver major versions are the same" { + $chromeMajor = (& $chromeLocation --version).Trim("Google Chrome ").Split(".")[0] + $chromeDriverMajor = (chromedriver --version).Trim("ChromeDriver ").Split(".")[0] + $chromeMajor | Should -BeExactly $chromeDriverMajor + } } Describe "Selenium server" {