0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

feat(launcher): add support for launching plugin widget

This commit is contained in:
2025-05-07 12:45:54 +02:00
parent b9e56c96cb
commit 1fb680abb4
2 changed files with 123 additions and 50 deletions

View File

@ -64,7 +64,7 @@ def test_launch_window_launch_ui_file_raises_for_qmainwindow(bec_launch_window):
def test_launch_window_launch_default_auto_update(bec_launch_window):
# Mock the auto update selection
bec_launch_window.tile_auto_update.selector.setCurrentText("Default")
bec_launch_window.tiles["auto_update"].selector.setCurrentText("Default")
# Call the method to launch the auto update
res = bec_launch_window._open_auto_update()
@ -82,11 +82,11 @@ def test_launch_window_launch_plugin_auto_update(bec_launch_window):
class PluginAutoUpdate(AutoUpdates): ...
bec_launch_window.available_auto_updates = {"PluginAutoUpdate": PluginAutoUpdate}
bec_launch_window.tile_auto_update.selector.clear()
bec_launch_window.tile_auto_update.selector.addItems(
bec_launch_window.tiles["auto_update"].selector.clear()
bec_launch_window.tiles["auto_update"].selector.addItems(
list(bec_launch_window.available_auto_updates.keys()) + ["Default"]
)
bec_launch_window.tile_auto_update.selector.setCurrentText("PluginAutoUpdate")
bec_launch_window.tiles["auto_update"].selector.setCurrentText("PluginAutoUpdate")
res = bec_launch_window._open_auto_update()
assert isinstance(res, PluginAutoUpdate)
assert res.windowTitle() == "BEC - PluginAutoUpdate"