Present replay 3D with the cursor and open Analyze on a remembered video
Replay left the 3D pane on the rest mesh or a sparse overlay, and Analyze skipped the setup dialog unless the file was re-picked. Live Run no longer starts a chain on a video path. Verified with Studio tests for flush, overlay mask, Analyze open, live-video refusal, and locales.
This commit is contained in:
@@ -180,7 +180,7 @@ def _replay_window(make_window):
|
||||
QApplication.processEvents()
|
||||
window.brand_bar.btn_playback.click()
|
||||
QApplication.processEvents()
|
||||
assert window._in_replay_view(), "the window did not switch to the replay view"
|
||||
assert window.layout_ctl.in_replay_view(), "the window did not switch to the replay view"
|
||||
return window
|
||||
|
||||
|
||||
@@ -716,11 +716,20 @@ def test_the_panel_states_a_failed_pass_with_its_reason(
|
||||
)
|
||||
|
||||
|
||||
def test_the_panel_says_a_bare_video_cannot_be_analysed(tmp_path, own_window, monkeypatch):
|
||||
"""No session metadata: no pass exists to offer, and the line must not name one."""
|
||||
def test_a_bare_video_with_a_declined_prompt_promises_no_pass(
|
||||
tmp_path, own_window, monkeypatch, decline_video_prompt
|
||||
):
|
||||
"""A bare video whose setup prompt was dismissed: playback, and one honest line.
|
||||
|
||||
A bare video *can* be analysed now — that is what ``test_bare_video_analysis.py`` is
|
||||
about, and it asks the prompt and answers it. This test is the other answer: the operator
|
||||
opened the video and dismissed the question, so no pass is coming and the panel must not
|
||||
say one is. The line names the action instead (the setup prompt), which is what the
|
||||
"failed or refused, with its reason" state is for.
|
||||
"""
|
||||
from orisys_app_shared.acquisition.image_backend import (
|
||||
RAW_NOTE_KEY,
|
||||
RESULT_IMPOSSIBLE,
|
||||
RESULT_FAILED,
|
||||
)
|
||||
from orisys_app_shared.i18n import t
|
||||
|
||||
@@ -734,9 +743,13 @@ def test_the_panel_says_a_bare_video_cannot_be_analysed(tmp_path, own_window, mo
|
||||
QApplication.processEvents()
|
||||
|
||||
assert window.replay.is_video_only(), "the clip did not open as a bare video"
|
||||
assert window.replay_ctl.result_state() == (RESULT_IMPOSSIBLE, "")
|
||||
assert not window.replay_ctl.analysis_running(), "a pass ran after a dismissed prompt"
|
||||
assert window.replay_ctl.result_state() == (
|
||||
RESULT_FAILED,
|
||||
t("playback.analysis_setup_declined"),
|
||||
)
|
||||
assert window.arrow_panel.note_label.text() == t(
|
||||
"panels.replay_analysis_unavailable"
|
||||
"panels.replay_analysis_failed", reason=t("playback.analysis_setup_declined")
|
||||
)
|
||||
assert t(RAW_NOTE_KEY) not in window.arrow_panel.note_label.text()
|
||||
assert plan_image(captured[-1]).note_key == "panels.replay_analysis_unavailable"
|
||||
assert plan_image(captured[-1]).note_key == "panels.replay_analysis_failed"
|
||||
|
||||
Reference in New Issue
Block a user