summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-10-27 11:18:24 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2020-10-27 15:29:59 +0100
commit713fcfae066badfaa29f347a52738e9d4f1c841b (patch)
treeeaef5608f6dc46e9abab7f5fd40cfabbf5792e86 /uitest
parent04cf65e02c8b2a0a6456d62fcc21c0022d7a5754 (diff)
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>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/Module_uitest.mk2
-rw-r--r--uitest/UITest_calc_demo.mk15
-rw-r--r--uitest/UITest_manual_tests.mk20
-rw-r--r--uitest/calc_tests/__init__.py0
-rw-r--r--uitest/calc_tests/about_test.py25
-rw-r--r--uitest/calc_tests/create_chart.py148
-rw-r--r--uitest/calc_tests/create_range_name.py50
-rw-r--r--uitest/calc_tests/edit_chart.py69
-rw-r--r--uitest/calc_tests/function_wizard.py29
-rw-r--r--uitest/calc_tests/gridwin.py48
-rw-r--r--uitest/calc_tests/gridwindow.py43
-rw-r--r--uitest/calc_tests/input_window.py33
-rw-r--r--uitest/calc_tests/tdf117987.py25
-rw-r--r--uitest/manual_tests/__init__.py0
-rw-r--r--uitest/manual_tests/calc.py235
-rw-r--r--uitest/manual_tests/data/cell_recalc.odsbin34064 -> 0 bytes
-rw-r--r--uitest/manual_tests/more_calc.py52
-rw-r--r--uitest/test_main.py1
18 files changed, 0 insertions, 795 deletions
diff --git a/uitest/Module_uitest.mk b/uitest/Module_uitest.mk
index 647dd574f1fd..0ea8a94cfe30 100644
--- a/uitest/Module_uitest.mk
+++ b/uitest/Module_uitest.mk
@@ -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 \
))
diff --git a/uitest/UITest_calc_demo.mk b/uitest/UITest_calc_demo.mk
deleted file mode 100644
index 9869300a0675..000000000000
--- a/uitest/UITest_calc_demo.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# 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/.
-#
-
-$(eval $(call gb_UITest_UITest,calc_demo))
-
-$(eval $(call gb_UITest_add_modules,calc_demo,$(SRCDIR)/uitest,\
- calc_tests/ \
-))
-# vim: set noet sw=4 ts=4:
diff --git a/uitest/UITest_manual_tests.mk b/uitest/UITest_manual_tests.mk
deleted file mode 100644
index 187ab8317b5f..000000000000
--- a/uitest/UITest_manual_tests.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# 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/.
-#
-
-$(eval $(call gb_UITest_UITest,manual_tests))
-
-$(eval $(call gb_UITest_add_modules,manual_tests,$(SRCDIR)/uitest,\
- manual_tests/ \
-))
-
-$(eval $(call gb_UITest_set_defs,manual_tests, \
- TDOC="$(SRCDIR)/uitest/manual_tests/data" \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/uitest/calc_tests/__init__.py b/uitest/calc_tests/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/uitest/calc_tests/__init__.py
+++ /dev/null
diff --git a/uitest/calc_tests/about_test.py b/uitest/calc_tests/about_test.py
deleted file mode 100644
index c6dc75b939dc..000000000000
--- a/uitest/calc_tests/about_test.py
+++ /dev/null
@@ -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:
diff --git a/uitest/calc_tests/create_chart.py b/uitest/calc_tests/create_chart.py
deleted file mode 100644
index cced0ac63d37..000000000000
--- a/uitest/calc_tests/create_chart.py
+++ /dev/null
@@ -1,148 +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.framework import UITestCase
-from uitest.uihelper.calc import enter_text_to_cell
-
-import time
-import unittest
-
-class CalcChartUIDemo(UITestCase):
-
- def create_insert_chart_dialog(self):
- self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart")
- # time.sleep(1) # ideally wait for a creation event
- return self.xUITest.getTopFocusWindow()
-
- def fill_spreadsheet(self):
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- enter_text_to_cell(xGridWindow, "A1", "col1")
- enter_text_to_cell(xGridWindow, "B1", "col2")
- enter_text_to_cell(xGridWindow, "C1", "col3")
- enter_text_to_cell(xGridWindow, "A2", "1")
- enter_text_to_cell(xGridWindow, "B2", "3")
- enter_text_to_cell(xGridWindow, "C2", "5")
-
- xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C2"}))
-
- def test_cancel_immediately(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xChartDlg = self.create_insert_chart_dialog();
-
- xCancelBtn = xChartDlg.getChild("cancel")
- self.ui_test.close_dialog_through_button(xCancelBtn)
-
- self.ui_test.close_doc()
-
- def test_create_from_first_page(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xChartDlg = self.create_insert_chart_dialog();
-
- xOkBtn = xChartDlg.getChild("finish")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- self.ui_test.close_doc()
-
- def test_create_from_second_page(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xChartDlg = self.create_insert_chart_dialog();
-
- xNextBtn = xChartDlg.getChild("next")
- xNextBtn.executeAction("CLICK", tuple())
-
- xDataInRows = xChartDlg.getChild("RB_DATAROWS")
- xDataInRows.executeAction("CLICK", tuple())
-
- xDataInCols = xChartDlg.getChild("RB_DATACOLS")
- xDataInCols.executeAction("CLICK", tuple())
-
- xCancelBtn = xChartDlg.getChild("finish")
- self.ui_test.close_dialog_through_button(xCancelBtn)
-
- self.ui_test.close_doc()
-
- def test_deselect_chart(self):
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- xChartDlg = self.create_insert_chart_dialog();
-
- xNextBtn = xChartDlg.getChild("finish")
- self.ui_test.close_dialog_through_button(xNextBtn)
-
- xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
-
- time.sleep(2)
-
- self.ui_test.close_doc()
-
- def test_activate_chart(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- xChartDlg = self.create_insert_chart_dialog();
-
- xNextBtn = xChartDlg.getChild("finish")
- self.ui_test.close_dialog_through_button(xNextBtn)
-
- xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
-
- xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
- xGridWindow.executeAction("ACTIVATE", tuple())
-
- xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
-
- self.ui_test.close_doc()
-
- def select_chart_element(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- xChartDlg = self.create_insert_chart_dialog();
-
- xNextBtn = xChartDlg.getChild("finish")
- self.ui_test.close_dialog_through_button(xNextBtn)
-
- xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
-
- xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
- xGridWindow.executeAction("ACTIVATE", tuple())
-
- xCalcDoc = self.xUITest.getTopFocusWindow()
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/create_range_name.py b/uitest/calc_tests/create_range_name.py
deleted file mode 100644
index 1babca7c0a58..000000000000
--- a/uitest/calc_tests/create_range_name.py
+++ /dev/null
@@ -1,50 +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.framework import UITestCase
-from uitest.uihelper.common import type_text, select_pos
-
-class CreateRangeNameTest(UITestCase):
-
- def test_create_range_name(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.ui_test.execute_modeless_dialog_through_command(".uno:AddName")
-
- xAddNameDlg = self.xUITest.getTopFocusWindow()
-
- xEdit = xAddNameDlg.getChild("edit")
- type_text(xEdit, "simpleRangeName")
-
- xAddBtn = xAddNameDlg.getChild("add")
- self.ui_test.close_dialog_through_button(xAddBtn)
-
- self.ui_test.close_doc()
-
- def test_create_local_range_name(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.ui_test.execute_modeless_dialog_through_command(".uno:AddName")
-
- xAddNameDlg = self.xUITest.getTopFocusWindow()
-
- xEdit = xAddNameDlg.getChild("edit")
- type_text(xEdit, "simpleRangeName")
-
- xScope = xAddNameDlg.getChild("scope")
- select_pos(xScope, "1")
-
- xAddBtn = xAddNameDlg.getChild("add")
- self.ui_test.close_dialog_through_button(xAddBtn)
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/edit_chart.py b/uitest/calc_tests/edit_chart.py
deleted file mode 100644
index d74a8c2eced3..000000000000
--- a/uitest/calc_tests/edit_chart.py
+++ /dev/null
@@ -1,69 +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.framework import UITestCase
-from uitest.uihelper.calc import enter_text_to_cell
-
-import unittest
-
-class CalcChartEditUIDemo(UITestCase):
-
- def fill_spreadsheet(self):
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- enter_text_to_cell(xGridWindow, "A1", "col1")
- enter_text_to_cell(xGridWindow, "B1", "col2")
- enter_text_to_cell(xGridWindow, "C1", "col3")
- enter_text_to_cell(xGridWindow, "A2", "1")
- enter_text_to_cell(xGridWindow, "B2", "3")
- enter_text_to_cell(xGridWindow, "C2", "5")
-
- xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C2"}))
-
- def test_select_secondary_axis(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.fill_spreadsheet()
-
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart")
-
- xChartDlg = self.xUITest.getTopFocusWindow()
-
- xNextBtn = xChartDlg.getChild("finish")
- self.ui_test.close_dialog_through_button(xNextBtn)
-
- xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
-
- xGridWindow.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
-
- xGridWindow.executeAction("ACTIVATE", tuple())
-
- xChartMainTop = self.xUITest.getTopFocusWindow()
- xChartMain = xChartMainTop.getChild("chart_window")
-
- xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
- self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "FormatDataSeries"}))
-
- xSeriesFormatDlg = self.xUITest.getTopFocusWindow()
- xAxis2 = xSeriesFormatDlg.getChild("RBT_OPT_AXIS_2")
- xAxis2.executeAction("CLICK", tuple())
-
- xCancelBtn = xSeriesFormatDlg.getChild("ok")
- xCancelBtn.executeAction("CLICK", tuple())
-
- xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/function_wizard.py b/uitest/calc_tests/function_wizard.py
deleted file mode 100644
index 13b83350927f..000000000000
--- a/uitest/calc_tests/function_wizard.py
+++ /dev/null
@@ -1,29 +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.framework import UITestCase
-
-class FunctionWizardTest(UITestCase):
- # tdf#98427
- def test_open_function_wizard(self):
- self.ui_test.create_doc_in_start_center("calc")
-
- self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog")
-
- xFunctionDlg = self.xUITest.getTopFocusWindow()
-
- xArrayChkBox = xFunctionDlg.getChild("array")
- xArrayChkBox.executeAction("CLICK", tuple())
-
- xCancelBtn = xFunctionDlg.getChild("cancel")
- self.ui_test.close_dialog_through_button(xCancelBtn)
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/gridwin.py b/uitest/calc_tests/gridwin.py
deleted file mode 100644
index 7c9c87de0b03..000000000000
--- a/uitest/calc_tests/gridwin.py
+++ /dev/null
@@ -1,48 +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.common import get_state_as_dict
-
-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")
- xCalcDoc = self.xUITest.getTopFocusWindow()
- xGridWindow = xCalcDoc.getChild("grid_window")
-
- for i in range(3):
- self.ui_test.execute_dialog_through_command(".uno:Insert")
- current_dialog = self.xUITest.getTopFocusWindow()
-
- xOkButton = current_dialog.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkButton)
-
- xGridWindow.executeAction("SELECT", mkPropertyValues({"TABLE": "2"}))
- self.assertEqual(get_state_as_dict(xGridWindow)["SelectedTable"], "2")
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/gridwindow.py b/uitest/calc_tests/gridwindow.py
deleted file mode 100644
index 37afacd008e2..000000000000
--- a/uitest/calc_tests/gridwindow.py
+++ /dev/null
@@ -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:
diff --git a/uitest/calc_tests/input_window.py b/uitest/calc_tests/input_window.py
deleted file mode 100644
index eea8b53d950f..000000000000
--- a/uitest/calc_tests/input_window.py
+++ /dev/null
@@ -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:
diff --git a/uitest/calc_tests/tdf117987.py b/uitest/calc_tests/tdf117987.py
deleted file mode 100644
index 3de0b176ed01..000000000000
--- a/uitest/calc_tests/tdf117987.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# 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 libreoffice.uno.propertyvalue import mkPropertyValues
-from libreoffice.calc.document import get_cell_by_position
-
-class tdf117987(UITestCase):
-
- def test_highlight_cell_after_moving_cursor(self):
- self.ui_test.create_doc_in_start_center("calc")
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
-
- colorProperty = mkPropertyValues({"BackgroundColor": 16776960})
- gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
- self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", colorProperty)
- gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
- self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", colorProperty)
-
- document = self.ui_test.get_component()
- self.assertEqual(get_cell_by_position(document, 0, 0, 1).CellBackColor, 16776960)
- self.ui_test.close_doc()
diff --git a/uitest/manual_tests/__init__.py b/uitest/manual_tests/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/uitest/manual_tests/__init__.py
+++ /dev/null
diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py
deleted file mode 100644
index 1b7897983a38..000000000000
--- a/uitest/manual_tests/calc.py
+++ /dev/null
@@ -1,235 +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 libreoffice.uno.propertyvalue import mkPropertyValues
-from libreoffice.calc.document import get_cell_by_position
-
-from uitest.uihelper.common import get_state_as_dict, type_text
-from uitest.uihelper.calc import enter_text_to_cell
-
-import org.libreoffice.unotest
-import pathlib
-import time
-
-def get_url_for_data_file(file_name):
- return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
-
-class ManualCalcTests(UITestCase):
-
- # http://manual-test.libreoffice.org/manage/case/189/
- def test_define_database_range(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- # Select range A1:D10
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
- xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:D10"}))
-
- # Execute "Define DB Range dialog"
- self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName")
-
- xDefineNameDlg = self.xUITest.getTopFocusWindow()
-
- xEntryBox = xDefineNameDlg.getChild("entry")
- type_text(xEntryBox, "my_database")
-
- xOkBtn = xDefineNameDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- # Deselect range
- xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
-
- # Execute "Select DB Range dialog"
- self.ui_test.execute_dialog_through_command(".uno:SelectDB")
- xSelectNameDlg = self.xUITest.getTopFocusWindow()
-
- xListBox = xSelectNameDlg.getChild("treeview")
- xListBoxState = get_state_as_dict(xListBox)
- self.assertEqual(xListBoxState["SelectionCount"], "1")
- self.assertEqual(xListBoxState["SelectEntryText"], "my_database")
-
- xOkBtn = xSelectNameDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- # Assert that the correct range has been selected
- gridWinState = get_state_as_dict(xGridWin)
- self.assertEqual(gridWinState["MarkedArea"], "Sheet1.A1:Sheet1.D10")
-
- self.ui_test.close_doc()
-
- # http://manual-test.libreoffice.org/manage/case/190/
- def test_sort_data(self):
- self.ui_test.create_doc_in_start_center("calc")
-
- # Insert data
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
- enter_text_to_cell(xGridWin, "B1", "3")
- enter_text_to_cell(xGridWin, "B2", "25")
- enter_text_to_cell(xGridWin, "B3", "17")
- enter_text_to_cell(xGridWin, "B4", "9")
- enter_text_to_cell(xGridWin, "B5", "19")
- enter_text_to_cell(xGridWin, "B6", "0")
- enter_text_to_cell(xGridWin, "B7", "107")
- enter_text_to_cell(xGridWin, "B8", "89")
- enter_text_to_cell(xGridWin, "B9", "8")
- enter_text_to_cell(xGridWin, "B10", "33")
-
- xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "B1:B10"}))
-
- # Execute "Sort" dialog
- self.ui_test.execute_dialog_through_command(".uno:DataSort")
- xSortDlg = self.xUITest.getTopFocusWindow()
-
- xOkBtn = xSortDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- document = self.ui_test.get_component()
-
- self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 0)
- self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 3)
- self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 8)
- self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 9)
- self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 17)
- self.assertEqual(get_cell_by_position(document, 0, 1, 5).getValue(), 19)
- self.assertEqual(get_cell_by_position(document, 0, 1, 6).getValue(), 25)
- self.assertEqual(get_cell_by_position(document, 0, 1, 7).getValue(), 33)
- self.assertEqual(get_cell_by_position(document, 0, 1, 8).getValue(), 89)
- self.assertEqual(get_cell_by_position(document, 0, 1, 9).getValue(), 107)
-
- time.sleep(2)
- self.ui_test.close_doc()
-
- # http://manual-test.libreoffice.org/manage/case/191/
- def test_validation(self):
- self.ui_test.create_doc_in_start_center("calc")
-
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
- xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C10"}))
-
- self.ui_test.execute_dialog_through_command(".uno:Validation")
- xValidationDlg = self.xUITest.getTopFocusWindow()
-
- xAllowList = xValidationDlg.getChild("allow")
- xAllowList.executeAction("SELECT", mkPropertyValues({"POS": "1"}))
-
- xData = xValidationDlg.getChild("data")
- xData.executeAction("SELECT", mkPropertyValues({"POS": "5"}))
-
- xVal = xValidationDlg.getChild("max")
- xVal.executeAction("TYPE", mkPropertyValues({"TEXT":"0"}))
-
- xOkBtn = xValidationDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- def enter_text(cell, text):
- enter_text_to_cell(xGridWin, cell, text)
-
- self.ui_test.execute_blocking_action(enter_text, "ok", args=("A1", "abc"))
- self.ui_test.execute_blocking_action(enter_text, "ok", args=("B6", "2.18"))
-
- enter_text_to_cell(xGridWin, "C2", "24")
-
- self.ui_test.close_doc()
-
- # http://manual-test.libreoffice.org/manage/case/187/
- def test_transpose(self):
- self.ui_test.create_doc_in_start_center("calc")
-
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
- enter_text_to_cell(xGridWin, "B3", "abcd")
- enter_text_to_cell(xGridWin, "B4", "edfg")
- enter_text_to_cell(xGridWin, "C3", "35")
- enter_text_to_cell(xGridWin, "C4", "5678")
-
- xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C10"}))
-
- self.xUITest.executeCommand(".uno:Cut")
-
- xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
-
- self.ui_test.execute_dialog_through_command(".uno:PasteSpecial")
-
- xPasteSpecialDlg = self.xUITest.getTopFocusWindow()
-
- xAllChkBox = xPasteSpecialDlg.getChild("paste_all")
- xAllChkBox.executeAction("CLICK", tuple())
-
- xTransposeChkBox = xPasteSpecialDlg.getChild("transpose")
- xTransposeChkBox.executeAction("CLICK", tuple())
-
- xOkBtn = xPasteSpecialDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- document = self.ui_test.get_component()
- self.assertEqual(get_cell_by_position(document, 0, 2, 1).getString(), "abcd")
- self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 35)
- self.assertEqual(get_cell_by_position(document, 0, 3, 1).getString(), "edfg")
- self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 5678)
-
- self.ui_test.close_doc()
-
- # http://manual-test.libreoffice.org/manage/case/151/
- def test_cell_recalc(self):
- doc = self.ui_test.load_file(get_url_for_data_file("cell_recalc.ods"))
-
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
- xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "D2:D9"}))
- self.xUITest.executeCommand(".uno:Cut")
-
- self.assertEqual(get_cell_by_position(doc, 0, 3, 15).getValue(), 0)
-
- self.xUITest.executeCommand(".uno:Undo")
-
- for i in range(1, 9):
- self.assertTrue(get_cell_by_position(doc, 0, 3, i).getValue() != 0)
-
- self.assertEqual(get_cell_by_position(doc, 0, 3, 15).getValue(), 195)
-
- self.ui_test.close_doc()
-
- # http://manual-test.libreoffice.org/manage/case/143/
- def test_random_numbers(self):
- self.ui_test.create_doc_in_start_center("calc")
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
-
- xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:A10"}))
-
- self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog")
- xRandomNumberDlg = self.xUITest.getTopFocusWindow()
- xDistributionLstBox = xRandomNumberDlg.getChild("distribution-combo")
- xDistributionLstBox.executeAction("SELECT", mkPropertyValues({"POS": "1"}))
-
- xMin = xRandomNumberDlg.getChild("parameter1-spin")
- xMin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
- xMin.executeAction("TYPE", mkPropertyValues({"TEXT": "-2"}))
- xMax = xRandomNumberDlg.getChild("parameter2-spin")
- xMax.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
- xMax.executeAction("TYPE", mkPropertyValues({"TEXT": "10"}))
-
- xApplyBtn = xRandomNumberDlg.getChild("apply")
- xApplyBtn.executeAction("CLICK", tuple())
-
- doc = self.ui_test.get_component()
-
- def check_random_values():
- for i in range(1, 9):
- val = get_cell_by_position(doc, 0, 0, i).getValue()
- self.assertTrue(val <= 10 and val >= -2)
-
- check_random_values()
-
- xOkBtn = xRandomNumberDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- # we might want to check that clicking 'ok' actually changes the values
- check_random_values()
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/manual_tests/data/cell_recalc.ods b/uitest/manual_tests/data/cell_recalc.ods
deleted file mode 100644
index 4b125fd2e2e6..000000000000
--- a/uitest/manual_tests/data/cell_recalc.ods
+++ /dev/null
Binary files differ
diff --git a/uitest/manual_tests/more_calc.py b/uitest/manual_tests/more_calc.py
deleted file mode 100644
index 08aeb654e449..000000000000
--- a/uitest/manual_tests/more_calc.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# 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 libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-from uitest.uihelper.calc import enter_text_to_cell
-
-
-class ManualCalcTests(UITestCase):
- def test_paste_special(self):
- # EN-8:Paste special with options
- # This test is to check that paste special combined with some options and link is ok.
- # Refers to tdf#84810
-
- self.ui_test.create_doc_in_start_center("calc")
-
- # Write text to cell A1
- xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
- enter_text_to_cell(xGridWin, "A1", "abcd")
-
- # Copy cell A1 to clipboard
- xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
- self.xUITest.executeCommand(".uno:Copy")
-
- # Set cursor to cell A3
- xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"}))
-
- # Choose Paste Special Options and paste data
- self.ui_test.execute_dialog_through_command(".uno:PasteSpecial")
- xPasteSpecialDlg = self.xUITest.getTopFocusWindow()
- xAllChkBox = xPasteSpecialDlg.getChild("paste_all")
- xAllChkBox.executeAction("CLICK", tuple())
- xLinkChkBox = xPasteSpecialDlg.getChild("link")
- xLinkChkBox.executeAction("CLICK", tuple())
- xOkBtn = xPasteSpecialDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- # Assert successful paste
- document = self.ui_test.get_component()
- self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "abcd")
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/test_main.py b/uitest/test_main.py
index e1737947f536..3b2de433ca24 100644
--- a/uitest/test_main.py
+++ b/uitest/test_main.py
@@ -9,7 +9,6 @@ import sys
import getopt
import os
import unittest
-import calc_tests
import importlib
import importlib.machinery