diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-17 17:01:23 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-21 10:29:40 +0200 |
commit | 8298aa62726312eee6f8fbb64a9fc9b12680447f (patch) | |
tree | d35191b8bc0a48e0e086b19c9c3c0503e217c71b /sw/qa/uitest/findReplace/tdf118208.py | |
parent | e837f50313a703b6b26abb78f224472c1e4734ea (diff) |
uitest: guard execute_blocking_action
so even if an assert fails, the dialog is closed afterwards
for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac
< UITest: introduce guarded context managers >
Change-Id: I9a3adb52546238d960eeaaaf03b6bdbbd5718cf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117392
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/uitest/findReplace/tdf118208.py')
-rw-r--r-- | sw/qa/uitest/findReplace/tdf118208.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/qa/uitest/findReplace/tdf118208.py b/sw/qa/uitest/findReplace/tdf118208.py index c602158b17a4..17cd71fc9923 100644 --- a/sw/qa/uitest/findReplace/tdf118208.py +++ b/sw/qa/uitest/findReplace/tdf118208.py @@ -44,12 +44,9 @@ class tdf118208(UITestCase): xDialog = self.xUITest.getTopFocusWindow() format = xDialog.getChild("format") - def handle_format_dlg(dialog): - xOkBtn = dialog.getChild("ok") - self.ui_test.close_dialog_through_button(xOkBtn) - self.ui_test.execute_blocking_action(format.executeAction, args=('CLICK', ()), - dialog_handler=handle_format_dlg) + with self.ui_test.execute_blocking_action(format.executeAction, args=('CLICK', ())): + pass #verify self.assertEqual(document.Text.String[0:14], "Aaaaaaaaaaaaaa") |