Propagated the Transcription type and locale binding through the RecordingView view and its view model in the Recording package target.

This commit is contained in:
2026-07-04 12:11:24 +02:00
parent 68c070948e
commit 20cbda7b27
6 changed files with 47 additions and 30 deletions
@@ -20,7 +20,7 @@ struct RecordingViewModelTests {
#expect(model.state == .notRecording)
#expect(model.elapsedSeconds == 0)
#expect(model.textTimer == "00:00")
#expect(model.textTranscription == nil)
#expect(model.transcription == nil)
}
}
@@ -368,7 +368,7 @@ struct RecordingViewModelTests {
#expect(model.state == .notRecording)
#expect(model.elapsedSeconds == 0)
#expect(model.textTranscription != nil)
#expect(model.transcription != nil)
}
@Test func `clears the transcription when the transcriber fails`() async throws {
@@ -387,7 +387,7 @@ struct RecordingViewModelTests {
#expect(model.state == .notRecording)
#expect(model.elapsedSeconds == 0)
#expect(model.textTranscription == nil)
#expect(model.transcription == nil)
}
@Test func `clears the transcription when a new recording starts`() async throws {
@@ -400,12 +400,12 @@ struct RecordingViewModelTests {
try await Task.sleep(for: .seconds(0.5))
#expect(model.textTranscription != nil)
#expect(model.transcription != nil)
model.state = .recording
model.updatedState(shouldRestartTimer: true)
#expect(model.textTranscription == nil)
#expect(model.transcription == nil)
model.state = .notRecording
model.updatedState(shouldRestartTimer: false)