summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-17 00:53:39 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-17 00:53:39 +0200
commitd66e284151105dfea4e8b7eeae3166c510964919 (patch)
treee43582cda494152df6ef89a29cf71cd38e99e120 /uitest
parent72dd364fa9fca9b8668878517df8489f1fb1f8ba (diff)
uitest: add some initial math ui tests
Change-Id: Iad02a40b683d7b3bbbad0214c82ad4b5b6878ea9
Diffstat (limited to 'uitest')
-rw-r--r--uitest/math_tests/start.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py
new file mode 100644
index 000000000000..10d345039bcc
--- /dev/null
+++ b/uitest/math_tests/start.py
@@ -0,0 +1,43 @@
+# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.uihelper.common import get_state_as_dict
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+from uitest.framework import UITestCase
+
+import time
+import unittest
+
+class SimpleMathTest(UITestCase):
+
+ def test_start_math(self):
+
+ self.ui_test.create_doc_in_start_center("math")
+
+ xMathDoc = self.xUITest.getTopFocusWindow()
+
+ self.ui_test.close_doc()
+
+ def test_docking_window_listbox(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"}))
+ state = get_state_as_dict(xList)
+ self.assertEqual(state["SelectEntryText"], "Relations")
+
+ self.ui_test.close_doc()
+
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab: */