diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-21 19:09:18 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-22 08:08:28 +0200 |
commit | 7dc6fc32eb618da6defb8a9f330978fa019677b8 (patch) | |
tree | e63a968273ee3be8e23af9e3f5f18b449f60e027 /sw | |
parent | e25fd7782ad04dc363b4265e1bd08d6e092b50c5 (diff) |
uitest: Check the more icons dialog opens
Change-Id: I51b48409bc0dff7098f06f419f9db3707f47b5fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104641
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/options/optionsDialog.py | 38 | ||||
-rw-r--r-- | sw/qa/uitest/writer_dialogs/openDialogs.py | 3 |
2 files changed, 40 insertions, 1 deletions
diff --git a/sw/qa/uitest/options/optionsDialog.py b/sw/qa/uitest/options/optionsDialog.py new file mode 100644 index 000000000000..13a856c0e246 --- /dev/null +++ b/sw/qa/uitest/options/optionsDialog.py @@ -0,0 +1,38 @@ +# -*- 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 optionsDialog(UITestCase): + + def test_moreIconsDialog(self): + self.ui_test.create_doc_in_start_center("writer") + + self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") + + xDialog = self.xUITest.getTopFocusWindow() + xPages = xDialog.getChild("pages") + xLOEntry = xPages.getChild('0') + xLOEntry.executeAction("EXPAND", tuple()) + xViewEntry = xLOEntry.getChild('2') + xViewEntry.executeAction("SELECT", tuple()) + + xMoreIconsBtn = xDialog.getChild("btnMoreIcons") + + def handle_more_icons_dlg(dialog): + # Check it doesn't crash while opening it + xCloseBtn = dialog.getChild("buttonClose") + self.ui_test.close_dialog_through_button(xCloseBtn) + + self.ui_test.execute_blocking_action(xMoreIconsBtn.executeAction, args=('CLICK', ()), + dialog_handler=handle_more_icons_dlg) + + xOKBtn = xDialog.getChild("ok") + self.ui_test.close_dialog_through_button(xOKBtn) + + self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/qa/uitest/writer_dialogs/openDialogs.py b/sw/qa/uitest/writer_dialogs/openDialogs.py index 9e4ed0d85f4a..4dbacaa1215e 100644 --- a/sw/qa/uitest/writer_dialogs/openDialogs.py +++ b/sw/qa/uitest/writer_dialogs/openDialogs.py @@ -109,7 +109,8 @@ dialogs = [ {"command": "service:com.sun.star.deployment.ui.PackageManagerDialog", "closeButton": "close"}, # {"command": ".uno:ConfigureDialog", "closeButton": "cancel"}, # tested in uitest/writer_tests/customizeDialog.py - {"command": ".uno:OptionsTreeDialog", "closeButton": "cancel"}, + #{"command": ".uno:OptionsTreeDialog", "closeButton": "cancel"}, + # used in various places {"command": ".uno:ShowLicense", "closeButton": "close"}, # {"command": ".uno:About", "closeButton": "close"}, # tested in sw/qa/uitest/writer_tests5/about_test.py |