summaryrefslogtreecommitdiff
path: root/uitest/math_tests
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-24 01:53:06 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-24 02:40:43 +0200
commit9a89eea4c3c58d2efce8afe709c0317869839ff9 (patch)
treef235036802674593f9cf6253f2f6363664494233 /uitest/math_tests
parent6805efdecb240fad8c82a5c1756a2a0e92f12b7d (diff)
Revert "uitest: guard create_doc_in_start_center"
This reverts commit 374baf308979306aa35575118c40ccd7caae1e29. Many uitests are failing randomly in jenkins for no apparent reason Change-Id: I5960330fab4967518bfeea32b3b8c5f8bfbea57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117752 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest/math_tests')
-rw-r--r--uitest/math_tests/start.py78
1 files changed, 44 insertions, 34 deletions
diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py
index 9d1e51df69f7..2ad977f73917 100644
--- a/uitest/math_tests/start.py
+++ b/uitest/math_tests/start.py
@@ -18,64 +18,74 @@ class SimpleMathTest(UITestCase):
def test_start_math(self):
- with self.ui_test.create_doc_in_start_center("math"):
+ self.ui_test.create_doc_in_start_center("math")
- xMathDoc = self.xUITest.getTopFocusWindow()
+ xMathDoc = self.xUITest.getTopFocusWindow()
+
+ self.ui_test.close_doc()
def test_docking_window_listbox(self):
- with self.ui_test.create_doc_in_start_center("math"):
+ self.ui_test.create_doc_in_start_center("math")
+
+ xMathDoc = self.xUITest.getTopFocusWindow()
- xMathDoc = self.xUITest.getTopFocusWindow()
+ xList = xMathDoc.getChild("listbox")
+ state = get_state_as_dict(xList)
+ self.assertEqual(state["SelectEntryText"], "Unary/Binary Operators")
+ select_pos(xList, "1")
+ state = get_state_as_dict(xList)
+ self.assertEqual(state["SelectEntryText"], "Relations")
- xList = xMathDoc.getChild("listbox")
- state = get_state_as_dict(xList)
- self.assertEqual(state["SelectEntryText"], "Unary/Binary Operators")
- select_pos(xList, "1")
- state = get_state_as_dict(xList)
- self.assertEqual(state["SelectEntryText"], "Relations")
+ self.ui_test.close_doc()
def test_math_edit(self):
- with self.ui_test.create_doc_in_start_center("math"):
+ self.ui_test.create_doc_in_start_center("math")
+
+ xMathDoc = self.xUITest.getTopFocusWindow()
- xMathDoc = self.xUITest.getTopFocusWindow()
+ xMathEdit = xMathDoc.getChild("math_edit")
- xMathEdit = xMathDoc.getChild("math_edit")
+ type_text(xMathEdit, "E=mc^2")
- type_text(xMathEdit, "E=mc^2")
+ self.ui_test.close_doc()
def test_math_selector(self):
- with self.ui_test.create_doc_in_start_center("math"):
+ self.ui_test.create_doc_in_start_center("math")
- xMathDoc = self.xUITest.getTopFocusWindow()
+ xMathDoc = self.xUITest.getTopFocusWindow()
- xMathSelector = xMathDoc.getChild("element_selector")
+ xMathSelector = xMathDoc.getChild("element_selector")
- xElement = xMathSelector.getChild("1")
- xElement.executeAction("SELECT", tuple())
+ xElement = xMathSelector.getChild("1")
+ xElement.executeAction("SELECT", tuple())
+
+ self.ui_test.close_doc()
@unittest.skip("on windows the f4 does not always work")
def test_complete_math(self):
- with self.ui_test.create_doc_in_start_center("math"):
+ self.ui_test.create_doc_in_start_center("math")
+
+ xMathDoc = self.xUITest.getTopFocusWindow()
- xMathDoc = self.xUITest.getTopFocusWindow()
+ xList = xMathDoc.getChild("listbox")
+ state = get_state_as_dict(xList)
+ self.assertEqual(state["SelectEntryText"], "Unary/Binary Operators")
+ select_pos(xList, "1")
- xList = xMathDoc.getChild("listbox")
- state = get_state_as_dict(xList)
- self.assertEqual(state["SelectEntryText"], "Unary/Binary Operators")
- select_pos(xList, "1")
+ xMathSelector = xMathDoc.getChild("element_selector")
- xMathSelector = xMathDoc.getChild("element_selector")
+ xElement = xMathSelector.getChild("1")
+ xElement.executeAction("SELECT", tuple())
- xElement = xMathSelector.getChild("1")
- xElement.executeAction("SELECT", tuple())
+ xMathEdit = xMathDoc.getChild("math_edit")
+ type_text(xMathEdit, "1")
+ xMathEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F4"}))
+ type_text(xMathEdit, "2")
- xMathEdit = xMathDoc.getChild("math_edit")
- type_text(xMathEdit, "1")
- xMathEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F4"}))
- type_text(xMathEdit, "2")
+ edit_state = get_state_as_dict(xMathEdit)
+ self.assertEqual("1 <> 2 ", edit_state["Text"])
- 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: