mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-05-04 13:54:19 +02:00
fix(dock_area): change to show_dialo=False for CLI profile baseline restore
This commit is contained in:
@@ -375,7 +375,7 @@ class BECDockArea(RPCBase):
|
||||
|
||||
@rpc_timeout(None)
|
||||
@rpc_call
|
||||
def restore_baseline_profile(self, name: "str | None" = None, show_dialog: "bool" = True):
|
||||
def restore_baseline_profile(self, name: "str | None" = None, show_dialog: "bool" = False):
|
||||
"""
|
||||
Overwrite the runtime copy of *name* with the baseline.
|
||||
If *name* is None, target the currently active profile.
|
||||
@@ -1399,7 +1399,7 @@ class DockAreaView(RPCBase):
|
||||
|
||||
@rpc_timeout(None)
|
||||
@rpc_call
|
||||
def restore_baseline_profile(self, name: "str | None" = None, show_dialog: "bool" = True):
|
||||
def restore_baseline_profile(self, name: "str | None" = None, show_dialog: "bool" = False):
|
||||
"""
|
||||
Overwrite the runtime copy of *name* with the baseline.
|
||||
If *name* is None, target the currently active profile.
|
||||
|
||||
@@ -907,7 +907,7 @@ class BECDockArea(DockAreaWidget):
|
||||
@SafeSlot(str)
|
||||
@SafeSlot(str, bool)
|
||||
@rpc_timeout(None)
|
||||
def restore_baseline_profile(self, name: str | None = None, show_dialog: bool = True):
|
||||
def restore_baseline_profile(self, name: str | None = None, show_dialog: bool = False):
|
||||
"""
|
||||
Overwrite the runtime copy of *name* with the baseline.
|
||||
If *name* is None, target the currently active profile.
|
||||
|
||||
@@ -235,4 +235,4 @@ class WorkspaceConnection(BundleConnection):
|
||||
"""
|
||||
Refreshes the current workspace.
|
||||
"""
|
||||
self.target_widget.restore_baseline_profile()
|
||||
self.target_widget.restore_baseline_profile(show_dialog=True)
|
||||
|
||||
@@ -1421,7 +1421,7 @@ class TestAdvancedDockAreaRestoreAndDialogs:
|
||||
patch.object(advanced_dock_area, "delete_all") as mock_delete_all,
|
||||
patch.object(advanced_dock_area, "load_profile") as mock_load_profile,
|
||||
):
|
||||
advanced_dock_area.restore_baseline_profile()
|
||||
advanced_dock_area.restore_baseline_profile(show_dialog=True)
|
||||
|
||||
assert mock_restore.call_count == 1
|
||||
args, kwargs = mock_restore.call_args
|
||||
@@ -1455,7 +1455,7 @@ class TestAdvancedDockAreaRestoreAndDialogs:
|
||||
with patch(
|
||||
"bec_widgets.widgets.containers.dock_area.dock_area.restore_runtime_from_baseline"
|
||||
) as mock_restore:
|
||||
advanced_dock_area.restore_baseline_profile()
|
||||
advanced_dock_area.restore_baseline_profile(show_dialog=True)
|
||||
|
||||
mock_restore.assert_not_called()
|
||||
|
||||
@@ -1489,7 +1489,7 @@ class TestAdvancedDockAreaRestoreAndDialogs:
|
||||
with patch(
|
||||
"bec_widgets.widgets.containers.dock_area.dock_area.RestoreProfileDialog.confirm"
|
||||
) as mock_confirm:
|
||||
advanced_dock_area.restore_baseline_profile()
|
||||
advanced_dock_area.restore_baseline_profile(show_dialog=True)
|
||||
mock_confirm.assert_not_called()
|
||||
|
||||
def test_refresh_workspace_list_with_refresh_profiles(self, advanced_dock_area):
|
||||
|
||||
Reference in New Issue
Block a user