Kaydet (Commit) 7ec0500e authored tarafından Markus Mohrhard's avatar Markus Mohrhard

use special method to close dialog through button click

Change-Id: Id884cc75503cb433742f9316d9647cff801565f7
Reviewed-on: https://gerrit.libreoffice.org/34230Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 19d52e56
...@@ -18,7 +18,7 @@ class AboutDlgTest(UITestCase): ...@@ -18,7 +18,7 @@ class AboutDlgTest(UITestCase):
xAboutDlg = self.xUITest.getTopFocusWindow() xAboutDlg = self.xUITest.getTopFocusWindow()
xCloseBtn = xAboutDlg.getChild("close") xCloseBtn = xAboutDlg.getChild("close")
xCloseBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xCloseBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -39,7 +39,7 @@ class CalcChartUIDemo(UITestCase): ...@@ -39,7 +39,7 @@ class CalcChartUIDemo(UITestCase):
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
xCancelBtn = xChartDlg.getChild("cancel") xCancelBtn = xChartDlg.getChild("cancel")
xCancelBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xCancelBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
...@@ -54,7 +54,7 @@ class CalcChartUIDemo(UITestCase): ...@@ -54,7 +54,7 @@ class CalcChartUIDemo(UITestCase):
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
xOkBtn = xChartDlg.getChild("finish") xOkBtn = xChartDlg.getChild("finish")
xOkBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xOkBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
...@@ -78,7 +78,7 @@ class CalcChartUIDemo(UITestCase): ...@@ -78,7 +78,7 @@ class CalcChartUIDemo(UITestCase):
xDataInCols.executeAction("CLICK", tuple()) xDataInCols.executeAction("CLICK", tuple())
xCancelBtn = xChartDlg.getChild("finish") xCancelBtn = xChartDlg.getChild("finish")
xCancelBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xCancelBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
...@@ -95,7 +95,7 @@ class CalcChartUIDemo(UITestCase): ...@@ -95,7 +95,7 @@ class CalcChartUIDemo(UITestCase):
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
xNextBtn = xChartDlg.getChild("finish") xNextBtn = xChartDlg.getChild("finish")
xNextBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xNextBtn)
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
...@@ -118,7 +118,7 @@ class CalcChartUIDemo(UITestCase): ...@@ -118,7 +118,7 @@ class CalcChartUIDemo(UITestCase):
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
xNextBtn = xChartDlg.getChild("finish") xNextBtn = xChartDlg.getChild("finish")
xNextBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xNextBtn)
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
...@@ -144,7 +144,7 @@ class CalcChartUIDemo(UITestCase): ...@@ -144,7 +144,7 @@ class CalcChartUIDemo(UITestCase):
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
xNextBtn = xChartDlg.getChild("finish") xNextBtn = xChartDlg.getChild("finish")
xNextBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xNextBtn)
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
......
...@@ -24,7 +24,7 @@ class CreateRangeNameTest(UITestCase): ...@@ -24,7 +24,7 @@ class CreateRangeNameTest(UITestCase):
type_text(xEdit, "simpleRangeName") type_text(xEdit, "simpleRangeName")
xAddBtn = xAddNameDlg.getChild("add") xAddBtn = xAddNameDlg.getChild("add")
xAddBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xAddBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
...@@ -43,7 +43,7 @@ class CreateRangeNameTest(UITestCase): ...@@ -43,7 +43,7 @@ class CreateRangeNameTest(UITestCase):
select_pos(xScope, "1") select_pos(xScope, "1")
xAddBtn = xAddNameDlg.getChild("add") xAddBtn = xAddNameDlg.getChild("add")
xAddBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xAddBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -42,7 +42,7 @@ class CalcChartEditUIDemo(UITestCase): ...@@ -42,7 +42,7 @@ class CalcChartEditUIDemo(UITestCase):
xChartDlg = self.xUITest.getTopFocusWindow() xChartDlg = self.xUITest.getTopFocusWindow()
xNextBtn = xChartDlg.getChild("finish") xNextBtn = xChartDlg.getChild("finish")
xNextBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xNextBtn)
xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
......
...@@ -22,7 +22,7 @@ class FunctionWizardTest(UITestCase): ...@@ -22,7 +22,7 @@ class FunctionWizardTest(UITestCase):
xArrayChkBox.executeAction("CLICK", tuple()) xArrayChkBox.executeAction("CLICK", tuple())
xCancelBtn = xFunctionDlg.getChild("cancel") xCancelBtn = xFunctionDlg.getChild("cancel")
xCancelBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xCancelBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -28,7 +28,7 @@ class tdf105411(UITestCase): ...@@ -28,7 +28,7 @@ class tdf105411(UITestCase):
xCondFormatDlg = self.xUITest.getTopFocusWindow() xCondFormatDlg = self.xUITest.getTopFocusWindow()
xOkBtn = xCondFormatDlg.getChild("ok") xOkBtn = xCondFormatDlg.getChild("ok")
xOkBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xOkBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -23,7 +23,7 @@ class tdf105466(UITestCase): ...@@ -23,7 +23,7 @@ class tdf105466(UITestCase):
xCondFormatDlg = self.xUITest.getTopFocusWindow() xCondFormatDlg = self.xUITest.getTopFocusWindow()
xOkBtn = xCondFormatDlg.getChild("ok") xOkBtn = xCondFormatDlg.getChild("ok")
xOkBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xOkBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -82,7 +82,7 @@ class ConditionalFormatDlgTest(UITestCase): ...@@ -82,7 +82,7 @@ class ConditionalFormatDlgTest(UITestCase):
# close the conditional format manager # close the conditional format manager
xCancelBtn = xCondFormatMgr.getChild("cancel") xCancelBtn = xCondFormatMgr.getChild("cancel")
xCancelBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xCancelBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -33,7 +33,7 @@ class RadioButtonTest(UITestCase): ...@@ -33,7 +33,7 @@ class RadioButtonTest(UITestCase):
xNegativeNumRedCB.executeAction("CLICK",tuple()) xNegativeNumRedCB.executeAction("CLICK",tuple())
okBtn = xCellsDlg.getChild("ok") okBtn = xCellsDlg.getChild("ok")
okBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(okBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -22,7 +22,7 @@ class TabDialogTest(UITestCase): ...@@ -22,7 +22,7 @@ class TabDialogTest(UITestCase):
select_pos(xCellsDlg, "1") select_pos(xCellsDlg, "1")
xOkBtn = xCellsDlg.getChild("ok") xOkBtn = xCellsDlg.getChild("ok")
xOkBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xOkBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
...@@ -38,7 +38,7 @@ class TabDialogTest(UITestCase): ...@@ -38,7 +38,7 @@ class TabDialogTest(UITestCase):
xCellsDlg.executeAction("SELECT", propsUNO) xCellsDlg.executeAction("SELECT", propsUNO)
xOkBtn = xCellsDlg.getChild("ok") xOkBtn = xCellsDlg.getChild("ok")
xOkBtn.executeAction("CLICK", tuple()) self.ui_test.close_dialog_through_button(xOkBtn)
self.ui_test.close_doc() self.ui_test.close_doc()
......
...@@ -144,7 +144,7 @@ class UITest(object): ...@@ -144,7 +144,7 @@ class UITest(object):
if event.hasExecuted("DialogExecute"): if event.hasExecuted("DialogExecute"):
xCloseDlg = self._xUITest.getTopFocusWindow() xCloseDlg = self._xUITest.getTopFocusWindow()
xNoBtn = xCloseDlg.getChild("discard") xNoBtn = xCloseDlg.getChild("discard")
xNoBtn.executeAction("CLICK", tuple()) self.close_dialog_through_button(xNoBtn);
return return
elif event.hasExecuted("OnViewClosed"): elif event.hasExecuted("OnViewClosed"):
return return
......
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