* Map the session-level surface to an AT-SPI2 surface. * Linux supports 'desktop' and 'frontmost-app'. The 'app' surface * (used for in-app XCTest sessions) is treated as 'frontmost-app' on Linux. * The 'menubar' surface is not yet supported; it falls back to 'desktop'.
(surface: SessionSurface | undefined)
| 10 | * The 'menubar' surface is not yet supported; it falls back to 'desktop'. |
| 11 | */ |
| 12 | function resolveLinuxSurface(surface: SessionSurface | undefined): SnapshotSurface { |
| 13 | if (surface === 'desktop') return 'desktop'; |
| 14 | if (surface === 'frontmost-app' || surface === 'app') return 'frontmost-app'; |
| 15 | if (surface === 'menubar') { |
| 16 | emitDiagnostic({ |
| 17 | level: 'warn', |
| 18 | phase: 'linux_snapshot', |
| 19 | data: { message: 'menubar surface is not supported on Linux, falling back to desktop' }, |
| 20 | }); |
| 21 | } |
| 22 | return 'desktop'; |
| 23 | } |
| 24 | |
| 25 | export async function snapshotLinux(surface: SessionSurface | undefined): Promise<{ |
| 26 | nodes: RawSnapshotNode[]; |
no test coverage detected