diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-28 04:27:06 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-29 11:41:06 +0000 |
commit | 56239a62557c413665b05b6f9692c48a455d4825 (patch) | |
tree | f0d561b32eb891c99f102bcb12d1847189fd88df | |
parent | 462048b3502bdb79cb1171cc58d911666bc7d142 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | uitest/calc_tests/data/tdf96453.ods | bin | 0 -> 8157 bytes | |||
-rw-r--r-- | uitest/calc_tests/tdf96453.py | 37 |
2 files changed, 37 insertions, 0 deletions
diff --git a/uitest/calc_tests/data/tdf96453.ods b/uitest/calc_tests/data/tdf96453.ods Binary files differnew file mode 100644 index 000000000000..89114f6365d0 --- /dev/null +++ b/uitest/calc_tests/data/tdf96453.ods diff --git a/uitest/calc_tests/tdf96453.py b/uitest/calc_tests/tdf96453.py new file mode 100644 index 000000000000..478a7a1d3836 --- /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: */ |