1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-04 16:02:51 +01:00

fix(launch_window): added one more connection for BECStatusBroker to show launcher

This commit is contained in:
2025-12-08 11:26:23 +01:00
parent 55146665d2
commit d6f5c0e4f9
2 changed files with 8 additions and 8 deletions

View File

@@ -549,7 +549,7 @@ class LaunchWindow(BECMainWindow):
remaining_connections = [
connection for connection in connections.values() if connection.parent_id != self.gui_id
]
return len(remaining_connections) <= 4
return len(remaining_connections) <= 5
def _turn_off_the_lights(self, connections: dict):
"""

View File

@@ -78,15 +78,15 @@ def test_available_widgets(qtbot, connected_client_gui_obj):
"""This test checks that all widgets that are available via gui.available_widgets can be created and removed."""
gui = connected_client_gui_obj
dock_area = gui.bec
# Number of top level widgets, should be 4
top_level_widgets_count = 12
# Number of top level widgets, should be 5
top_level_widgets_count = 13
assert len(gui._server_registry) == top_level_widgets_count
names = set(list(gui._server_registry.keys()))
# Number of widgets with parent_id == None, should be 2
# Number of widgets with parent_id == None, should be 3
widgets = [
widget for widget in gui._server_registry.values() if widget["config"]["parent_id"] is None
]
assert len(widgets) == 2
assert len(widgets) == 3
# Test all relevant widgets
for object_name in gui.available_widgets.__dict__:
@@ -122,7 +122,7 @@ def test_available_widgets(qtbot, connected_client_gui_obj):
for widget in gui._server_registry.values()
if widget["config"]["parent_id"] is None
]
assert len(widgets) == 2
assert len(widgets) == 3
#############################
####### Remove widget #######
@@ -154,10 +154,10 @@ def test_available_widgets(qtbot, connected_client_gui_obj):
f"is {len(gui._server_registry)} instead of {top_level_widgets_count}. The following "
f"widgets are not cleaned up: {set(gui._server_registry.keys()) - names}"
) from exc
# Number of widgets with parent_id == None, should be 2
# Number of widgets with parent_id == None, should be 3
widgets = [
widget
for widget in gui._server_registry.values()
if widget["config"]["parent_id"] is None
]
assert len(widgets) == 2
assert len(widgets) == 3