uitest/calc_tests/data/tdf96453.ods |binary uitest/calc_tests/tdf96453.py | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+)
New commits: commit 56239a62557c413665b05b6f9692c48a455d4825 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Sep 28 04:27:06 2016 +0200 add test for tdf#96453 part 1 This is the first part in the UI testing tutorial. The commit adds the skeleton for a UI test. Currently the test only opens the conditional format manager dialog and closes the dialog again. Change-Id: Iff1d662d0aa675efad6b9682bf86a246c7a5a8d3 Reviewed-on: https://gerrit.libreoffice.org/29373 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/uitest/calc_tests/data/tdf96453.ods b/uitest/calc_tests/data/tdf96453.ods new file mode 100644 index 0000000..89114f6 Binary files /dev/null and b/uitest/calc_tests/data/tdf96453.ods differ diff --git a/uitest/calc_tests/tdf96453.py b/uitest/calc_tests/tdf96453.py new file mode 100644 index 0000000..478a7a1 --- /dev/null +++ b/uitest/calc_tests/tdf96453.py @@ -0,0 +1,37 @@ +# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-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 + +import os +import pathlib + +def get_data_dir(): + current_dir = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(current_dir, "data") + +def get_url_for_data_file(file_name): + path = os.path.join(get_data_dir(), file_name) + return pathlib.Path(path).as_uri() + +class ConditionalFormatDlgTest(UITestCase): + + def test_simple_open_manager(self): + + calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf96453.ods")) + print(dir(calc_doc)) + + self.ui_test.execute_dialog_through_command(".uno:ConditionalFormatManagerDialog") + + xCondFormatMgr = self.xUITest.getTopFocusWindow() + + xCancelBtn = xCondFormatMgr.getChild("cancel") + xCancelBtn.executeAction("CLICK", tuple()) + + self.ui_test.close_doc() + +# vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits