feat(plugins): add source-aware evidence and recording timelines
This commit is contained in:
1 parent
72ff342605
commit
ef7af9988e
61 files changed
+3847
-108
No files matched your search
@@ -714,6 +714,32 @@ async def test_start_recording_anchors_timeline_to_first_frame(mock_ctx, tmp_pat
|
||||
remove_active_session("emulator-5554")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_unconfirmed_recording_start_fails_and_closes_own_process(mock_ctx, tmp_path):
|
||||
controller = UnifiedMobileController(mock_ctx)
|
||||
remove_active_session("emulator-5554")
|
||||
proc = _FakeScrcpyProcess([])
|
||||
with (
|
||||
patch.object(controller, "_spawn_scrcpy", AsyncMock(return_value=proc)),
|
||||
patch.object(controller, "_stop_scrcpy", AsyncMock()) as stop,
|
||||
patch(
|
||||
"artemis.controllers.unified_controller.get_android_display_state",
|
||||
AsyncMock(return_value=None),
|
||||
),
|
||||
patch(
|
||||
"artemis.controllers.unified_controller.await_scrcpy_first_frame",
|
||||
AsyncMock(side_effect=TimeoutError("no first frame")),
|
||||
) as first,
|
||||
):
|
||||
result = await controller.start_video_recording(output_dir=tmp_path)
|
||||
assert not result.success
|
||||
assert "no first frame" in result.message
|
||||
assert first.call_args.kwargs["require_marker"] is True
|
||||
stop.assert_awaited()
|
||||
assert get_active_session("emulator-5554") is None
|
||||
mock_ctx.data_engine.record_video_failure.assert_called_once()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_next_segment_anchors_at_first_frame(mock_ctx, tmp_path):
|
||||
controller = UnifiedMobileController(mock_ctx)
|
||||
|
||||
Reference in new issue
Block a user