Files
orisys-app/apps/studio/tests/test_analysis_progress.py
T
ykcheungab 425fa0d44d Fix replay 2D black canvas and journey UX clarity
Stored analysis overlays now use the decoded frame; latch resets and draw failures surface. Verified with bare-video, replay-wiring, visual_policy, and analysis-progress tests.
2026-10-06 16:26:47 +08:00

31 lines
1.0 KiB
Python

"""Analysis progress banner titles follow the result state."""
from __future__ import annotations
from orisys_app_shared.i18n import set_locale, t
from orisys_studio.ui.analysis_progress import AnalysisProgress
def test_analysis_progress_titles_name_the_outcome(qt_app) -> None:
set_locale("en_US")
banner = AnalysisProgress(theme="dark")
banner.start()
assert banner.title_label.text() == t("analysis.title")
assert banner.progress_bar.isVisible()
assert banner.cancel_button.isVisible()
banner.reused(frames=12)
assert banner.title_label.text() == t("analysis.title_reused")
assert not banner.progress_bar.isVisible()
assert not banner.cancel_button.isVisible()
banner.complete(frames=12, elapsed_s=1.5)
assert banner.title_label.text() == t("analysis.title_complete")
banner.cancelled(frames=3)
assert banner.title_label.text() == t("analysis.title_cancelled")
banner.failed(reason="boom", frames=1)
assert banner.title_label.text() == t("analysis.title_failed")