mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-06-07 05:48:40 +02:00
wip scan group box correct filter
This commit is contained in:
@@ -272,16 +272,11 @@ class ScanGroupBox(QGroupBox):
|
||||
if default == "_empty":
|
||||
default = None
|
||||
if widget_class is DeviceComboBox:
|
||||
device_filter = (
|
||||
BECDeviceFilter.POSITIONER
|
||||
if item["type"] == ScanArgType.DEVICE
|
||||
else BECDeviceFilter.DEVICE
|
||||
)
|
||||
widget = widget_class(
|
||||
parent=self.parent(),
|
||||
arg_name=arg_name,
|
||||
default=default,
|
||||
device_filter=device_filter,
|
||||
device_filter=BECDeviceFilter.DEVICE,
|
||||
)
|
||||
else:
|
||||
widget = widget_class(parent=self.parent(), arg_name=arg_name, default=default)
|
||||
|
||||
@@ -308,7 +308,9 @@ def test_on_scan_selected(scan_control, scan_name):
|
||||
if isinstance(widget, DeviceComboBox):
|
||||
assert widget.currentText() == ""
|
||||
assert "samx" in widget.devices
|
||||
assert "bpm3a" not in widget.devices
|
||||
assert (
|
||||
"async_device" in widget.devices
|
||||
) # async device should also be present in the device list
|
||||
|
||||
# Check kwargs boxes
|
||||
kwargs_group = [param for param in expected_scan_info["gui_config"]["kwarg_groups"]]
|
||||
|
||||
Reference in New Issue
Block a user