Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

test(overlay): cover opt-in close fade

altic-dev8e42e531d83a
diff --git a/Tests/FluidDictationIntegrationTests/DirectAudioReliabilityTests.swift b/Tests/FluidDictationIntegrationTests/DirectAudioReliabilityTests.swift
index e5c64c3b..ec683c19 100644
--- a/Tests/FluidDictationIntegrationTests/DirectAudioReliabilityTests.swift
+++ b/Tests/FluidDictationIntegrationTests/DirectAudioReliabilityTests.swift
@@ -685,8 +685,20 @@ final class DirectAudioReliabilityTests: XCTestCase {
menuBarSource.components(separatedBy: "func beginProcessingCompletionAndHideOverlay() {").last?
.components(separatedBy: "func finishProcessingAndHideOverlay() async {").first
)
- XCTAssertTrue(completionSection.contains("NotchOverlayManager.shared.hideImmediately()"))
- XCTAssertFalse(completionSection.contains("NotchOverlayManager.shared.hide()"))
+ // Completion routes through hide(), which must fall back to an immediate
+ // hide unless the opt-in closing animation is enabled.
+ XCTAssertTrue(completionSection.contains("NotchOverlayManager.shared.hide()"))
+ let notchManagerSource = try String(
+ contentsOf: repositoryRoot
+ .appendingPathComponent("Sources/Fluid/Services/NotchOverlayManager.swift"),
+ encoding: .utf8
+ )
+ let hideSection = try XCTUnwrap(
+ notchManagerSource.components(separatedBy: "func hide() {").last?
+ .components(separatedBy: "func hideImmediately() {").first
+ )
+ XCTAssertTrue(hideSection.contains("guard SettingsStore.shared.overlayClosingAnimationEnabled else {"))
+ XCTAssertTrue(hideSection.contains("self.hideImmediately()"))
let postStopSection = try XCTUnwrap(
source.components(separatedBy: "let transcribedText = await asr.stop").last?