Repository navigation
desktop-e2e #1542
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: desktop-menu-native-ui-capability-qa | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| native-ui-capability: | |
| runs-on: macos-26 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Query public native UI capabilities without requesting permissions | |
| run: | | |
| cat > /tmp/sim-native-ui-probe.swift <<'SWIFT' | |
| import AppKit | |
| import ApplicationServices | |
| import Foundation | |
| let app = NSWorkspace.shared.frontmostApplication | |
| let application = app.map { AXUIElementCreateApplication($0.processIdentifier) } | |
| var menu: CFTypeRef? | |
| let menuStatus = application.map { AXUIElementCopyAttributeValue($0, kAXMenuBarAttribute as CFString, &menu).rawValue } | |
| let result: [String: Any] = [ | |
| "axTrusted": AXIsProcessTrusted(), | |
| "canPostEvents": CGPreflightPostEventAccess(), | |
| "canListenEvents": CGPreflightListenEventAccess(), | |
| "hasForegroundApp": app != nil, | |
| "menuBarReadStatus": menuStatus ?? -999, | |
| "menuBarReadable": menu != nil | |
| ] | |
| let data = try JSONSerialization.data(withJSONObject: result, options: [.prettyPrinted, .sortedKeys]) | |
| print(String(data: data, encoding: .utf8)!) | |
| SWIFT | |
| xcrun swift /tmp/sim-native-ui-probe.swift | tee native-ui-capability.json | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| if: always() | |
| with: | |
| name: native-ui-capability | |
| path: native-ui-capability.json |