tdf#tdf#137726: sc: Add UItest
Change-Id: I67bcafb3155b991dc8b1515f224675906e0a5955
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104897
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/uitest/calc_dialogs/openDialogs.py b/sc/qa/uitest/calc_dialogs/openDialogs.py
index abf6857..79759b9 100644
--- a/sc/qa/uitest/calc_dialogs/openDialogs.py
+++ b/sc/qa/uitest/calc_dialogs/openDialogs.py
@@ -26,8 +26,8 @@ dialogs = [
# tested in sc/qa/uitest/search_replace/*
# {"command": ".uno:InsertObjectChart", "closeButton": "cancel"},
# tested in uitest/calc_tests/create_chart.py
{"command": ".uno:DataDataPilotRun", "closeButton": "cancel", "skipTestOK": True},
# OK button triggers a new dialog
# {"command": ".uno:DataDataPilotRun", "closeButton": "cancel", "skipTestOK": True},
# tested in sc/qa/uitest/calc_tests8/tdf137726.py
# {"command": ".uno:FunctionDialog", "closeButton": "cancel"},
# Cancel button tested in uitest/calc_tests/function_wizard.py
# OK button tested in sc/qa/uitest/calc_tests7/tdf123479.py
diff --git a/sc/qa/uitest/calc_tests8/tdf137726.py b/sc/qa/uitest/calc_tests8/tdf137726.py
new file mode 100644
index 0000000..8256a77
--- /dev/null
+++ b/sc/qa/uitest/calc_tests8/tdf137726.py
@@ -0,0 +1,28 @@
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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.framework import UITestCase
class tdf137726(UITestCase):
def test_tdf137726(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
self.ui_test.execute_dialog_through_command(".uno:DataDataPilotRun")
# three dialogs are displayed one after the other, click OK in all of them
for i in range(3):
xDialog = self.xUITest.getTopFocusWindow()
xOKBtn = xDialog.getChild('ok')
self.ui_test.close_dialog_through_button(xOKBtn)
# Without the fix in place, this test would have hung here
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: