uitest: move all calc tests to sc/qa/uitest
and remove a few duplicated ones Change-Id: I409ca78dcd7a67e993f6b3a1493ffa6fefd127b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104864 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
parent
04cf65e02c
commit
713fcfae06
21 changed files with 12 additions and 126 deletions
|
@ -257,6 +257,8 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\
|
|||
UITest_calc_tests8 \
|
||||
UITest_calc_dialogs \
|
||||
UITest_calc_tests9 \
|
||||
UITest_function_wizard \
|
||||
UITest_manual_tests \
|
||||
))
|
||||
endif
|
||||
|
||||
|
|
|
@ -7,9 +7,14 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
$(eval $(call gb_UITest_UITest,calc_demo))
|
||||
$(eval $(call gb_UITest_UITest,function_wizard))
|
||||
|
||||
$(eval $(call gb_UITest_add_modules,calc_demo,$(SRCDIR)/uitest,\
|
||||
calc_tests/ \
|
||||
$(eval $(call gb_UITest_add_modules,function_wizard,$(SRCDIR)/sc/qa/uitest,\
|
||||
function_wizard/ \
|
||||
))
|
||||
|
||||
$(eval $(call gb_UITest_set_defs,function_wizard, \
|
||||
TDOC="$(SRCDIR)/sc/qa/uitest/data" \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
$(eval $(call gb_UITest_UITest,manual_tests))
|
||||
|
||||
$(eval $(call gb_UITest_add_modules,manual_tests,$(SRCDIR)/uitest,\
|
||||
$(eval $(call gb_UITest_add_modules,manual_tests,$(SRCDIR)/sc/qa/uitest,\
|
||||
manual_tests/ \
|
||||
))
|
||||
|
||||
$(eval $(call gb_UITest_set_defs,manual_tests, \
|
||||
TDOC="$(SRCDIR)/uitest/manual_tests/data" \
|
||||
TDOC="$(SRCDIR)/sc/qa/uitest/data" \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
|
@ -12,23 +12,6 @@ from uitest.framework import UITestCase
|
|||
|
||||
class GridWinTest(UITestCase):
|
||||
|
||||
def test_select_object(self):
|
||||
|
||||
self.ui_test.create_doc_in_start_center("calc")
|
||||
xCalcDoc = self.xUITest.getTopFocusWindow()
|
||||
xGridWindow = xCalcDoc.getChild("grid_window")
|
||||
|
||||
selectProps = mkPropertyValues({"CELL": "B10"})
|
||||
xGridWindow.executeAction("SELECT", selectProps)
|
||||
|
||||
xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
|
||||
|
||||
xGridWindow.executeAction("ACTIVATE", tuple())
|
||||
|
||||
xGridWindow.executeAction("DESELECT", tuple())
|
||||
|
||||
self.ui_test.close_doc()
|
||||
|
||||
def test_select_sheet(self):
|
||||
|
||||
self.ui_test.create_doc_in_start_center("calc")
|
|
@ -11,9 +11,7 @@
|
|||
$(eval $(call gb_Module_Module,uitest))
|
||||
|
||||
$(eval $(call gb_Module_add_uicheck_targets,uitest,\
|
||||
UITest_calc_demo \
|
||||
UITest_impress_demo \
|
||||
UITest_demo_ui \
|
||||
UITest_math_demo \
|
||||
UITest_manual_tests \
|
||||
))
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
# -*- 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 AboutDlgTest(UITestCase):
|
||||
|
||||
def test_about_dlg(self):
|
||||
|
||||
self.ui_test.create_doc_in_start_center("calc")
|
||||
|
||||
self.ui_test.execute_dialog_through_command(".uno:About")
|
||||
|
||||
xAboutDlg = self.xUITest.getTopFocusWindow()
|
||||
|
||||
xCloseBtn = xAboutDlg.getChild("btnClose")
|
||||
self.ui_test.close_dialog_through_button(xCloseBtn)
|
||||
|
||||
self.ui_test.close_doc()
|
||||
|
||||
# vim: set shiftwidth=4 softtabstop=4 expandtab:
|
|
@ -1,43 +0,0 @@
|
|||
# -*- 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 libreoffice.uno.propertyvalue import mkPropertyValues
|
||||
|
||||
from uitest.uihelper.calc import enter_text_to_cell
|
||||
|
||||
from uitest.framework import UITestCase
|
||||
|
||||
class GridWindowTest(UITestCase):
|
||||
|
||||
def test_input(self):
|
||||
|
||||
self.ui_test.create_doc_in_start_center("calc")
|
||||
xTopWindow = self.xUITest.getTopFocusWindow()
|
||||
|
||||
xGridWindow = xTopWindow.getChild("grid_window")
|
||||
|
||||
enter_text_to_cell(xGridWindow, "C3", "=A1")
|
||||
enter_text_to_cell(xGridWindow, "A1", "2")
|
||||
|
||||
self.ui_test.close_doc()
|
||||
|
||||
def test_special_keys(self):
|
||||
|
||||
self.ui_test.create_doc_in_start_center("calc")
|
||||
xTopWindow = self.xUITest.getTopFocusWindow()
|
||||
|
||||
xGridWindow = xTopWindow.getChild("grid_window")
|
||||
|
||||
selectProps = mkPropertyValues({"CELL": "C3"})
|
||||
xGridWindow.executeAction("SELECT", selectProps)
|
||||
|
||||
typeProps = mkPropertyValues({"KEYCODE": "CTRL+DOWN"})
|
||||
xGridWindow.executeAction("TYPE", typeProps)
|
||||
|
||||
self.ui_test.close_doc()
|
||||
|
||||
# vim: set shiftwidth=4 softtabstop=4 expandtab:
|
|
@ -1,33 +0,0 @@
|
|||
# -*- 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
|
||||
from uitest.uihelper.common import get_state_as_dict, type_text
|
||||
from libreoffice.uno.propertyvalue import mkPropertyValues
|
||||
|
||||
from libreoffice.calc.document import get_cell_by_position
|
||||
|
||||
import time
|
||||
|
||||
class InputWindowTest(UITestCase):
|
||||
|
||||
def test_input_window(self):
|
||||
|
||||
self.ui_test.create_doc_in_start_center("calc")
|
||||
|
||||
xCalcDoc = self.xUITest.getTopFocusWindow()
|
||||
document = self.ui_test.get_component()
|
||||
|
||||
xInputWin = xCalcDoc.getChild("sc_input_window")
|
||||
|
||||
type_text(xInputWin, "test")
|
||||
xInputWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
|
||||
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "test")
|
||||
|
||||
self.ui_test.close_doc()
|
||||
|
||||
# vim: set shiftwidth=4 softtabstop=4 expandtab:
|
|
@ -9,7 +9,6 @@ import sys
|
|||
import getopt
|
||||
import os
|
||||
import unittest
|
||||
import calc_tests
|
||||
import importlib
|
||||
import importlib.machinery
|
||||
|
||||
|
|
Loading…
Reference in a new issue