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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user