summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-05-04 12:19:37 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-05-04 15:07:14 +0200
commit7f1315ca929c0c8e888e5d1fb7987ba7d7ce395a (patch)
treed7129187e9c8ed44baeab3f433e41669c0f55f47
parent021ec9bb9ffa6ae8fbb73c2f6ea4bc0b8df9ddef (diff)
uitest: sd: simplify code
Change-Id: If4a3b1d5613e239a967b70309779dbdb6632e6ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115067 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sd/qa/uitest/impress_tests/embedded.py26
-rw-r--r--uitest/uitest/test.py2
2 files changed, 13 insertions, 15 deletions
diff --git a/sd/qa/uitest/impress_tests/embedded.py b/sd/qa/uitest/impress_tests/embedded.py
index ce7905d4b3fd..3cec962dd1b4 100644
--- a/sd/qa/uitest/impress_tests/embedded.py
+++ b/sd/qa/uitest/impress_tests/embedded.py
@@ -19,20 +19,18 @@ class EmbeddedDocument(UITestCase):
xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Object 2"}))
- def handle_embedded_document_dlg(dialog):
- document = self.ui_test.get_component()
- self.assertEqual("Name", get_cell_by_position(document, 0, 0, 0).getString())
- self.assertEqual("NWell", get_cell_by_position(document, 0, 0, 1).getString())
- self.assertEqual("PWell", get_cell_by_position(document, 0, 0, 2).getString())
- self.assertEqual("Active", get_cell_by_position(document, 0, 0, 3).getString())
- self.assertEqual("NoPoly", get_cell_by_position(document, 0, 0, 4).getString())
- self.assertEqual("Poly", get_cell_by_position(document, 0, 0, 5).getString())
- self.assertEqual("Sized", get_cell_by_position(document, 0, 0, 6).getString())
-
- self.xUITest.executeCommand(".uno:CloseDoc")
-
- self.ui_test.execute_blocking_action(xEditWin.executeAction, args=("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})),
- dialog_handler=handle_embedded_document_dlg)
+ xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+
+ document = self.ui_test.get_component()
+ self.assertEqual("Name", get_cell_by_position(document, 0, 0, 0).getString())
+ self.assertEqual("NWell", get_cell_by_position(document, 0, 0, 1).getString())
+ self.assertEqual("PWell", get_cell_by_position(document, 0, 0, 2).getString())
+ self.assertEqual("Active", get_cell_by_position(document, 0, 0, 3).getString())
+ self.assertEqual("NoPoly", get_cell_by_position(document, 0, 0, 4).getString())
+ self.assertEqual("Poly", get_cell_by_position(document, 0, 0, 5).getString())
+ self.assertEqual("Sized", get_cell_by_position(document, 0, 0, 6).getString())
+
+ self.xUITest.executeCommand(".uno:CloseDoc")
self.ui_test.close_doc()
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 2cb304c05239..b96bcdf1bc30 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -206,7 +206,7 @@ class UITest(object):
"""
thread = threading.Thread(target=action, args=args)
- with EventListener(self._xContext, ["OnLoad", "DialogExecute", "ModelessDialogExecute", "ModelessDialogVisible"], printNames=printNames) as event:
+ with EventListener(self._xContext, ["DialogExecute", "ModelessDialogExecute", "ModelessDialogVisible"], printNames=printNames) as event:
thread.start()
time_ = 0
# we are not necessarily opening a dialog, so wait much longer