From 870314d155d37d6ad110aaaeb8ba2efa41446d5b Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 3 Apr 2020 13:55:57 +0200 Subject: uitest: add asserts to table dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id44531def1a0b6e7c0ab5686ed651633ccb502b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91655 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ --- uitest/writer_tests4/insertTableDialog.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'uitest') 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: -- cgit