Kaydet (Commit) 16e6889e authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: remove sleeps and prints from calc demo

These sleeps are only necessary when you want to run them non-headless
and see what is actually happening.

Change-Id: I20bd80c680c8569bc3c885f261e03db494afee06
üst f928a998
...@@ -69,14 +69,10 @@ class CalcChartUIDemo(UITestCase): ...@@ -69,14 +69,10 @@ class CalcChartUIDemo(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart") self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart")
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
print(xChartDlg.getChildren())
time.sleep(2)
xOkBtn = xChartDlg.getChild("finish") xOkBtn = xChartDlg.getChild("finish")
xOkBtn.executeAction("CLICK", tuple()) xOkBtn.executeAction("CLICK", tuple())
time.sleep(2)
self.ui_test.close_doc() self.ui_test.close_doc()
def test_create_from_second_page(self): def test_create_from_second_page(self):
...@@ -88,31 +84,19 @@ class CalcChartUIDemo(UITestCase): ...@@ -88,31 +84,19 @@ class CalcChartUIDemo(UITestCase):
self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart") self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart")
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
print(xChartDlg.getChildren())
time.sleep(2)
xNextBtn = xChartDlg.getChild("next") xNextBtn = xChartDlg.getChild("next")
xNextBtn.executeAction("CLICK", tuple()) xNextBtn.executeAction("CLICK", tuple())
print(xChartDlg.getChildren())
time.sleep(2)
xDataInRows = xChartDlg.getChild("RB_DATAROWS") xDataInRows = xChartDlg.getChild("RB_DATAROWS")
xDataInRows.executeAction("CLICK", tuple()) xDataInRows.executeAction("CLICK", tuple())
time.sleep(2)
xDataInCols = xChartDlg.getChild("RB_DATACOLS") xDataInCols = xChartDlg.getChild("RB_DATACOLS")
xDataInCols.executeAction("CLICK", tuple()) xDataInCols.executeAction("CLICK", tuple())
time.sleep(2)
xCancelBtn = xChartDlg.getChild("finish") xCancelBtn = xChartDlg.getChild("finish")
xCancelBtn.executeAction("CLICK", tuple()) xCancelBtn.executeAction("CLICK", tuple())
time.sleep(5)
self.ui_test.close_doc() self.ui_test.close_doc()
def test_deselect_chart(self): def test_deselect_chart(self):
...@@ -154,13 +138,9 @@ class CalcChartUIDemo(UITestCase): ...@@ -154,13 +138,9 @@ class CalcChartUIDemo(UITestCase):
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
time.sleep(2)
xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
xGridWindow.executeAction("ACTIVATE", tuple()) xGridWindow.executeAction("ACTIVATE", tuple())
time.sleep(2)
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
self.ui_test.close_doc() self.ui_test.close_doc()
...@@ -187,7 +167,6 @@ class CalcChartUIDemo(UITestCase): ...@@ -187,7 +167,6 @@ class CalcChartUIDemo(UITestCase):
xGridWindow.executeAction("ACTIVATE", tuple()) xGridWindow.executeAction("ACTIVATE", tuple())
xCalcDoc = self.xUITest.getTopFocusWindow() xCalcDoc = self.xUITest.getTopFocusWindow()
print(xCalcDoc.getChildren())
self.ui_test.close_doc() self.ui_test.close_doc()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */ # vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -37,8 +37,6 @@ class GridWindowTest(UITestCase): ...@@ -37,8 +37,6 @@ class GridWindowTest(UITestCase):
enter_text_to_cell(xGridWindow, "C3", "=A1") enter_text_to_cell(xGridWindow, "C3", "=A1")
enter_text_to_cell(xGridWindow, "A1", "2") enter_text_to_cell(xGridWindow, "A1", "2")
time.sleep(2)
self.ui_test.close_doc() self.ui_test.close_doc()
def test_special_keys(self): def test_special_keys(self):
...@@ -54,8 +52,6 @@ class GridWindowTest(UITestCase): ...@@ -54,8 +52,6 @@ class GridWindowTest(UITestCase):
typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"}) typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"})
xGridWindow.executeAction("TYPE", typeProps) xGridWindow.executeAction("TYPE", typeProps)
time.sleep(2)
self.ui_test.close_doc() self.ui_test.close_doc()
# vim:set shiftwidth=4 softtabstop=4 expandtab: */ # 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