Skip to content

Commit eb8d34a

Browse files
committed
Remote API: new "raise_window" method
1 parent 96dea4a commit eb8d34a

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"--unattended",
3232
],
3333
"env": {
34+
"GUIDATA_PARSE_ARGS": "1",
3435
// "DEBUG": "1",
3536
// "LANG": "fr",
3637
"QT_COLOR_MODE": "light",

cdlclient/baseproxy.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ def get_version(self) -> str:
5454
def close_application(self) -> None:
5555
"""Close DataLab application"""
5656

57+
@abc.abstractmethod
58+
def raise_window(self) -> None:
59+
"""Raise DataLab window"""
60+
5761
@abc.abstractmethod
5862
def switch_to_panel(self, panel: str) -> None:
5963
"""Switch to panel.
@@ -342,6 +346,10 @@ def close_application(self) -> None:
342346
"""Close DataLab application"""
343347
self._cdl.close_application()
344348

349+
def raise_window(self) -> None:
350+
"""Raise DataLab window"""
351+
self._cdl.raise_window()
352+
345353
def switch_to_panel(self, panel: str) -> None:
346354
"""Switch to panel.
347355

cdlclient/tests/remoteclient_app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ def test_remote_client():
260260
window.init_cdl()
261261
with qt_wait_print(dt, "Executing multiple commands"):
262262
window.exec_multiple_cmd()
263+
with qt_wait_print(dt, "Raising DataLab window"):
264+
window.raise_cdl()
263265
with qt_wait_print(dt, "Getting object titles"):
264266
window.get_object_titles()
265267
with qt_wait_print(dt, "Getting object uuids"):

cdlclient/tests/remoteclient_base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def setup_window(self):
110110
self.host.add_label(self.PURPOSE)
111111
add_btn = self.host.add_button
112112
add_btn(self.INIT_BUTTON_LABEL, self.init_cdl, 10, "DialogApplyButton")
113+
add_btn("Raise window", self.raise_cdl, 0, "FileDialogToParent")
113114
self.add_additional_buttons()
114115
add_btn("Add signal objects", self.add_signals, 10, "CommandLink")
115116
add_btn("Add image objects", self.add_images, 0, "CommandLink")
@@ -123,6 +124,12 @@ def add_additional_buttons(self):
123124
def init_cdl(self):
124125
"""Open DataLab test"""
125126

127+
def raise_cdl(self):
128+
"""Raise DataLab window"""
129+
if self.cdl is not None:
130+
self.cdl.raise_window()
131+
self.host.log("=> Raised DataLab window")
132+
126133
@abc.abstractmethod
127134
def close_cdl(self):
128135
"""Close DataLab window"""

0 commit comments

Comments
 (0)