Added a process command for recording processing on the RecordingCommand enum in the Commanding package target.

This commit is contained in:
2026-07-06 03:34:21 +02:00
parent 380ffc39b3
commit ffa80d3b58
3 changed files with 23 additions and 0 deletions
@@ -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()