mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 01:27:35 +00:00
* fix(computer): report unasserted accessibility actions * fix(computer): fail closed on missing action metadata * Fix merged tab search test fixture
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import type { ComputerActionResult } from '../../shared/runtime-types'
|
|
import { normalizeComputerActionResult } from './computer-action-verification-normalization'
|
|
|
|
describe('normalizeComputerActionResult', () => {
|
|
it('marks accessibility actions without a post-state assertion as unverified', () => {
|
|
const result: ComputerActionResult = {
|
|
snapshot: {
|
|
id: 'snap-1',
|
|
app: { name: 'Finder', bundleId: 'com.apple.finder', pid: 100 },
|
|
window: { title: 'Finder', id: 42, width: 800, height: 600 },
|
|
coordinateSpace: 'window',
|
|
treeText: 'tree',
|
|
elementCount: 1,
|
|
focusedElementId: null
|
|
},
|
|
screenshot: null,
|
|
screenshotStatus: { state: 'skipped', reason: 'no_screenshot_flag' },
|
|
action: { path: 'accessibility', actionName: 'click' }
|
|
}
|
|
|
|
expect(normalizeComputerActionResult(result).action?.verification).toEqual({
|
|
state: 'unverified',
|
|
reason: 'accessibility_action_unasserted'
|
|
})
|
|
})
|
|
})
|