From 263c5dff6d790d43251e53278271b2c23b32cd7e Mon Sep 17 00:00:00 2001 From: Ondrej Dockal Date: Fri, 13 Dec 2024 15:57:22 +0100 Subject: [PATCH] chore: add action that will click Allow button during podman installation on Mac Signed-off-by: Ondrej Dockal --- .../extension/podman/podman-extension_darwin.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/extended/podman-desktop/extension/podman/podman-extension_darwin.go b/test/extended/podman-desktop/extension/podman/podman-extension_darwin.go index d56ce77e..3b5a9768 100644 --- a/test/extended/podman-desktop/extension/podman/podman-extension_darwin.go +++ b/test/extended/podman-desktop/extension/podman/podman-extension_darwin.go @@ -11,10 +11,11 @@ const ( installerBundleID = "com.apple.installer" installerPodmanTitle = "Install Podman" - installerContinue = "Continue" - installerAgree = "Agree" - installerInstall = "Install" - installerClose = "Close" + installerContinue = "Continue" + installerAgree = "Agree" + installerAllow = "Allow" + installerInstall = "Install" + installerClose = "Close" installerSelectLocationTitle = "Select a Destination" ) @@ -49,6 +50,13 @@ func runInstaller(userPassword string) error { if err := i.Click(installerAgree, delay.SMALL); err != nil { return installerError(err) } + // get foreground App (Just a system dialog, contains buttons Allow and Don't Allow) + y, err := ax.GetForefront() + if err := y.Click(installerAllow, delay.SMALL); err != nil { + return installerError(err) + } + // reinitilize installer app + // i, err := ax.GetAppByTypeAndTitle(installerBundleID, installerPodmanTitle) - compilation error if selectLocationExists, err := i.ExistsWithType(installerSelectLocationTitle, "text"); selectLocationExists { if err != nil { return installerError(err)