diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-03-28 10:14:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-03-28 12:42:20 +0100 |
commit | c2d4406206bfad59c238a0d55eab32d6763226e6 (patch) | |
tree | f0152eb083d9f441acff78aa006db34cabb993f9 /uitest | |
parent | 28d1744552fc7d2144b77a07993918ef33905f1f (diff) |
add check to close_dialog_through_button
to verify that the dialog did indeed close
Change-Id: If591c9144b392a69bea0b380b4b6e4001a8382fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 7d867a14da68..fbe5d2a87c99 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -190,13 +190,17 @@ class UITest(object): time.sleep(DEFAULT_SLEEP) def close_dialog_through_button(self, button): + dialog = self._xUITest.getTopFocusWindow() with EventListener(self._xContext, "DialogClosed" ) as event: button.executeAction("CLICK", tuple()) while True: if event.executed: time.sleep(DEFAULT_SLEEP) - return + break time.sleep(DEFAULT_SLEEP) + parent = self._xUITest.getTopFocusWindow() + if parent == dialog: + raise Exception("executing the action did not close the dialog") def close_doc(self): desktop = self.get_desktop() |