summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-04-03 13:55:57 +0200
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2020-04-03 20:45:07 +0200
commit870314d155d37d6ad110aaaeb8ba2efa41446d5b (patch)
tree37cf57829d8e81e5e115f036202c153b5481c9b1 /uitest
parent6fa2891da4852716fe62d925ffdbeeb380a2ed66 (diff)
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@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/writer_tests4/insertTableDialog.py11
1 files changed, 10 insertions, 1 deletions
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: