Has anyone managed to ui test an authorization plugin that is based on SFAuthorizationPluginView?
I have searched on the internet and nothing shows up. I know that if we open separate windows in a mechanism that's not based on SFAuthorizationPluginView we can create a standalone app for those windows and ui test them, but it would be great if we could UI test whole flows, beginning with SFAuthorizationPluginView / built in login window and then continue on our own windows in further mechanisms.
What I tried:
XCUITest needs an XCUIApplication to oparete on. But what is the application here? I'd assume it's SecurityAgentHelper-x86_64 (based on accessibility inspector that is the root ancestor of my window: SecurityAgentHelper-x86_64 > Login (window) > [my text field]
). But that is an XPC process, which brings me to my next point:
I don't think xpc processes can be the target application in XCUIApplication's init.
The
init(bundleIdentifier: "com.apple.SecurityAgentHelper.x86_64")
call crashes with app not found, while the
init(url: URL(string: "/System/Library/Frameworks/Security.framework/Versions/Current/MachServices/SecurityAgent.bundle/Contents/XPCServices/SecurityAgentHelper-x86_64.xpc")!)
call simply hangs forever, then times out. Based on the Accessibility Inspector hierarchy this app is the host application which should be opened.
Without a main XCUIApplication it is impossible to start querying UI elements for UI tests, so I am stuck here.