summaryrefslogtreecommitdiff
path: root/uitest/math_tests
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/math_tests')
-rw-r--r--uitest/math_tests/start.py28
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: */