三维未激活采样显示灰点,二维增加深度叠箭头。
分析对话框默认使用传感器对话框保存的标定,关闭按钮改为保存。框选曲线时数值卡片仍显示光标读数。相关单测通过。
This commit is contained in:
@@ -1741,7 +1741,12 @@ def test_the_replay_view_loads_a_recording_and_scrubs_it(make_window, replay_rec
|
||||
assert panel.mode() == "follow"
|
||||
assert window.toolbar.run_role() == "acquire", "the rail kept the transport"
|
||||
assert window.toolbar.btn_run.text() == t("toolbar.run_label")
|
||||
assert window.arrow_panel.view_modes() == ("arrows_pure", "arrows_stitched", "depth")
|
||||
assert window.arrow_panel.view_modes() == (
|
||||
"arrows_pure",
|
||||
"arrows_stitched",
|
||||
"depth",
|
||||
"depth_arrows",
|
||||
)
|
||||
assert "raw_0001" not in window.toolbar.source_summary.text(), (
|
||||
"the replay's video is still named in the live view"
|
||||
)
|
||||
@@ -2747,14 +2752,15 @@ def test_a_recording_without_a_video_says_it_cannot_be_played(make_window, recor
|
||||
# ------------------------------------------- selection readout and notices
|
||||
|
||||
|
||||
def test_a_selection_moves_its_statistics_onto_the_value_cards(make_window):
|
||||
"""The per-channel line under the charts did not fit; the cards hold it now.
|
||||
def test_a_zoomed_window_keeps_the_cursor_on_the_value_cards(make_window):
|
||||
"""Zooming names the window in the strip; the cards stay on the playhead.
|
||||
|
||||
Selecting a window makes the big number that window's peak and the line under
|
||||
it its mean · σ. The strip keeps only how big the selection is, and leaving
|
||||
the selection puts the cursor readout back.
|
||||
Selecting a window used to put that window's peak and mean · σ on the cards.
|
||||
The big numbers are the sample under the cursor again; the strip keeps only
|
||||
how big the selection is.
|
||||
"""
|
||||
from orisys_app_shared.i18n import t
|
||||
from orisys_studio.ui.force_plots import format_force
|
||||
|
||||
window, stuck = _running_window(make_window)
|
||||
window.toolbar.units_combo.setCurrentIndex(0) # newton
|
||||
@@ -2768,6 +2774,7 @@ def test_a_selection_moves_its_statistics_onto_the_value_cards(make_window):
|
||||
assert plots.stats_label.text() == ""
|
||||
assert plots.value_details[0].text() == "", "a live reading carries a mean line"
|
||||
|
||||
plots.set_cursor(2.0)
|
||||
plots.set_window(1.0, 3.0)
|
||||
assert plots.mode() == "browse"
|
||||
assert plots._selection is not None, "the window was not read as a selection"
|
||||
@@ -2777,17 +2784,17 @@ def test_a_selection_moves_its_statistics_onto_the_value_cards(make_window):
|
||||
assert t("chart.selection_summary", duration="1", samples=2)[:4] in summary or (
|
||||
"选区" in summary or "Selection" in summary
|
||||
), summary
|
||||
# The numbers a reader cannot fit in the strip are on the cards instead.
|
||||
expected_peak = float(plots._selection.peaks[0])
|
||||
expected = f"{expected_peak:.2f}"
|
||||
assert plots.value_labels[0].text() == expected, (
|
||||
f"the FN card is not the selection's peak: {plots.value_labels[0].text()!r}"
|
||||
assert "峰" not in summary and "均" not in summary, summary
|
||||
|
||||
expected = format_force(
|
||||
plots._display_values[0], plots.unit(), presentation=plots.presentation
|
||||
)
|
||||
assert plots.value_labels[0].text() == expected, (
|
||||
f"the FN card is not the cursor sample: {plots.value_labels[0].text()!r}"
|
||||
)
|
||||
assert plots.value_details[0].text() == "", (
|
||||
f"the card still carries a mean line: {plots.value_details[0].text()!r}"
|
||||
)
|
||||
detail = plots.value_details[0].text()
|
||||
assert detail and detail != "", detail
|
||||
assert f"{float(plots._selection.means[0]):.4g}" in detail, (detail, plots._selection.means[0])
|
||||
assert "均" in detail or "mean" in detail, detail
|
||||
assert plots.value_labels[0].toolTip(), "the peak is not explained anywhere"
|
||||
|
||||
# "Whole session" is the default fit, so it is not a selection.
|
||||
plots.show_all()
|
||||
|
||||
Reference in New Issue
Block a user