diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3851681..4f061e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,3 +35,11 @@ jobs: # suite. A PR could break dictationCoordinator.test.js and still # merge on a green check, because the check never looked. - run: npm test + # #440: hotkey-helper and accessibility-helper both have real Swift + # test suites, wired as .testTarget in their Package.swift, that no + # CI workflow or npm script ever invoked - a native-side regression + # could merge on a green check the same way #425's electron tests + # could. transcription-helper has no test target yet (needs FluidAudio + # mocked out first) and isn't built here either - still open. + - run: swift test --package-path native/hotkey-helper + - run: swift test --package-path native/accessibility-helper diff --git a/native/accessibility-helper/Tests/AccessibilityInjectionTests/InjectionEngineTests.swift b/native/accessibility-helper/Tests/AccessibilityInjectionTests/InjectionEngineTests.swift index edd2be3..8eb1ef2 100644 --- a/native/accessibility-helper/Tests/AccessibilityInjectionTests/InjectionEngineTests.swift +++ b/native/accessibility-helper/Tests/AccessibilityInjectionTests/InjectionEngineTests.swift @@ -295,7 +295,8 @@ struct InjectionEngineTests { // first read misses, but the tree comes good a beat later. Before // #227 this dropped straight to blind-paste-or-hold. let target = FakeAccessibilityTarget( - fieldInfo: FieldInfo(role: "AXTextField", valueChars: 10, selectedTextSettable: true) + fieldInfo: FieldInfo(role: "AXTextField", valueChars: 10, selectedTextSettable: true), + valueToReadBack: "hello" ) let (engine, time, paster, _) = makeEngine(focusTarget: target, missesBeforeSuccess: 2) @@ -379,7 +380,8 @@ struct InjectionEngineTests { @Test func settleGuardPassesOnceTheTargetStabilizes() { let time = SimulatedTime() let target = FakeAccessibilityTarget( - fieldInfo: FieldInfo(role: "AXTextField", valueChars: 5, selectedTextSettable: true) + fieldInfo: FieldInfo(role: "AXTextField", valueChars: 5, selectedTextSettable: true), + valueToReadBack: "hello" ) let paster = FakePaster(result: PasteResult(delivered: true, verified: false, note: "")) let typer = FakeTyper()