Make the cached analysis views reachable over a recording
Replay moved the cursor onto the result's timeline, so the recording's own picture was not offered at all and ``use_recording()`` had no caller. Adopting a result now keeps the cursor on the recording, opens the panel on a derived view, and serves scrubs, playback and display changes from the cache (Part B §9). Verified: apps/studio 455 items / 0 failed / 18 skipped, shared 427 / 0 / 1, autocal 358, ui_check 628 checks / 0 failures, lint gate clean.
This commit is contained in:
@@ -757,9 +757,12 @@ def test_opening_a_recording_with_a_stored_result_runs_no_pass(pass_root):
|
||||
controller, host, engine, parts = _controller(host=host)
|
||||
assert controller.load_recording(RECORDING) is True
|
||||
assert calls == [str(RECORDING)], f"the service was built {len(calls)} times"
|
||||
assert controller.analysis_active(), "the timeline did not adopt the stored result"
|
||||
assert engine.mode() == MODE_ANALYSIS
|
||||
assert parts[2].kinds[-1] == "analysis", "the 2D panel was not told it is a result"
|
||||
# Adoption is "the recording has a readable result", not "the cursor moved onto it":
|
||||
# the engine keeps the recording's own timeline (Part B §9), so the session is held
|
||||
# by the library and answered through ``available_result``.
|
||||
assert controller.available_result() is not None, "the stored result was not adopted"
|
||||
assert engine.mode() == MODE_RECORDING, "adopting a result moved the cursor's timeline"
|
||||
assert parts[2].kinds[-1] == "replay", "the 2D panel was not told the cursor is a replay"
|
||||
assert parts[3].kinds[-1] == "analysis", "the 3D pane was not told it is a result"
|
||||
assert parts[4].states[-1] == "reused", "the surface did not report the reuse"
|
||||
assert stored.is_dir()
|
||||
@@ -782,8 +785,8 @@ def test_opening_a_recording_without_a_result_starts_the_pass(tmp_path, qt_app):
|
||||
assert controller.wait_for_analysis(120)
|
||||
_flush()
|
||||
assert parts[4].states[-1] == "complete", parts[4].states
|
||||
assert controller.analysis_active(), "a complete result was not adopted"
|
||||
assert engine.mode() == MODE_ANALYSIS
|
||||
assert controller.available_result() is not None, "a complete result was not adopted"
|
||||
assert engine.mode() == MODE_RECORDING, "a finished pass moved the cursor's timeline"
|
||||
|
||||
|
||||
def test_a_cancelled_pass_is_reported_and_never_served(tmp_path, qt_app):
|
||||
|
||||
Reference in New Issue
Block a user