diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-07-17 17:12:56 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-07-17 17:21:52 +0200 |
commit | 9a067900cccebe092e71d2dc540aaf0da3c7f091 (patch) | |
tree | 6f15b17799df22e0664414881d2361062d2e2929 | |
parent | 91e05f1631e530b2eaf71deed0a83265e086abd6 (diff) |
uitest: add a complex math test
Change-Id: Ib246c3041f066ecedd1ebbe564566a1824d293bc
-rw-r--r-- | uitest/math_tests/start.py | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py index 5b11ae768e79..66262072b255 100644 --- a/uitest/math_tests/start.py +++ b/uitest/math_tests/start.py @@ -11,8 +11,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.framework import UITestCase -import time -import unittest +from uitest.debug import sleep class SimpleMathTest(UITestCase): @@ -62,4 +61,29 @@ class SimpleMathTest(UITestCase): self.ui_test.close_doc() + def test_complete_math(self): + self.ui_test.create_doc_in_start_center("math") + + xMathDoc = self.xUITest.getTopFocusWindow() + + xList = xMathDoc.getChild("listbox") + state = get_state_as_dict(xList) + self.assertEqual(state["SelectEntryText"], "Unary/Binary Operators") + xList.executeAction("SELECT", mkPropertyValues({"POS": "1"})) + + xMathSelector = xMathDoc.getChild("element_selector") + + xElement = xMathSelector.getChild("1") + xElement.executeAction("SELECT", tuple()) + + xMathEdit = xMathDoc.getChild("math_edit") + xMathEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"1"})) + xMathEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F4"})) + xMathEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"2"})) + + edit_state = get_state_as_dict(xMathEdit) + self.assertEqual("1 <> 2 ", edit_state["Text"]) + + self.ui_test.close_doc() + # vim:set shiftwidth=4 softtabstop=4 expandtab: */ |