diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-20 09:45:36 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-06-20 19:47:45 +0200 |
commit | 37c157340f90aac9d044aa351e5f98299da7342c (patch) | |
tree | b2ea1b01122b85e4822a3ef1920df39e5c8c0af8 /uitest | |
parent | a6a447b08dd3959747181fe5350db68acc8c7481 (diff) |
Propagate failure out from css.ui.test.XUITest::executeCommand/Dialog
Change-Id: Id7bd2d6f35f45d9957facf56d66cfc57a1e0ef6a
Reviewed-on: https://gerrit.libreoffice.org/39002
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/uitest/test.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 04168c48ae2a..f477369154fa 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -70,7 +70,8 @@ class UITest(object): def execute_dialog_through_command(self, command): with EventListener(self._xContext, "DialogExecute") as event: - self._xUITest.executeDialog(command) + if not self._xUITest.executeDialog(command): + raise DialogNotExecutedException(command) time_ = 0 while time_ < MAX_WAIT: if event.executed: @@ -83,7 +84,8 @@ class UITest(object): def execute_modeless_dialog_through_command(self, command): with EventListener(self._xContext, "ModelessDialogVisible") as event: - self._xUITest.executeCommand(command) + if not self._xUITest.executeCommand(command): + raise DialogNotExecutedException(command) time_ = 0 while time_ < MAX_WAIT: if event.executed: @@ -160,7 +162,8 @@ class UITest(object): def close_doc(self): with EventListener(self._xContext, ["DialogExecute", "OnViewClosed"] ) as event: - self._xUITest.executeDialog(".uno:CloseDoc") + if not self._xUITest.executeDialog(".uno:CloseDoc"): + print(".uno:CloseDoc failed") time_ = 0 while time_ < MAX_WAIT: if event.hasExecuted("DialogExecute"): |