Kaydet (Commit) 6da7ccfc authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: remove sleeps and prints from impress and writer parts

Change-Id: Ic4c4ba74701303df1ff38c5ed6ed7d521b369053
üst 18d64ed6
......@@ -29,16 +29,10 @@ class SimpleImpressTest(UITestCase):
self.ui_test.create_doc_in_start_center("impress")
xImpressDoc = self.xUITest.getTopFocusWindow()
print(get_state_as_dict(xImpressDoc))
print(xImpressDoc.getChildren())
xEditWin = xImpressDoc.getChild("impress_win")
xEditWin.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
print(xEditWin.getChildren())
time.sleep(1)
self.ui_test.close_doc()
def test_select_page(self):
......@@ -46,20 +40,11 @@ class SimpleImpressTest(UITestCase):
self.ui_test.create_doc_in_start_center("impress")
xImpressDoc = self.xUITest.getTopFocusWindow()
print(get_state_as_dict(xImpressDoc))
print(xImpressDoc.getChildren())
xEditWin = xImpressDoc.getChild("impress_win")
time.sleep(1)
print(get_state_as_dict(xEditWin))
xEditWin.executeAction("GOTO", mkPropertyValues({"PAGE": "2"}))
time.sleep(1)
print(get_state_as_dict(xEditWin))
self.ui_test.close_doc()
def test_select_text(self):
......@@ -67,15 +52,9 @@ class SimpleImpressTest(UITestCase):
self.ui_test.create_doc_in_start_center("impress")
xImpressDoc = self.xUITest.getTopFocusWindow()
print(get_state_as_dict(xImpressDoc))
print(xImpressDoc.getChildren())
xEditWin = xImpressDoc.getChild("impress_win")
time.sleep(1)
print(get_state_as_dict(xEditWin))
self.ui_test.close_doc()
def test_select_object(self):
......@@ -83,19 +62,12 @@ class SimpleImpressTest(UITestCase):
self.ui_test.create_doc_in_start_center("impress")
xImpressDoc = self.xUITest.getTopFocusWindow()
print(get_state_as_dict(xImpressDoc))
print(xImpressDoc.getChildren())
xEditWin = xImpressDoc.getChild("impress_win")
xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
time.sleep(1)
xEditWin.executeAction("DESELECT", tuple())
time.sleep(1)
print(get_state_as_dict(xEditWin))
self.ui_test.close_doc()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -30,15 +30,11 @@ class SimpleWriterTest(UITestCase):
self.ui_test.create_doc_in_start_center("writer")
xWriterDoc = self.xUITest.getTopFocusWindow()
print(xWriterDoc.getChildren())
xWriterEdit = xWriterDoc.getChild("writer_edit")
print(xWriterEdit.getState())
xWriterEdit.executeAction("SET", mkPropertyValues({"ZOOM": "200"}))
time.sleep(2)
self.ui_test.close_doc()
def test_type_text(self):
......@@ -50,8 +46,6 @@ class SimpleWriterTest(UITestCase):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "This is my first writer text written through the UI testing"}))
time.sleep(2)
self.ui_test.close_doc()
def test_goto_first_page(self):
......@@ -62,14 +56,11 @@ class SimpleWriterTest(UITestCase):
xWriterEdit = xWriterDoc.getChild("writer_edit")
state = get_state_as_dict(xWriterEdit)
print(state)
while state["CurrentPage"] is "1":
xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
state = get_state_as_dict(xWriterEdit)
xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "1"}))
print(state)
time.sleep(2)
self.ui_test.close_doc()
......@@ -83,15 +74,8 @@ class SimpleWriterTest(UITestCase):
xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "This is my first writer text written through the UI testing"}))
time.sleep(2)
print(get_state_as_dict(xWriterEdit))
xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "4"}))
print(get_state_as_dict(xWriterEdit))
time.sleep(2)
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