Kaydet (Commit) 9a067900 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: add a complex math test

Change-Id: Ib246c3041f066ecedd1ebbe564566a1824d293bc
üst 91e05f16
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment