summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uitest/Module_uitest.mk1
-rw-r--r--uitest/UITest_manual_tests.mk15
-rw-r--r--uitest/manual_tests/__init__.py0
-rw-r--r--uitest/manual_tests/calc.py58
4 files changed, 74 insertions, 0 deletions
diff --git a/uitest/Module_uitest.mk b/uitest/Module_uitest.mk
index 63bd596353f7..fb82005a0468 100644
--- a/uitest/Module_uitest.mk
+++ b/uitest/Module_uitest.mk
@@ -16,4 +16,5 @@ $(eval $(call gb_Module_add_uicheck_targets,uitest,\
UITest_impress_demo \
UITest_demo_ui \
UITest_math_demo \
+ UITest_manual_tests \
))
diff --git a/uitest/UITest_manual_tests.mk b/uitest/UITest_manual_tests.mk
new file mode 100644
index 000000000000..d9ac95a513c3
--- /dev/null
+++ b/uitest/UITest_manual_tests.mk
@@ -0,0 +1,15 @@
+# -*- 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/ \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/uitest/manual_tests/__init__.py b/uitest/manual_tests/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/uitest/manual_tests/__init__.py
diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py
new file mode 100644
index 000000000000..b4680d27ef04
--- /dev/null
+++ b/uitest/manual_tests/calc.py
@@ -0,0 +1,58 @@
+# -*- 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 uitest.uihelper.common import get_state_as_dict
+
+import time
+
+class ManualCalcTests(UITestCase):
+
+ 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")
+ xEntryBox.executeAction("TYPE", mkPropertyValues({"TEXT": "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["SelectEntryCount"], "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()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: