Added a process command for recording processing on the RecordingCommand enum in the Commanding package target.
This commit is contained in:
@@ -944,6 +944,25 @@ struct RecordingViewModelTests {
|
||||
#expect(model.elapsedSeconds == 0)
|
||||
}
|
||||
|
||||
@Test
|
||||
func `a process command sends a paused recording for processing`() async throws {
|
||||
let commander = RecordingCommander()
|
||||
let model = Model(
|
||||
transcribe: TranscribingMock(),
|
||||
commander: commander
|
||||
)
|
||||
|
||||
model.drive(to: .paused)
|
||||
|
||||
try await Task.sleep(for: .seconds(0.1))
|
||||
|
||||
commander.send(.process)
|
||||
|
||||
try await Task.sleep(for: .seconds(0.1))
|
||||
|
||||
#expect(model.state == .processing)
|
||||
}
|
||||
|
||||
@Test
|
||||
func `commands are ignored before the first recording starts`() async throws {
|
||||
let commander = RecordingCommander()
|
||||
|
||||
Reference in New Issue
Block a user