[Libreoffice-commits] core.git: uitest/writer_tests4
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 3 18:45:45 UTC 2020
uitest/writer_tests4/insertTableDialog.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 870314d155d37d6ad110aaaeb8ba2efa41446d5b
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Apr 3 13:55:57 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Apr 3 20:45:07 2020 +0200
uitest: add asserts to table dialog
Change-Id: Id44531def1a0b6e7c0ab5686ed651633ccb502b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91655
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/uitest/writer_tests4/insertTableDialog.py b/uitest/writer_tests4/insertTableDialog.py
index ff9e3349943a..0cb020d19da0 100644
--- a/uitest/writer_tests4/insertTableDialog.py
+++ b/uitest/writer_tests4/insertTableDialog.py
@@ -6,6 +6,7 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
class WriterInsertTableDialog(UITestCase):
@@ -29,6 +30,10 @@ class WriterInsertTableDialog(UITestCase):
xRowSpin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
xRowSpin.executeAction("TYPE", mkPropertyValues({"TEXT": str(rows)}))
+ self.assertEqual(get_state_as_dict(xNameEdit)["Text"], name)
+ self.assertEqual(get_state_as_dict(xColSpin)["Text"], str(cols))
+ self.assertEqual(get_state_as_dict(xRowSpin)["Text"], str(rows))
+
xOkBtn = xDialog.getChild("ok")
xOkBtn.executeAction("CLICK", tuple())
@@ -83,13 +88,17 @@ class WriterInsertTableDialog(UITestCase):
self.ui_test.close_doc()
- def test_cancel_button_insert_line_break_dialog(self):
+ def test_cancel_button_insert_table_dialog(self):
self.ui_test.create_doc_in_start_center("writer")
self.ui_test.execute_dialog_through_command(".uno:InsertTable")
Dialog = self.xUITest.getTopFocusWindow()
CancelBtn = Dialog.getChild("cancel")
self.ui_test.close_dialog_through_button(CancelBtn)
+ document = self.ui_test.get_component()
+ tables = document.getTextTables()
+ self.assertEqual(len(tables), 0)
+
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
More information about the Libreoffice-commits
mailing list