uitest/writer_tests4/insertTableDialog.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit 870314d155d37d6ad110aaaeb8ba2efa41446d5b Author: Xisco Fauli <[email protected]> AuthorDate: Fri Apr 3 13:55:57 2020 +0200 Commit: Xisco FaulĂ <[email protected]> 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Ă <[email protected]> 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: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
