From daf0420aa49309fe9f01437d835c81e31a15c54d Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Mon, 21 Nov 2022 10:55:49 +0100 Subject: [PATCH] [macOS] Rework open windows test (#6602) --- images/macos/tests/System.Tests.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/macos/tests/System.Tests.ps1 b/images/macos/tests/System.Tests.ps1 index f5493b1d2..8d08627bf 100644 --- a/images/macos/tests/System.Tests.ps1 +++ b/images/macos/tests/System.Tests.ps1 @@ -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 }