[macOS] Rework open windows test (#6602)

This commit is contained in:
Mikhail Koliada
2022-11-21 10:55:49 +01:00
committed by GitHub
parent 8c2a400be2
commit daf0420aa4

View File

@@ -49,7 +49,8 @@ Describe "Screen Resolution" {
Describe "Open windows" {
It "Opened windows not found" {
$cmd = "osascript -e 'tell application ""System Events"" to get every window of (every process whose class of windows contains window)'"
'tell application id "com.apple.systemevents" to get every window of (every process whose class of windows contains window)' | Tee-Object /tmp/windows.osascript
$cmd = "osascript /tmp/windows.osascript"
$openWindows = bash -c $cmd
$openWindows.Split(",").Trim() | Where-Object { $_ -notmatch "NotificationCenter" } | Should -BeNullOrEmpty
}