0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

refactor: add option to select scan and hide arg bundle buttons

This commit is contained in:
2024-08-28 21:32:46 +02:00
parent 664bbce01d
commit 7dadab1f14
2 changed files with 75 additions and 2 deletions

View File

@ -233,6 +233,16 @@ def test_populate_scans(scan_control, mocked_client):
assert sorted(items) == sorted(expected_scans)
def test_current_scan(scan_control, mocked_client):
current_scan = scan_control.current_scan
wrong_scan = "error_scan"
scan_control.current_scan = wrong_scan
assert scan_control.current_scan == current_scan
new_scan = "grid_scan" if current_scan == "line_scan" else "line_scan"
scan_control.current_scan = new_scan
assert scan_control.current_scan == new_scan
@pytest.mark.parametrize("scan_name", ["line_scan", "grid_scan"])
def test_on_scan_selected(scan_control, scan_name):
expected_scan_info = available_scans_message.resource[scan_name]