[Libreoffice-commits] core.git: sd/qa uitest/uitest
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 4 13:07:52 UTC 2021
sd/qa/uitest/impress_tests/embedded.py | 26 ++++++++++++--------------
uitest/uitest/test.py | 2 +-
2 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit 7f1315ca929c0c8e888e5d1fb7987ba7d7ce395a
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue May 4 12:19:37 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue May 4 15:07:14 2021 +0200
uitest: sd: simplify code
Change-Id: If4a3b1d5613e239a967b70309779dbdb6632e6ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115067
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
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
More information about the Libreoffice-commits
mailing list