[Libreoffice-commits] core.git: uitest/manual_tests
uitest/manual_tests/more_calc.py | 52 +++ 1 file changed, 52 insertions(+) New commits: commit b57ad983e6ed5d976903b1d6588b472bb3051e7d Author: Saurav Chirania Date: Sat Feb 3 01:58:42 2018 +0530 tdf#107501 automatize EN-8 manual test, related tdf#84810 This test is to check that paste special combined with some options and link is ok. Change-Id: Ifffca8033b195d64d310d9d063ee95bbc8e8ad5d Reviewed-on: https://gerrit.libreoffice.org/49164 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/uitest/manual_tests/more_calc.py b/uitest/manual_tests/more_calc.py new file mode 100644 index ..08aeb654e449 --- /dev/null +++ b/uitest/manual_tests/more_calc.py @@ -0,0 +1,52 @@ +# -*- 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: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/manual_tests
uitest/manual_tests/calc.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6e9f0d3e68bfe1b46e0280815fb969280b1d19c9 Author: Miklos Vajna Date: Mon Jun 12 14:12:54 2017 +0200 Revert "uitest: disable failing part of manual_tests/calc.py" This reverts commit 8c59cfb6aad60c06271ac7ae3c124132bdf223c9. Turns out this was a problem for non-English locales only, and Markus fixed this in general in the meantime. Change-Id: I4bb487345b9de4ee637538bbb9d53faa98c7ec5f Reviewed-on: https://gerrit.libreoffice.org/38698 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py index 761c611d4d18..2f4524134f77 100644 --- a/uitest/manual_tests/calc.py +++ b/uitest/manual_tests/calc.py @@ -130,7 +130,7 @@ class ManualCalcTests(UITestCase): 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")) +self.ui_test.execute_blocking_action(enter_text, "ok", args=("B6", "2.18")) enter_text_to_cell(xGridWin, "C2", "24") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/manual_tests uitest/Module_uitest.mk uitest/UITest_manual_tests.mk
uitest/Module_uitest.mk |1 uitest/UITest_manual_tests.mk | 15 ++ uitest/manual_tests/calc.py | 58 ++ 3 files changed, 74 insertions(+) New commits: commit 17fab5460332a75bcab0f734f17f7a2292a7aa27 Author: Markus Mohrhard Date: Wed Dec 21 14:45:30 2016 +0100 uitest: add initial test for converting manual tests to automated tests Change-Id: I76637b76151a33c9f9f4b218aa01b5e813e9da1f Reviewed-on: https://gerrit.libreoffice.org/32283 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/uitest/Module_uitest.mk b/uitest/Module_uitest.mk index 63bd596..fb82005 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 000..d9ac95a --- /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 000..e69de29 diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py new file mode 100644 index 000..b4680d2 --- /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: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits