Kaydet (Commit) 56239a62 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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/29373Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 462048b3
# -*- 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: */
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