test: Moving state no longer flips to combined view
CI / lint (pull_request) Successful in 38s
CI / test (3.11) (pull_request) Successful in 1m1s
CI / test (3.12) (pull_request) Successful in 1m2s
CI / test (3.13) (pull_request) Successful in 1m1s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m20s
CI / test-with-coverage (pull_request) Successful in 1m31s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 31s
Docs build and publish / docker (push) Successful in 17s
CI / test (3.11) (push) Canceled after 38s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 24s
CI / test (3.12) (push) Canceled after 34s
CI / test (3.13) (push) Canceled after 33s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 29s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 28s
CI / test-with-coverage (push) Canceled after 23s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 25s
CI / lint (pull_request) Successful in 38s
CI / test (3.11) (pull_request) Successful in 1m1s
CI / test (3.12) (pull_request) Successful in 1m2s
CI / test (3.13) (pull_request) Successful in 1m1s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m15s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m20s
CI / test-with-coverage (pull_request) Successful in 1m31s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 31s
Docs build and publish / docker (push) Successful in 17s
CI / test (3.11) (push) Canceled after 38s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 24s
CI / test (3.12) (push) Canceled after 34s
CI / test (3.13) (push) Canceled after 33s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 29s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 28s
CI / test-with-coverage (push) Canceled after 23s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 25s
The fix removed Moving from the motion-watch trigger but the unit test and code comment still described the old behavior, so pre-push failed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit was merged in pull request #164.
This commit is contained in:
@@ -2795,11 +2795,11 @@ class MainWindow(QMainWindow):
|
||||
if self._remote_close_deadline_ts is not None:
|
||||
self._clear_remote_close_request()
|
||||
|
||||
# Only robot-scale motion flips to the Beamline combined view: state
|
||||
# transitions (the server parks in Moving while driving motors) and
|
||||
# the robot station. Busy alone no longer triggers it — Sample
|
||||
# alignment, Beam location, Beamstop alignment, Flux measurement
|
||||
# etc. run busy while the user watches the sample camera itself.
|
||||
# Only the robot station flips to the Beamline combined view. Moving
|
||||
# no longer triggers it (short gonio moves kept stealing the sample
|
||||
# camera), and busy alone never did — Sample alignment, Beam
|
||||
# location, Beamstop alignment, Flux measurement etc. run busy while
|
||||
# the user watches the sample camera itself.
|
||||
# Edge-triggered so a manual tab choice survives between transitions.
|
||||
moving = s.state == BeamlineStateEnum.RobotSampleExchange
|
||||
if moving and not self._watching_motion:
|
||||
|
||||
@@ -71,10 +71,11 @@ def test_main_window_init(qtbot, mock_ui_state, daq_status_factory):
|
||||
win.data_collection._emit_change_energy()
|
||||
assert sent and abs(sent[0] - 12400.0) < 1e-6
|
||||
|
||||
# Motion watch: only a state transition (Moving) or the robot station
|
||||
# switches to the combined beamline view. Busy alone never does —
|
||||
# Sample alignment, Beam location etc. run busy while the user
|
||||
# watches the sample camera itself.
|
||||
# Motion watch: only the robot station switches to the combined
|
||||
# beamline view. Moving no longer does (users kept losing the sample
|
||||
# camera on short gonio moves), and busy alone never does — Sample
|
||||
# alignment, Beam location etc. run busy while the user watches the
|
||||
# sample camera itself.
|
||||
win.update_daq_status(
|
||||
daq_status_factory(state=BeamlineStateEnum.RobotSampleExchange, busy=True)
|
||||
)
|
||||
@@ -88,8 +89,8 @@ def test_main_window_init(qtbot, mock_ui_state, daq_status_factory):
|
||||
win.update_daq_status(daq_status_factory(state=BeamlineStateEnum.BeamLocation, busy=True))
|
||||
assert not win._watching_motion
|
||||
win.update_daq_status(daq_status_factory(state=BeamlineStateEnum.Moving, busy=True))
|
||||
assert win._watching_motion
|
||||
assert win.video_tab.currentWidget() is win.beamline_combined_panel
|
||||
assert not win._watching_motion
|
||||
assert win.video_tab.currentWidget() is win.sample_camera
|
||||
win.update_daq_status(
|
||||
daq_status_factory(state=BeamlineStateEnum.DataCollection, busy=False)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user