[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf122232.ods |binary sc/qa/uitest/calc_tests9/tdf122232.py | 49 + 2 files changed, 49 insertions(+) New commits: commit 01a3a7cee2dc680910f4ddec004724b89a81099b Author: Zdeněk Crhonek AuthorDate: Mon Nov 25 20:50:50 2019 +0100 Commit: Zdenek Crhonek CommitDate: Tue Nov 26 08:13:43 2019 +0100 uitest for bug tdf#122232 Change-Id: I40045b46f5cf8063e41211f9f7ea55e712036cd2 Reviewed-on: https://gerrit.libreoffice.org/83713 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf122232.ods b/sc/qa/uitest/calc_tests/data/tdf122232.ods new file mode 100644 index ..23dc98f61308 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf122232.ods differ diff --git a/sc/qa/uitest/calc_tests9/tdf122232.py b/sc/qa/uitest/calc_tests9/tdf122232.py new file mode 100644 index ..16cce021914d --- /dev/null +++ b/sc/qa/uitest/calc_tests9/tdf122232.py @@ -0,0 +1,49 @@ +# -*- 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 +from uitest.path import get_srcdir_url +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 122232 - UI: Pressing Enter in a protected sheet doesn't jump to next row in every case + +class tdf122232(UITestCase): + +def test_tdf122232_press_Enter_key_jump(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf122232.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Start with from C6. Press tabulator to reach G6. +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C6"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "LEFT"})) + +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"})) +#Press "Enter". +gridWinState = get_state_as_dict(gridwin) +self.assertEqual(gridWinState["CurrentRow"], "5") +self.assertEqual(gridWinState["CurrentColumn"], "6") +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) +#Cursor jumps to C29 instead of C7. +gridWinState = get_state_as_dict(gridwin) +self.assertEqual(gridWinState["CurrentRow"], "6") +self.assertEqual(gridWinState["CurrentColumn"], "2") + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf91217.ods |binary sc/qa/uitest/calc_tests9/tdf91217.py | 43 ++ 2 files changed, 43 insertions(+) New commits: commit 1347dc450b13cac8643db3ccb2670838dc82d138 Author: Zdeněk Crhonek AuthorDate: Sat Nov 23 09:31:10 2019 +0100 Commit: Zdenek Crhonek CommitDate: Sat Nov 23 13:44:38 2019 +0100 uitest for bug tdf#91217 Change-Id: I0322a3bc821850d5f15aeb690ba80ff7b8129140 Reviewed-on: https://gerrit.libreoffice.org/83546 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf91217.ods b/sc/qa/uitest/calc_tests/data/tdf91217.ods new file mode 100644 index ..c1bb9da85c94 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf91217.ods differ diff --git a/sc/qa/uitest/calc_tests9/tdf91217.py b/sc/qa/uitest/calc_tests9/tdf91217.py new file mode 100644 index ..103c970e6740 --- /dev/null +++ b/sc/qa/uitest/calc_tests9/tdf91217.py @@ -0,0 +1,43 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 91217 - Crash when deleting rows + +class tdf91217(UITestCase): +def test_tdf91217_crash_deleting_rows(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf91217.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Select rows 76-1125 in sheet 3 (Daily), right click, Delete Rows. Instant crash. +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A76:A1125"})) +self.xUITest.executeCommand(".uno:SelectRow") +#delete rows +self.xUITest.executeCommand(".uno:DeleteRows") +#A1 should be "Dist" +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") +#- Undo-redo +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") + +self.xUITest.executeCommand(".uno:Redo") +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") + +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: sw/qa
sw/qa/uitest/writer_tests6/tdf126168.py | 52 1 file changed, 52 insertions(+) New commits: commit f394ea0b6b58ed516977803f00c0147bb0facc25 Author: Zdeněk Crhonek AuthorDate: Fri Nov 22 18:51:43 2019 +0100 Commit: Zdenek Crhonek CommitDate: Fri Nov 22 20:12:13 2019 +0100 uitest for bug tdf#126168 Change-Id: I35b7235b7f53789d781a567efe15f13be16f7193 Reviewed-on: https://gerrit.libreoffice.org/83530 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests6/tdf126168.py b/sw/qa/uitest/writer_tests6/tdf126168.py new file mode 100644 index ..d25ae711e49d --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf126168.py @@ -0,0 +1,52 @@ +# -*- 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, type_text +from uitest.uihelper.common import select_pos +import time +from uitest.debug import sleep +#Bug 126168 - Crash in: rtl_uString_acquire: frame style undo redo + +class tdf126168(UITestCase): + + def test_tdf126168_frame_undo_redo_crash(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +#2) Menu > Insert > Frame > Frame +#3) Press OK in Frame dialog +self.ui_test.execute_dialog_through_command(".uno:InsertFrame") # insert frame +xDialog = self.xUITest.getTopFocusWindow() +xokbtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xokbtn) +self.assertEqual(document.TextFrames.getCount(), 1) +#New Style from Selection [uno:StyleNewByExample] +self.ui_test.execute_dialog_through_command(".uno:StyleNewByExample") +#5) Enter a name in the Create Style dialog and press OK +xDialog = self.xUITest.getTopFocusWindow() +stylename = xDialog.getChild("stylename") +stylename.executeAction("TYPE", mkPropertyValues({"TEXT":"a"})) +xokbtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xokbtn) +#6) ctrl+z 3 times +self.xUITest.executeCommand(".uno:Undo") +self.xUITest.executeCommand(".uno:Undo") +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(document.TextFrames.getCount(), 0) +#7) shift+ctrl+z 3 times +self.xUITest.executeCommand(".uno:Redo") +self.xUITest.executeCommand(".uno:Redo") +self.xUITest.executeCommand(".uno:Redo") + +#Results: crash +self.assertEqual(document.CurrentController.PageCount, 1) + +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf126340.odt |binary sw/qa/uitest/writer_tests6/tdf126340.py | 39 +++ 2 files changed, 39 insertions(+) New commits: commit ddcfaf0e51dbc2d60e6ada9aa236e04dee431ab5 Author: Zdeněk Crhonek AuthorDate: Wed Nov 20 20:33:14 2019 +0100 Commit: Zdenek Crhonek CommitDate: Thu Nov 21 18:00:56 2019 +0100 uitest for bug tdf#126340 Change-Id: I55972388b1f15dc86d309c5ffe998b44596b1cf2 Reviewed-on: https://gerrit.libreoffice.org/83351 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf126340.odt b/sw/qa/uitest/writer_tests/data/tdf126340.odt new file mode 100644 index ..79b481015093 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf126340.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf126340.py b/sw/qa/uitest/writer_tests6/tdf126340.py new file mode 100644 index ..72ab66de5ba0 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf126340.py @@ -0,0 +1,39 @@ +# -*- 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, type_text +import time +from uitest.debug import sleep +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import select_pos +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 126340 - Crash when removing entry in bullet list (change tracking involved) + +class tdf126340(UITestCase): + def test_tdf126340_crash_paste(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf126340.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +# Put the cursor to the empty bullet list entry +self.xUITest.executeCommand(".uno:GoDown") +# Hit delete +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DELETE"})) +#-> Crash +self.assertEqual(document.Text.String[0:3], "foo") +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(document.Text.String[0:3], "foo") + +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: sw/qa
sw/qa/uitest/writer_tests6/tdf128431.py | 63 1 file changed, 63 insertions(+) New commits: commit 6b1fb5eaaa170b578797819a83dccf7c89397829 Author: Zdeněk Crhonek AuthorDate: Wed Nov 20 22:16:19 2019 +0100 Commit: Zdenek Crhonek CommitDate: Thu Nov 21 06:38:34 2019 +0100 uitest for bug tdf#128431 Change-Id: I390ac076136140f6aaa391212afeca49ebbd1dc3 Reviewed-on: https://gerrit.libreoffice.org/83355 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests6/tdf128431.py b/sw/qa/uitest/writer_tests6/tdf128431.py new file mode 100644 index ..17dde483e6e5 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf128431.py @@ -0,0 +1,63 @@ +# +# 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 select_pos, get_state_as_dict +from com.sun.star.uno import RuntimeException +from com.sun.star.awt.GradientStyle import LINEAR +from com.sun.star.drawing.HatchStyle import SINGLE +from com.sun.star.drawing.BitmapMode import REPEAT +from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE + +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 128431 - Synchronize padding in header borders it is not working + +class tdf128431(UITestCase): + +def test_tdf128431_pageFormat_sync_padding(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() + +#set cm Tools-options-StarOffice Writer-General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialog = self.xUITest.getTopFocusWindow() + +xPages = xDialog.getChild("pages") +xWriterEntry = xPages.getChild('3') # Writer +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General +xMetric = xDialog.getChild("metric") +props = {"TEXT": "Centimeter"} +actionProps = mkPropertyValues(props) +xMetric.executeAction("SELECT", actionProps) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +self.ui_test.execute_dialog_through_command(".uno:PageDialog") +xDialog = self.xUITest.getTopFocusWindow() +tabcontrol = xDialog.getChild("tabcontrol") +select_pos(tabcontrol, 6) #borders + +sync = xDialog.getChild("sync") +bottomft = xDialog.getChild("bottommf") +topft = xDialog.getChild("topmf") +rightft = xDialog.getChild("rightmf") +leftft = xDialog.getChild("leftmf") + +self.assertEqual(get_state_as_dict(sync)["Selected"], "true") +bottomft.executeAction("UP", tuple()) +self.assertEqual(get_state_as_dict(bottomft)["Text"], "0.10 cm") +self.assertEqual(get_state_as_dict(topft)["Text"], "0.10 cm") +self.assertEqual(get_state_as_dict(rightft)["Text"], "0.10 cm") +self.assertEqual(get_state_as_dict(leftft)["Text"], "0.10 cm") + +okBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(okBtn) + +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf126626.docx |binary sw/qa/uitest/writer_tests6/tdf126626.py | 43 ++ 2 files changed, 43 insertions(+) New commits: commit 5739daad969efce4e4f19ed30e32c842bddf98cf Author: Zdeněk Crhonek AuthorDate: Mon Nov 18 19:04:58 2019 +0100 Commit: Zdenek Crhonek CommitDate: Mon Nov 18 21:35:48 2019 +0100 add uitest for bug tdf#126626 Change-Id: Ic2ffd8f0418e208d7e17ac419a0ac7d98ffad30c Reviewed-on: https://gerrit.libreoffice.org/83118 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf126626.docx b/sw/qa/uitest/writer_tests/data/tdf126626.docx new file mode 100644 index ..a2a289c2daca Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf126626.docx differ diff --git a/sw/qa/uitest/writer_tests6/tdf126626.py b/sw/qa/uitest/writer_tests6/tdf126626.py new file mode 100644 index ..bd06951027ea --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf126626.py @@ -0,0 +1,43 @@ +# -*- 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, type_text +import time +from uitest.debug import sleep +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import select_pos +import org.libreoffice.unotest +import pathlib +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 126626 - CRASH: pasting fly at-char selection + +class tdf126626(UITestCase): + def test_tdf126626_crash_paste(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf126626.docx")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +# 2. Select all +self.xUITest.executeCommand(".uno:SelectAll") +# 3. Copy +self.xUITest.executeCommand(".uno:Copy") +# 4. Paste TWO TIMES +self.xUITest.executeCommand(".uno:Paste") +self.xUITest.executeCommand(".uno:Paste") +# 5. Undo once +self.xUITest.executeCommand(".uno:Undo") +# 6. Paste +self.xUITest.executeCommand(".uno:Paste") +#-> Crash +self.assertEqual(document.CurrentController.PageCount, 1) + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf126673.ods |binary sc/qa/uitest/calc_tests9/tdf126673.py | 66 + 2 files changed, 66 insertions(+) New commits: commit c71a038697b9a2e5d85465d093b525159c9941e4 Author: Zdeněk Crhonek AuthorDate: Thu Nov 14 07:01:37 2019 +0100 Commit: Zdenek Crhonek CommitDate: Thu Nov 14 16:30:22 2019 +0100 uitest for bug tdf#126673 Change-Id: Ic5fad97da8f01c0a62159ba74d6312fa88240a50 Reviewed-on: https://gerrit.libreoffice.org/82646 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf126673.ods b/sc/qa/uitest/calc_tests/data/tdf126673.ods new file mode 100644 index ..9c75b69cae7b Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf126673.ods differ diff --git a/sc/qa/uitest/calc_tests9/tdf126673.py b/sc/qa/uitest/calc_tests9/tdf126673.py new file mode 100644 index ..8eb99a123f15 --- /dev/null +++ b/sc/qa/uitest/calc_tests9/tdf126673.py @@ -0,0 +1,66 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 126673 - Calc: Auto-fit column and auto-fit row don't work with line break + +class tdf126673(UITestCase): +def test_tdf126673_auto_fit_row_height(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf126673.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#set cm Tools-options-StarOffice Calc-General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General /cm +xunitlb = xDialogOpt.getChild("unitlb") +props = {"TEXT": "Centimeter"} +actionProps = mkPropertyValues(props) +xunitlb.executeAction("SELECT", actionProps) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +#select A2 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"})) +#optimal row height +self.ui_test.execute_dialog_through_command(".uno:SetOptimalRowHeight") +xDialog = self.xUITest.getTopFocusWindow() +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#select A2 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"})) +#row height +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +heightStrOrig = get_state_as_dict(xvalue)["Text"] +heightVal = heightStrOrig[:4] #default 0.45 cm, +self.assertEqual(heightVal > '0.45', True) #new value is bigger then default +# Click Ok +xcancel = xDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(xcancel) + +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf126627.odt |binary sw/qa/uitest/writer_tests6/tdf126627.py | 60 +++ 2 files changed, 60 insertions(+) New commits: commit 8a2e3c687248f5de979fa8020e1f925e7ae28cb7 Author: Zdeněk Crhonek AuthorDate: Tue Nov 12 07:03:57 2019 +0100 Commit: Zdenek Crhonek CommitDate: Wed Nov 13 13:16:46 2019 +0100 add uitest for bug tdf#126627 Change-Id: I115e014cafb9c4a85558567ccd6cd2987cabdfd6 Reviewed-on: https://gerrit.libreoffice.org/82483 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf126627.odt b/sw/qa/uitest/writer_tests/data/tdf126627.odt new file mode 100644 index ..79b481015093 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf126627.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf126627.py b/sw/qa/uitest/writer_tests6/tdf126627.py new file mode 100644 index ..dcce155b3454 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf126627.py @@ -0,0 +1,60 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib +from uitest.path import get_srcdir_url +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 126627 - CRASH: undoing redlinehide deletion + +class tdf126627(UITestCase): +def test_tdf126627_crash_undo_deletion(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf126627.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog") +xDialog = self.xUITest.getTopFocusWindow() + +searchterm = xDialog.getChild("searchterm") +searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"bar"})) +xsearch = xDialog.getChild("search") +xsearch.executeAction("CLICK", tuple()) + +xcloseBtn = xDialog.getChild("close") +self.ui_test.close_dialog_through_button(xcloseBtn) +#2. Place the cursor before 'bar' +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "LEFT"})) +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "LEFT"})) +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "LEFT"})) +#3. Hit backspace 4 times -> Foo and bar are together +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) +self.assertEqual(document.Text.String[0:6], "foobar") +#4. Undo once-> Crash +self.xUITest.executeCommand(".uno:Undo") +#verify that we have now two words + self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog") +xDialog = self.xUITest.getTopFocusWindow() +xselectwords = xDialog.getChild("selectwords") +self.assertEqual(get_state_as_dict(xselectwords)["Text"], "2") +xCloseBtn = xDialog.getChild("close") +self.ui_test.close_dialog_through_button(xCloseBtn) + +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: sw/qa
sw/qa/uitest/table/tdf128593.py | 39 +++ 1 file changed, 39 insertions(+) New commits: commit 7f69594c5c6c32e0ec1b3cf2cdf4bf7147a7e0b1 Author: Zdeněk Crhonek AuthorDate: Mon Nov 11 19:21:27 2019 +0100 Commit: Zdenek Crhonek CommitDate: Mon Nov 11 20:59:52 2019 +0100 add uitest for bug tdf#128593 Change-Id: Icc0b22318406a92cf19843844e857d09dd9a4ba2 Reviewed-on: https://gerrit.libreoffice.org/82466 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/table/tdf128593.py b/sw/qa/uitest/table/tdf128593.py new file mode 100755 index ..26f9d903be27 --- /dev/null +++ b/sw/qa/uitest/table/tdf128593.py @@ -0,0 +1,39 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +import importlib +from uitest.uihelper.common import get_state_as_dict + +#https://bugs.documentfoundation.org/show_bug.cgi?id=128593 +#Bug 128593 - Writer table cell's background color is always black + +class tdf128593(UITestCase): +def test_tdf128593_table_background_color(self): +MainDoc = self.ui_test.create_doc_in_start_center("writer") +MainWindow = self.xUITest.getTopFocusWindow() + +self.ui_test.execute_dialog_through_command(".uno:InsertTable") +InsertTableDialog = self.xUITest.getTopFocusWindow() +xok = InsertTableDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xok) + + self.xUITest.executeCommandWithParameters(".uno:TableCellBackgroundColor", mkPropertyValues({"TableCellBackgroundColor" : 16776960 }) ) +self.ui_test.execute_dialog_through_command(".uno:TableDialog") +writer_edit = MainWindow.getChild("writer_edit") +writer_edit.executeAction("SELECT", mkPropertyValues({"END_POS": "0", "START_POS": "0"})) +TablePropertiesDialog = self.xUITest.getTopFocusWindow() +tabcontrol = TablePropertiesDialog.getChild("tabcontrol") +tabcontrol.executeAction("SELECT", mkPropertyValues({"POS": "4"})) +Rcustom = TablePropertiesDialog.getChild("R_custom") #255 +self.assertEqual(get_state_as_dict(Rcustom)["Text"], "255") +Gcustom = TablePropertiesDialog.getChild("G_custom") #255 +self.assertEqual(get_state_as_dict(Gcustom)["Text"], "255") +Bcustom = TablePropertiesDialog.getChild("B_custom") #0 +self.assertEqual(get_state_as_dict(Bcustom)["Text"], "0") +xok = TablePropertiesDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xok) + +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: sd/qa
sd/qa/uitest/impress_tests/customSlideShow.py | 81 ++ 1 file changed, 81 insertions(+) New commits: commit 42eb80c12aae5ae87c218a670d95a82d916f6e2c Author: Zdeněk Crhonek AuthorDate: Fri Sep 6 07:34:24 2019 +0200 Commit: Zdenek Crhonek CommitDate: Fri Sep 6 08:31:34 2019 +0200 uitest add test for Impress - Custom slide show dialog Change-Id: Ief7fc017f69f4daa706d1a40050143f5d33b4f10 Reviewed-on: https://gerrit.libreoffice.org/78681 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sd/qa/uitest/impress_tests/customSlideShow.py b/sd/qa/uitest/impress_tests/customSlideShow.py new file mode 100644 index ..61b15cda8743 --- /dev/null +++ b/sd/qa/uitest/impress_tests/customSlideShow.py @@ -0,0 +1,81 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +import importlib +from uitest.debug import sleep +from uitest.uihelper.common import select_pos +from uitest.uihelper.common import get_state_as_dict, type_text + +class customSlideShow(UITestCase): +def test_customSlideShow(self): +MainDoc = self.ui_test.create_doc_in_start_center("impress") +MainWindow = self.xUITest.getTopFocusWindow() +TemplateDialog = self.xUITest.getTopFocusWindow() +cancel = TemplateDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(cancel) +self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") +CustomSlideShows = self.xUITest.getTopFocusWindow() +new = CustomSlideShows.getChild("new") +ok = CustomSlideShows.getChild("ok") + +def handle_new_dlg(DefineCustomSlideShow): +customname = DefineCustomSlideShow.getChild("customname") +customname.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) +customname.executeAction("TYPE", mkPropertyValues({"TEXT": "a"})) +customname.executeAction("TYPE", mkPropertyValues({"TEXT": "a"})) +pages = DefineCustomSlideShow.getChild("pages") +xEntry = pages.getChild("0") +xEntry.executeAction("SELECT", tuple()) +add = DefineCustomSlideShow.getChild("add") +add.executeAction("CLICK",tuple()) +ok = DefineCustomSlideShow.getChild("ok") +self.ui_test.close_dialog_through_button(ok) + +self.ui_test.execute_blocking_action(new.executeAction, args=('CLICK', ()), +dialog_handler=handle_new_dlg) +self.ui_test.close_dialog_through_button(ok) +#verify +self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") +CustomSlideShows = self.xUITest.getTopFocusWindow() +edit = CustomSlideShows.getChild("edit") +customshowlist = CustomSlideShows.getChild("customshowlist") +self.assertEqual(get_state_as_dict(customshowlist)["SelectionCount"], "1") +select_pos(customshowlist, "1") +ok = CustomSlideShows.getChild("ok") + +def handle_edit_dlg(DefineCustomSlideShow): +customname = DefineCustomSlideShow.getChild("customname") +self.assertEqual(get_state_as_dict(customname)["Text"], "aa") +#print(DefineCustomSlideShow.getChildren()) +custompages = DefineCustomSlideShow.getChild("custompages") +pages = DefineCustomSlideShow.getChild("pages") +remove = DefineCustomSlideShow.getChild("remove") +#print(get_state_as_dict(custompages)) +self.assertEqual(get_state_as_dict(custompages)["Children"], "1") +self.assertEqual(get_state_as_dict(pages)["Children"], "1") +xEntry = custompages.getChild("0") +xEntry.executeAction("SELECT", tuple()) +#remove.executeAction("CLICK",tuple()) #tdf126951 +self.assertEqual(get_state_as_dict(custompages)["Children"], "1") +self.assertEqual(get_state_as_dict(pages)["Children"], "1") +cancel = DefineCustomSlideShow.getChild("cancel") +self.ui_test.close_dialog_through_button(cancel) + +self.ui_test.execute_blocking_action(edit.executeAction, args=('CLICK', ()), +dialog_handler=handle_edit_dlg) + +CustomSlideShows = self.xUITest.getTopFocusWindow() +delete = CustomSlideShows.getChild("delete") +customshowlist = CustomSlideShows.getChild(&quo
[Libreoffice-commits] core.git: sd/qa
sd/qa/uitest/impress_tests/slideShowSettings.py | 62 1 file changed, 62 insertions(+) New commits: commit 0d6fcc061c578e52f8cf49bdb65ae535038faabd Author: Zdeněk Crhonek AuthorDate: Wed Aug 21 07:34:54 2019 +0200 Commit: Zdenek Crhonek CommitDate: Wed Aug 21 12:12:13 2019 +0200 uitest Impres Slide show settings Change-Id: I7ab713da5078852a0e79c2cf959ca4f87bc6457f Reviewed-on: https://gerrit.libreoffice.org/77865 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sd/qa/uitest/impress_tests/slideShowSettings.py b/sd/qa/uitest/impress_tests/slideShowSettings.py new file mode 100644 index ..2d2a5920da86 --- /dev/null +++ b/sd/qa/uitest/impress_tests/slideShowSettings.py @@ -0,0 +1,62 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +import importlib +from uitest.debug import sleep +from uitest.uihelper.common import get_state_as_dict, type_text + +class slideShowSettings(UITestCase): +def test_slideShowSettings(self): +MainDoc = self.ui_test.create_doc_in_start_center("impress") +MainWindow = self.xUITest.getTopFocusWindow() +TemplateDialog = self.xUITest.getTopFocusWindow() +cancel = TemplateDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(cancel) +self.xUITest.executeCommand(".uno:InsertPage") +self.ui_test.execute_dialog_through_command(".uno:PresentationDialog") +PresentationDialog = self.xUITest.getTopFocusWindow() + +xfrom = PresentationDialog.getChild("from") +xfrom.executeAction("CLICK",tuple()) +from_cb = PresentationDialog.getChild("from_cb") +from_cb.executeAction("SELECT", mkPropertyValues({"POS": "0"})) +window = PresentationDialog.getChild("window") +window.executeAction("CLICK",tuple()) +manualslides = PresentationDialog.getChild("manualslides") +manualslides.executeAction("CLICK",tuple()) +pointervisible = PresentationDialog.getChild("pointervisible") +pointervisible.executeAction("CLICK",tuple()) +pointeraspen = PresentationDialog.getChild("pointeraspen") +pointeraspen.executeAction("CLICK",tuple()) +animationsallowed = PresentationDialog.getChild("animationsallowed") +animationsallowed.executeAction("CLICK",tuple()) +changeslidesbyclick = PresentationDialog.getChild("changeslidesbyclick") +changeslidesbyclick.executeAction("CLICK",tuple()) + +ok = PresentationDialog.getChild("ok") +self.ui_test.close_dialog_through_button(ok) +#verify +self.ui_test.execute_dialog_through_command(".uno:PresentationDialog") +PresentationDialog = self.xUITest.getTopFocusWindow() +xfrom = PresentationDialog.getChild("from") +self.assertEqual(get_state_as_dict(xfrom)["Checked"], "true") +from_cb = PresentationDialog.getChild("from_cb") +self.assertEqual(get_state_as_dict(from_cb)["SelectEntryText"], "Slide 1") +manualslides = PresentationDialog.getChild("manualslides") +self.assertEqual(get_state_as_dict(manualslides)["Selected"], "true") +pointervisible = PresentationDialog.getChild("pointervisible") +self.assertEqual(get_state_as_dict(pointervisible)["Selected"], "true") +pointeraspen = PresentationDialog.getChild("pointeraspen") +self.assertEqual(get_state_as_dict(pointeraspen)["Selected"], "true") +animationsallowed = PresentationDialog.getChild("animationsallowed") +self.assertEqual(get_state_as_dict(animationsallowed)["Selected"], "false") +changeslidesbyclick = PresentationDialog.getChild("changeslidesbyclick") +self.assertEqual(get_state_as_dict(changeslidesbyclick)["Selected"], "false") + +cancel = PresentationDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(cancel) + +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: Branch 'libreoffice-6-3' - 2 commits - sw/qa sw/source
sw/qa/uitest/writer_tests/data/tdf107975.odt |binary sw/qa/uitest/writer_tests6/tdf107975.py | 42 +++ sw/source/core/access/accframebase.cxx |8 + sw/source/core/access/accmap.cxx | 17 ++ sw/source/core/layout/trvlfrm.cxx| 16 -- 5 files changed, 79 insertions(+), 4 deletions(-) New commits: commit 1145f62936c4979a50b26ddf3d6b9127dd749ab9 Author: Zdeněk Crhonek AuthorDate: Wed Jun 12 19:13:17 2019 +0200 Commit: Michael Stahl CommitDate: Mon Jul 22 14:02:44 2019 +0200 uitest for bug tdf#107975 Change-Id: I90300092b9f8aa4190acd05f41f3c7093a2229a3 Reviewed-on: https://gerrit.libreoffice.org/73907 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek (cherry picked from commit cd4ec0c236483d4c478157b08e310e1585412c7c) Reviewed-on: https://gerrit.libreoffice.org/76085 Reviewed-by: Michael Stahl diff --git a/sw/qa/uitest/writer_tests/data/tdf107975.odt b/sw/qa/uitest/writer_tests/data/tdf107975.odt new file mode 100644 index ..afcab1814b58 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf107975.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf107975.py b/sw/qa/uitest/writer_tests6/tdf107975.py new file mode 100644 index ..202e7426bbaa --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf107975.py @@ -0,0 +1,42 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 107975 - CRASH: Crash after undo operation (BigPtrArray::Index2Block(unsigned long) + +class tdf107975(UITestCase): + def test_tdf107975_crash_after_undo(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf107975.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +#Press CTRL+A and + CTRL+C +self.xUITest.executeCommand(".uno:SelectAll") +self.xUITest.executeCommand(".uno:Copy") +#Position the mouse cursor (caret) after "ABC" below the blue image +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"})) +#Paste CTRL+V +self.xUITest.executeCommand(".uno:Paste") +#Undo paste CTRL+Z -> Crash +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(document.Text.String[0:3], "ABC") + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: commit 74912b98a81efd41da7565bb508f364e58ac9a9f Author: Michael Stahl AuthorDate: Thu Jul 18 18:27:18 2019 +0200 Commit: Miklos Vajna CommitDate: Mon Jul 22 14:02:37 2019 +0200 (related: tdf#110442) sw: fix a11y/UI selection of at-char flys SwAccessibleFrameBase::GetSelectedState() and SwAccessibleMap ignored FLY_AT_CHAR flys for no apparent reason. SwRootFrame::CalcFrameRects() is the function that determines the selection overlay painted in the view. Change-Id: I60aae2e401d2e811ed1aa8eb95cfd093c65c1de4 Reviewed-on: https://gerrit.libreoffice.org/75961 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit be55b1915fd0374f8f25c2c1be2b39744666d052) Reviewed-on: https://gerrit.libreoffice.org/76087 Reviewed-by: Miklos Vajna diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index 609ca2e5b4d5..9b344b5a2b35 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -342,6 +343,13 @@ bool SwAccessibleFrameBase::GetSelectedState( ) && (nHere < nEndIndex ) ) return true; } +else if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR) +{ +if (IsDes
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests/data/tdf126017.odt |binary sw/qa/uitest/writer_tests6/tdf126017.py | 62 +++ 2 files changed, 62 insertions(+) New commits: commit 07ea5933b70d442f3c53b16df56772de3dca8392 Author: Zdeněk Crhonek AuthorDate: Sat Jul 13 22:57:40 2019 +0200 Commit: Zdenek Crhonek CommitDate: Mon Jul 15 20:35:02 2019 +0200 uitest for bug tdf#126017 Change-Id: I8a64c5eb017f4b6d468d082925a5022cb75d549e Reviewed-on: https://gerrit.libreoffice.org/75564 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf126017.odt b/sw/qa/uitest/writer_tests/data/tdf126017.odt new file mode 100644 index ..96d6a67a8b5b Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf126017.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf126017.py b/sw/qa/uitest/writer_tests6/tdf126017.py new file mode 100644 index ..5a0f58f2718c --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf126017.py @@ -0,0 +1,62 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 126017 - Crash swlo!SwNode::EndOfSectionIndex + +class tdf126017(UITestCase): + def test_tdf126017_crash_after_undo(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf126017.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +#go to TOC + self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog") +xDialog = self.xUITest.getTopFocusWindow() +searchterm = xDialog.getChild("searchterm") +searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"aasasas"})) +xsearch = xDialog.getChild("search") +xsearch.executeAction("CLICK", tuple()) +xcloseBtn = xDialog.getChild("close") +self.ui_test.close_dialog_through_button(xcloseBtn) +#edit index +self.ui_test.execute_dialog_through_command(".uno:EditCurIndex") #open index dialog +xDiagIndex = self.xUITest.getTopFocusWindow() +xOKBtn = xDiagIndex.getChild("ok") +title = xDiagIndex.getChild("title") +title.executeAction("TYPE", mkPropertyValues({"TEXT":""})) +self.ui_test.close_dialog_through_button(xOKBtn) + +self.xUITest.executeCommand(".uno:Undo") + +self.ui_test.execute_dialog_through_command(".uno:EditCurIndex") #open index dialog +xDiagIndex = self.xUITest.getTopFocusWindow() +xOKBtn = xDiagIndex.getChild("ok") +title = xDiagIndex.getChild("title") +title.executeAction("TYPE", mkPropertyValues({"TEXT":""})) +self.ui_test.close_dialog_through_button(xOKBtn) + +self.xUITest.executeCommand(".uno:Undo") +self.xUITest.executeCommand(".uno:Undo") + +self.assertEqual(document.Text.String[1:7], "CRASHY") + +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: sc/qa
sc/qa/uitest/calc_tests/rows.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 4d23907d5850d96e4c81ffa5332e7fb4cf4a Author: Zdeněk Crhonek AuthorDate: Mon Jun 24 17:38:48 2019 +0200 Commit: Zdenek Crhonek CommitDate: Tue Jun 25 17:15:54 2019 +0200 uitest Tweak calc RowHeight test - add cancel button press Change-Id: I95a9a150a4c3a8a6e890305f95807bde7b6568da Reviewed-on: https://gerrit.libreoffice.org/74654 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/rows.py b/sc/qa/uitest/calc_tests/rows.py index 52a71768d963..00b04e5f9d6e 100644 --- a/sc/qa/uitest/calc_tests/rows.py +++ b/sc/qa/uitest/calc_tests/rows.py @@ -62,8 +62,8 @@ class CalcRows(UITestCase): xDialog = self.xUITest.getTopFocusWindow() xvalue = xDialog.getChild("value") self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") -xOK = xDialog.getChild("ok") -self.ui_test.close_dialog_through_button(xOK) +xCancel = xDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(xCancel) self.ui_test.close_doc() @@ -301,4 +301,4 @@ class CalcRows(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 4) self.ui_test.close_doc() -# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file +# 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: sw/qa
sw/qa/uitest/writer_tests/data/tdf107975.odt |binary sw/qa/uitest/writer_tests6/tdf107975.py | 42 +++ 2 files changed, 42 insertions(+) New commits: commit cd4ec0c236483d4c478157b08e310e1585412c7c Author: Zdeněk Crhonek AuthorDate: Wed Jun 12 19:13:17 2019 +0200 Commit: Zdenek Crhonek CommitDate: Thu Jun 13 15:59:37 2019 +0200 uitest for bug tdf#107975 Change-Id: I90300092b9f8aa4190acd05f41f3c7093a2229a3 Reviewed-on: https://gerrit.libreoffice.org/73907 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf107975.odt b/sw/qa/uitest/writer_tests/data/tdf107975.odt new file mode 100644 index ..afcab1814b58 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf107975.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf107975.py b/sw/qa/uitest/writer_tests6/tdf107975.py new file mode 100644 index ..202e7426bbaa --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf107975.py @@ -0,0 +1,42 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 107975 - CRASH: Crash after undo operation (BigPtrArray::Index2Block(unsigned long) + +class tdf107975(UITestCase): + def test_tdf107975_crash_after_undo(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf107975.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +#Press CTRL+A and + CTRL+C +self.xUITest.executeCommand(".uno:SelectAll") +self.xUITest.executeCommand(".uno:Copy") +#Position the mouse cursor (caret) after "ABC" below the blue image +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"})) +#Paste CTRL+V +self.xUITest.executeCommand(".uno:Paste") +#Undo paste CTRL+Z -> Crash +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(document.Text.String[0:3], "ABC") + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf124815.ods |binary sc/qa/uitest/calc_tests8/tdf124815.py | 40 + 2 files changed, 40 insertions(+) New commits: commit 593cb90d5846f1c94ef209b6f0cd9b318c89ee65 Author: Zdeněk Crhonek AuthorDate: Tue Jun 11 19:36:51 2019 +0200 Commit: Zdenek Crhonek CommitDate: Tue Jun 11 22:12:14 2019 +0200 uitest for bug tdf#124815 Change-Id: I45c226fdf0b3f87fcc5bcded210d61b5d29258f5 Reviewed-on: https://gerrit.libreoffice.org/73835 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf124815.ods b/sc/qa/uitest/calc_tests/data/tdf124815.ods new file mode 100644 index ..8ad01f4a8838 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf124815.ods differ diff --git a/sc/qa/uitest/calc_tests8/tdf124815.py b/sc/qa/uitest/calc_tests8/tdf124815.py new file mode 100644 index ..a4e581006b42 --- /dev/null +++ b/sc/qa/uitest/calc_tests8/tdf124815.py @@ -0,0 +1,40 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 124815 - CRASH: inserting a column + +class tdf124815(UITestCase): +def test_tdf124815_crash_inserting_column(self): +#numberingformatpage.ui +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124815.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Go to Sheet - Insert Column - Insert Column before .uno:InsertColumnsBefore +self.xUITest.executeCommand(".uno:InsertColumnsBefore") +#verify +self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "Rakennukset") +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "Rakennukset") + +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: sw/qa
sw/qa/uitest/writer_tests6/tdf44837.py | 46 + 1 file changed, 46 insertions(+) New commits: commit 5c96421607dadca284902d127004fcc12fd89b84 Author: Zdeněk Crhonek AuthorDate: Mon Jun 3 19:08:29 2019 +0200 Commit: Zdenek Crhonek CommitDate: Tue Jun 4 15:15:53 2019 +0200 uitest for bug tdf#44837 Change-Id: I194553a6afbcfc17e40ef28627a2806806b69289 Reviewed-on: https://gerrit.libreoffice.org/73409 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests6/tdf44837.py b/sw/qa/uitest/writer_tests6/tdf44837.py new file mode 100644 index ..73d30be0e65c --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf44837.py @@ -0,0 +1,46 @@ +# +# 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 select_pos, get_state_as_dict, type_text +from com.sun.star.uno import RuntimeException +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep +#Bug 44837 - EDITING 'Replace All' clears current selection + +class tdf44837(UITestCase): + +def test_tdf448373_Replace_All_clears_current_selection(self): +self.ui_test.create_doc_in_start_center("writer") +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +document = self.ui_test.get_component() + +type_text(xWriterEdit, "asd asd") +self.xUITest.executeCommand(".uno:SelectAll") + + self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog") +xDialog = self.xUITest.getTopFocusWindow() +searchterm = xDialog.getChild("searchterm") +searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +searchterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"a"})) +replaceterm = xDialog.getChild("replaceterm") +replaceterm.executeAction("TYPE", mkPropertyValues({"TEXT":"b"})) #replace textbox + +selectionOnly = xDialog.getChild("selection") +selectionOnly.executeAction("CLICK", tuple()) +replaceall = xDialog.getChild("replaceall") +replaceall.executeAction("CLICK", tuple()) +xcloseBtn = xDialog.getChild("close") +self.ui_test.close_dialog_through_button(xcloseBtn) + +self.assertEqual(document.Text.String[0:8], "bsd bsd") +self.assertEqual(len(document.CurrentSelection.getByIndex(0).String) > 1, True) +#follow-up bug 125663 +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf124586.odt |binary sw/qa/uitest/writer_tests6/tdf124586.py | 48 +++ 2 files changed, 48 insertions(+) New commits: commit 1ee64eb345ef116e19a63dc97f791e80ba38fe80 Author: Zdeněk Crhonek AuthorDate: Fri May 31 17:09:05 2019 +0200 Commit: Zdenek Crhonek CommitDate: Fri May 31 20:53:51 2019 +0200 uitest for bug tdf#124586 Change-Id: I430efba0bd995de0ed799c68555188bbb61f06af Reviewed-on: https://gerrit.libreoffice.org/73279 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf124586.odt b/sw/qa/uitest/writer_tests/data/tdf124586.odt new file mode 100644 index ..4d3852ae51b6 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf124586.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf124586.py b/sw/qa/uitest/writer_tests6/tdf124586.py new file mode 100644 index ..62fa4250c8a5 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf124586.py @@ -0,0 +1,48 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 124586 - Crash if switch from user outline numbering to chapter numbering with same paragraph style + +class tdf124586(UITestCase): + def test_tdf124586_crash_switch_outline_numbering(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf124586.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +#Goto Tools > Chapter Numbering. + self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog") +xDialog = self.xUITest.getTopFocusWindow() +xstyle = xDialog.getChild("style") +props = {"TEXT": "MyHeading"} +actionProps = mkPropertyValues(props) +xstyle.executeAction("SELECT", actionProps) +xOK = xDialog.getChild("ok") +xOK.executeAction("CLICK", tuple()) + +self.assertEqual(document.Text.String[0:8], "Schritte") + + self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog") +xDialog = self.xUITest.getTopFocusWindow() +xstyle = xDialog.getChild("style") +self.assertEqual(get_state_as_dict(xstyle)["SelectEntryText"], "MyHeading") +xOK = xDialog.getChild("ok") +xOK.executeAction("CLICK", tuple()) +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf120731.odt |binary sw/qa/uitest/writer_tests6/tdf120731.py | 36 +++ 2 files changed, 36 insertions(+) New commits: commit 18d0d8541432782e9bf761992a8bda5d29ee6564 Author: Zdeněk Crhonek AuthorDate: Wed May 29 21:49:09 2019 +0200 Commit: Zdenek Crhonek CommitDate: Thu May 30 07:02:41 2019 +0200 uitest for bug tdf#120731 Change-Id: I85952c011e0f49e0fa8613910c993c919aa2b413 Reviewed-on: https://gerrit.libreoffice.org/73189 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf120731.odt b/sw/qa/uitest/writer_tests/data/tdf120731.odt new file mode 100644 index ..30638ec2c5d1 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf120731.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf120731.py b/sw/qa/uitest/writer_tests6/tdf120731.py new file mode 100644 index ..5521a2776be5 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf120731.py @@ -0,0 +1,36 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 120731 - Crash cuilo!makeAutoCorrEdit when open character dialog with large amount of text selected + +class tdf120731(UITestCase): + def test_tdf120731_crash_open_char_dialog(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf120731.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +self.xUITest.executeCommand(".uno:SelectAll") +self.ui_test.execute_dialog_through_command(".uno:FontDialog") +xDialog = self.xUITest.getTopFocusWindow() +xOK = xDialog.getChild("ok") +xOK.executeAction("CLICK", tuple()) +self.assertEqual(document.Text.String[0:5], "Lorem") +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf119343.ods |binary sc/qa/uitest/calc_tests8/tdf119343.py | 42 + 2 files changed, 42 insertions(+) New commits: commit 55e89e8f96665598bad96721ba4d0924150be864 Author: Zdeněk Crhonek AuthorDate: Mon May 27 22:06:04 2019 +0200 Commit: Zdenek Crhonek CommitDate: Tue May 28 16:44:36 2019 +0200 uitest for bug tdf#119343 Change-Id: I45aa7b4fda0f19319d3e009bf8d29099e8497c71 Reviewed-on: https://gerrit.libreoffice.org/73067 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf119343.ods b/sc/qa/uitest/calc_tests/data/tdf119343.ods new file mode 100644 index ..489d5c5fe292 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf119343.ods differ diff --git a/sc/qa/uitest/calc_tests8/tdf119343.py b/sc/qa/uitest/calc_tests8/tdf119343.py new file mode 100644 index ..14e8991a997e --- /dev/null +++ b/sc/qa/uitest/calc_tests8/tdf119343.py @@ -0,0 +1,42 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +from uitest.path import get_srcdir_url +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 119343 - EDITING: copied and pasted cells containing formulas are not recalcuated (2) + +class tdf119343(UITestCase): +def test_tdf119343_copy_paste_formula(self): +#numberingformatpage.ui +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf119343.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "M295"})) +self.xUITest.executeCommand(".uno:Copy") +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +self.xUITest.executeCommand(".uno:Paste") +#verify +self.assertEqual(get_cell_by_position(document, 0, 12, 295).getString(), "Q11005355") +self.assertEqual(get_cell_by_position(document, 0, 12, 294).getString(), "Q1099565") +self.assertEqual(get_cell_by_position(document, 0, 12, 293).getString(), "Q108420") + +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: sw/qa
sw/qa/uitest/writer_tests6/tdf125104.py | 44 1 file changed, 44 insertions(+) New commits: commit dfc75c367ccdd0af866e1ca87c62e6c8db11ecd4 Author: Zdeněk Crhonek AuthorDate: Thu May 23 17:12:58 2019 +0200 Commit: Zdenek Crhonek CommitDate: Thu May 23 21:49:27 2019 +0200 uitest for bug tdf#125104 Change-Id: Ie931fbec18b6b32b1f0f817df0e8a8ca31ca415a Reviewed-on: https://gerrit.libreoffice.org/72864 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests6/tdf125104.py b/sw/qa/uitest/writer_tests6/tdf125104.py new file mode 100644 index ..4414ec1f41e8 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf125104.py @@ -0,0 +1,44 @@ +# +# 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 select_pos, get_state_as_dict +from com.sun.star.uno import RuntimeException +from libreoffice.uno.propertyvalue import mkPropertyValues + +#Bug 125104 - Changing page numbering to "1st, 2nd, 3rd,..." causes crashes when trying to change Page settings later + +class tdf125104(UITestCase): + +def test_tdf125104_pageFormat_numbering(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() + +self.ui_test.execute_dialog_through_command(".uno:PageDialog") +xDialog = self.xUITest.getTopFocusWindow() +tabcontrol = xDialog.getChild("tabcontrol") +select_pos(tabcontrol, "1") + +comboLayoutFormat = xDialog.getChild("comboLayoutFormat") +props = {"TEXT": "1st, 2nd, 3rd, ..."} +actionProps = mkPropertyValues(props) +comboLayoutFormat.executeAction("SELECT", actionProps) + +okBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(okBtn) + +self.ui_test.execute_dialog_through_command(".uno:PageDialog") +xDialog = self.xUITest.getTopFocusWindow() +tabcontrol = xDialog.getChild("tabcontrol") +select_pos(tabcontrol, "1") +comboLayoutFormat = xDialog.getChild("comboLayoutFormat") + self.assertEqual(get_state_as_dict(comboLayoutFormat)["SelectEntryText"], "1st, 2nd, 3rd, ...") +cancelBtn = xDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(cancelBtn) + +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: sc/qa
sc/qa/uitest/calc_tests8/tdf124829.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 218d2ab43ac2f1c238349a9e45d5c228ad1c62c4 Author: Zdeněk Crhonek AuthorDate: Thu May 16 18:19:43 2019 +0200 Commit: Zdenek Crhonek CommitDate: Fri May 17 09:12:43 2019 +0200 uitest repair test 124829 Change-Id: I8b31da520f1cc609f97488a0c10c19bfe3b3b8e6 Reviewed-on: https://gerrit.libreoffice.org/72420 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests8/tdf124829.py b/sc/qa/uitest/calc_tests8/tdf124829.py index b2aa6d3647e5..97a43f641472 100644 --- a/sc/qa/uitest/calc_tests8/tdf124829.py +++ b/sc/qa/uitest/calc_tests8/tdf124829.py @@ -35,7 +35,7 @@ class tdf124829(UITestCase): self.xUITest.executeCommand(".uno:Undo") #verify; no crashes -self.assertEqual(get_cell_by_position(document, 5, 0, 0).getString(), "First Name") +self.assertEqual(document.Sheets.getCount(), 6) 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: sc/qa
sc/qa/uitest/calc_tests8/tdf125051.py | 50 ++ 1 file changed, 50 insertions(+) New commits: commit c05b25274867b8fa1a452b4967b8e9003f7378fa Author: Zdeněk Crhonek AuthorDate: Thu May 16 07:34:15 2019 +0200 Commit: Zdenek Crhonek CommitDate: Thu May 16 16:53:07 2019 +0200 uitest for bug tdf#125051 Change-Id: I7e347a1ce77f24855ad3e6c1c23f0308122501ba Reviewed-on: https://gerrit.libreoffice.org/72392 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests8/tdf125051.py b/sc/qa/uitest/calc_tests8/tdf125051.py new file mode 100644 index ..d993aacdf689 --- /dev/null +++ b/sc/qa/uitest/calc_tests8/tdf125051.py @@ -0,0 +1,50 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +#Bug 125051 - EDITING: CRASH when start SpellCheck + +class tdf125051(UITestCase): +def test_tdf125051_crash_spelling_dialog(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +enter_text_to_cell(gridwin, "A1", "text") +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.ui_test.execute_dialog_through_command(".uno:SpellDialog") +xDialog = self.xUITest.getTopFocusWindow() #Spelling dialog + +xDialog2 = self.xUITest.getTopFocusWindow() # info dialog "The spellcheck of this sheet has been completed.-> OK" +okBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(okBtn) + +xDialog = self.xUITest.getTopFocusWindow() #Spelling dialog +#open options +optionsBtn = xDialog.getChild("options") +def handle_options_dlg(dialog): +#print(dialog.getChildren()) +xCancelBtn = dialog.getChild("cancel") +self.ui_test.close_dialog_through_button(xCancelBtn) + +self.ui_test.execute_blocking_action(optionsBtn.executeAction, args=('CLICK', ()), +dialog_handler=handle_options_dlg) + +closeBtn = xDialog.getChild("close")#close Spelling dialog +self.ui_test.close_dialog_through_button(closeBtn) + +#verify, we didn't crash +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "text") + +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: sc/Module_sc.mk sc/qa sc/UITest_calc_tests8.mk
sc/Module_sc.mk|1 sc/UITest_calc_tests8.mk | 20 ++ sc/qa/uitest/calc_tests/data/tdf124829.ods |binary sc/qa/uitest/calc_tests8/tdf124829.py | 41 + 4 files changed, 62 insertions(+) New commits: commit 92e2776fc24ea5a13239f7f753e7d50e0c901295 Author: Zdeněk Crhonek AuthorDate: Wed May 15 20:09:39 2019 +0200 Commit: Zdenek Crhonek CommitDate: Thu May 16 07:30:10 2019 +0200 uitest for bug tdf#124829 Change-Id: I5eea7de34a37270e1bdf16ede271d73f9ea05730 Reviewed-on: https://gerrit.libreoffice.org/72376 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 0b424cd0a381..7d4928f41599 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -252,6 +252,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_sort \ UITest_chart \ UITest_pageFormat \ + UITest_calc_tests8 \ )) endif diff --git a/sc/UITest_calc_tests8.mk b/sc/UITest_calc_tests8.mk new file mode 100644 index ..b1c8dcbfcbdb --- /dev/null +++ b/sc/UITest_calc_tests8.mk @@ -0,0 +1,20 @@ +# -*- 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_tests8)) + +$(eval $(call gb_UITest_add_modules,calc_tests8,$(SRCDIR)/sc/qa/uitest,\ + calc_tests8/ \ +)) + +$(eval $(call gb_UITest_set_defs,calc_tests8, \ +TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/calc_tests/data/tdf124829.ods b/sc/qa/uitest/calc_tests/data/tdf124829.ods new file mode 100644 index ..280d349cf73a Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf124829.ods differ diff --git a/sc/qa/uitest/calc_tests8/tdf124829.py b/sc/qa/uitest/calc_tests8/tdf124829.py new file mode 100644 index ..b2aa6d3647e5 --- /dev/null +++ b/sc/qa/uitest/calc_tests8/tdf124829.py @@ -0,0 +1,41 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 124829 - CRASH: cutting and undoing a sheet with external links + +class tdf124829(UITestCase): +def test_tdf124829_Crash_cutting_undo_sheet_external_links(self): +#numberingformatpage.ui +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124829.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +self.xUITest.executeCommand(".uno:SelectAll") +self.xUITest.executeCommand(".uno:Cut") +for i in range(40): +self.xUITest.executeCommand(".uno:Undo") + +#verify; no crashes +self.assertEqual(get_cell_by_position(document, 5, 0, 0).getString(), "First Name") + +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf124675.docx |binary sw/qa/uitest/writer_tests6/tdf124675.py | 37 ++ 2 files changed, 37 insertions(+) New commits: commit bdad00277330cf49439fd86a87b8e025e946a098 Author: Zdeněk Crhonek AuthorDate: Wed May 15 19:37:43 2019 +0200 Commit: Zdenek Crhonek CommitDate: Wed May 15 22:56:18 2019 +0200 uitest for bug tdf#124675 Change-Id: I81070b04bb1aefb3a8983cade701afd1b0392f3d Reviewed-on: https://gerrit.libreoffice.org/72374 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf124675.docx b/sw/qa/uitest/writer_tests/data/tdf124675.docx new file mode 100644 index ..13ee05c5e6e5 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf124675.docx differ diff --git a/sw/qa/uitest/writer_tests6/tdf124675.py b/sw/qa/uitest/writer_tests6/tdf124675.py new file mode 100644 index ..2a02e36bcf12 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf124675.py @@ -0,0 +1,37 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 124675 - CRASH: after moving the content down and undoing + +class tdf124675(UITestCase): + def test_tdf124675_crash_moving_SwTextFrame_previous_page(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf124675.docx")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +for i in range(52): +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) + +self.xUITest.executeCommand(".uno:Undo") + +self.assertEqual(document.CurrentController.PageCount, 15) +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf125261.odt |binary sw/qa/uitest/writer_tests6/tdf125261.py | 36 +++ 2 files changed, 36 insertions(+) New commits: commit 9551a1ed54fc8131b52ee58114398924196313fd Author: Zdeněk Crhonek AuthorDate: Wed May 15 20:26:12 2019 +0200 Commit: Zdenek Crhonek CommitDate: Wed May 15 22:53:10 2019 +0200 uitest for bug tdf#125261 Change-Id: I282f4f3a07fece65bd482c7664aedd44d5852a4e Reviewed-on: https://gerrit.libreoffice.org/72378 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf125261.odt b/sw/qa/uitest/writer_tests/data/tdf125261.odt new file mode 100644 index ..5fd8152448da Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf125261.odt differ diff --git a/sw/qa/uitest/writer_tests6/tdf125261.py b/sw/qa/uitest/writer_tests6/tdf125261.py new file mode 100644 index ..c04952b4ffbf --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf125261.py @@ -0,0 +1,36 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 125261 - Applying autocorrect to text with URLs causes Writer to hang + +class tdf125261(UITestCase): + def test_tdf125261_crash_autocorrect_text_with_URL(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf125261.odt")) +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +#apply autocorrect StartAutoCorrect +self.xUITest.executeCommand(".uno:AutoFormatApply") + +self.xUITest.executeCommand(".uno:Undo") + +self.assertEqual(document.Text.String[0:4], "This") +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: sw/Module_sw.mk sw/qa sw/UITest_writer_tests6.mk
sw/Module_sw.mk |1 sw/UITest_writer_tests6.mk | 16 sw/qa/uitest/writer_tests6/tdf107847.py | 41 3 files changed, 58 insertions(+) New commits: commit de022e50184ffe162c9ef617e489533b54890a05 Author: Zdeněk Crhonek AuthorDate: Thu May 9 17:15:18 2019 +0200 Commit: Zdenek Crhonek CommitDate: Thu May 9 22:02:23 2019 +0200 uitest for bug tdf#107847 Change-Id: Ia3ad578f72fa82f0693c7eef34a43261e4efb878 Reviewed-on: https://gerrit.libreoffice.org/72060 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index c5e92e672051..c6a0c5f4fa0f 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -145,6 +145,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\ UITest_writer_tests3 \ UITest_writer_tests4 \ UITest_writer_tests5 \ + UITest_writer_tests6 \ UITest_table \ UITest_sw_findReplace \ UITest_sw_findSimilarity \ diff --git a/sw/UITest_writer_tests6.mk b/sw/UITest_writer_tests6.mk new file mode 100644 index ..876e569a567b --- /dev/null +++ b/sw/UITest_writer_tests6.mk @@ -0,0 +1,16 @@ +# 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,writer_tests6)) + +$(eval $(call gb_UITest_add_modules,writer_tests6,$(SRCDIR)/sw/qa/uitest,\ + writer_tests6/ \ +)) + +$(eval $(call gb_UITest_set_defs,writer_tests6, \ +TDOC="$(SRCDIR)/sw/qa/uitest/writer_tests/data" \ +)) diff --git a/sw/qa/uitest/writer_tests6/tdf107847.py b/sw/qa/uitest/writer_tests6/tdf107847.py new file mode 100644 index ..33f1e30861f4 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf107847.py @@ -0,0 +1,41 @@ +# -*- 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, type_text +from uitest.uihelper.common import select_pos +import time +from uitest.debug import sleep +#Bug 107847 - CRASH Opening macro tab of properties dialog (images, frames) causes crash + +class tdf107847(UITestCase): + + def test_tdf_107847_macro_tab_crash(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +self.ui_test.execute_dialog_through_command(".uno:InsertFrame") # insert frame +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "1") +select_pos(xTabs, "2") +select_pos(xTabs, "3") +select_pos(xTabs, "4") +select_pos(xTabs, "5") +select_pos(xTabs, "6") +select_pos(xTabs, "7") +select_pos(xTabs, "8") #tab Macro +xokbtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xokbtn) + +self.assertEqual(document.TextFrames.getCount(), 1) +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(document.TextFrames.getCount(), 0) +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf123520.ods |binary sc/qa/uitest/chart/tdf123520.py| 89 + 2 files changed, 89 insertions(+) New commits: commit 2f979d0fd97a28bba285d57ebaf0a2657be47e41 Author: Zdeněk Crhonek AuthorDate: Wed May 1 10:09:11 2019 +0200 Commit: Zdenek Crhonek CommitDate: Sat May 4 10:58:19 2019 +0200 uitest for bug tdf#123050 Change-Id: I0ad8f3e7ad45bda132becad9ef2b2b12b83f751b Reviewed-on: https://gerrit.libreoffice.org/71617 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf123520.ods b/sc/qa/uitest/calc_tests/data/tdf123520.ods new file mode 100644 index ..48e24de0fbd4 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf123520.ods differ diff --git a/sc/qa/uitest/chart/tdf123520.py b/sc/qa/uitest/chart/tdf123520.py new file mode 100644 index ..2210446acb36 --- /dev/null +++ b/sc/qa/uitest/chart/tdf123520.py @@ -0,0 +1,89 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 123520 - Y axis - positioning tab, textbox "Cross other axis at" date changed + +class tdf123520(UITestCase): + def test_tdf123520_chart_y_cross_other_axis(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf123520.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) +gridwin.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": "DiagramAxisY"})) # Y Axis +xDialog = self.xUITest.getTopFocusWindow() +#Click on tab "positioning". +tabcontrol = xDialog.getChild("tabcontrol") +select_pos(tabcontrol, "1") + +crossAxis = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT") +crossAxisValue = xDialog.getChild("EDT_CROSSES_OTHER_AXIS_AT") #only available when crossAxis = Value +placeLabels = xDialog.getChild("LB_PLACE_LABELS") +innerMajorTick = xDialog.getChild("CB_TICKS_INNER") +outerMajorTick = xDialog.getChild("CB_TICKS_OUTER") +innerMinorTick = xDialog.getChild("CB_MINOR_INNER") +outerMinorTick = xDialog.getChild("CB_MINOR_OUTER") +placeMarks = xDialog.getChild("LB_PLACE_TICKS") +crossAxisValue.executeAction("CLEAR", tuple()) +crossAxisValue.executeAction("TYPE", mkPropertyValues({"TEXT":"01.01.2018"})) +#crossAxisValue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"TAB"})) +#TAB doesn't works- add "a" at the end of textbox +#workaround - edit another ui item, it should trigger leave of textbox +props2 = {"TEXT": "Outside start"} +actionProps2 = mkPropertyValues(props2) +placeLabels.executeAction("SELECT", actionProps2) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +#reopen and verify tab "positioning". +gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) +gridwin.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": "DiagramAxisY"})) +xDialog = self.xUITest.getTopFocusWindow() + +tabcontrol = xDialog.getChild("tabcontrol") +sele
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests7/tdf125030.py | 36 ++ 1 file changed, 36 insertions(+) New commits: commit da53faea86be3980e014a3ec9acc7c48fe6aeeb9 Author: Zdeněk Crhonek AuthorDate: Tue Apr 30 23:51:31 2019 +0200 Commit: Zdenek Crhonek CommitDate: Wed May 1 11:51:21 2019 +0200 uitest for bug tdf#125030 Change-Id: Id3f8a0e7b03e47d5f09e87320006fbed293e941f Reviewed-on: https://gerrit.libreoffice.org/71602 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests7/tdf125030.py b/sc/qa/uitest/calc_tests7/tdf125030.py new file mode 100644 index ..5aaa81abca9a --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf125030.py @@ -0,0 +1,36 @@ +# -*- 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 +import os +from uitest.uihelper.common import get_state_as_dict +from uitest.debug import sleep +from libreoffice.uno.propertyvalue import mkPropertyValues +from libreoffice.calc.document import get_cell_by_position +from uitest.uihelper.calc import enter_text_to_cell + +#Bug 125030 - nice crash by repeating apply style (Ctrl+Shft+Y) + +class tdf125030(UITestCase): +def test_tdf125030_repeat_crash(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#enter data +enter_text_to_cell(gridwin, "A1", "") +enter_text_to_cell(gridwin, "B1", "") +#select A1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + self.xUITest.executeCommand(".uno:StyleApply?Style:string=Heading%201:string=CellStyles") +#focus on A2 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"})) +#repeat (Ctrl+Shft+Y) +self.xUITest.executeCommand(".uno:Repeat") +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf124818.xls |binary sc/qa/uitest/calc_tests7/tdf124818.py | 39 + 2 files changed, 39 insertions(+) New commits: commit 3f1d25bb033e48f9338d874fabfe0af8968379e8 Author: Zdeněk Crhonek AuthorDate: Sun Apr 28 20:37:21 2019 +0200 Commit: Zdenek Crhonek CommitDate: Sun Apr 28 22:06:03 2019 +0200 uitest for bug tdf#124818 Change-Id: I7aeca38c62c986041aab438e5d28bc8e6f0ccf2a Reviewed-on: https://gerrit.libreoffice.org/71486 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf124818.xls b/sc/qa/uitest/calc_tests/data/tdf124818.xls new file mode 100644 index ..2e5656978a9d Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf124818.xls differ diff --git a/sc/qa/uitest/calc_tests7/tdf124818.py b/sc/qa/uitest/calc_tests7/tdf124818.py new file mode 100644 index ..1345484268b7 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf124818.py @@ -0,0 +1,39 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 124818 - CRASH: selecting all and switching spreadsheet + +class tdf124818(UITestCase): + def test_tdf124818_crash_select_all_and_switch_spreadsheet(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124818.xls")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Select all ( Ctrl + A );Go to sheet Graph2;Select all;Crash +self.xUITest.executeCommand(".uno:SelectAll") +self.xUITest.executeCommand(".uno:JumpToPrevTable") +self.xUITest.executeCommand(".uno:SelectAll") + +#verify; no crashes +self.assertEqual(document.Sheets.getCount(), 3) + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf124896.ods |binary sc/qa/uitest/calc_tests7/tdf124896.py | 39 + 2 files changed, 39 insertions(+) New commits: commit 11defff14fc35e94364e7580994cc9def624f84c Author: Zdeněk Crhonek AuthorDate: Sun Apr 28 20:20:15 2019 +0200 Commit: Zdenek Crhonek CommitDate: Sun Apr 28 21:41:15 2019 +0200 uitest for bug tdf#124896 Change-Id: Iacaf5e19bb20dee471ebdc53977170312cf0fc5f Reviewed-on: https://gerrit.libreoffice.org/71485 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf124896.ods b/sc/qa/uitest/calc_tests/data/tdf124896.ods new file mode 100644 index ..2eef3473c173 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf124896.ods differ diff --git a/sc/qa/uitest/calc_tests7/tdf124896.py b/sc/qa/uitest/calc_tests7/tdf124896.py new file mode 100644 index ..b2f016847ea4 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf124896.py @@ -0,0 +1,39 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +# Bug 124896 - CRASH: deleting sheet + +class tdf124896(UITestCase): + def test_tdf124896_crash_delete_sheet(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124896.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +# Remove X Bar R Chart (2) sheet +self.ui_test.execute_dialog_through_command(".uno:Remove") #delete sheet +xDialog = self.xUITest.getTopFocusWindow() +xOKButton = xDialog.getChild("yes") +xOKButton.executeAction("CLICK", tuple()) +#verify; no crashes +self.assertEqual(document.Sheets.getCount(), 2) + +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: sw/qa
sw/qa/uitest/writer_tests5/tdf123446.py |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 41f427f9b816061d985da31954fdf414b9a39a3d Author: Zdeněk Crhonek AuthorDate: Sat Apr 27 16:03:30 2019 +0200 Commit: Caolán McNamara CommitDate: Sat Apr 27 17:37:44 2019 +0200 uitest for bug tdf#123313 https://bugs.documentfoundation.org/show_bug.cgi?id=123313#c9 Change-Id: Id72829984affbb1c4ce5bba4704e19a560260357 Reviewed-on: https://gerrit.libreoffice.org/71418 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/qa/uitest/writer_tests5/tdf123446.py b/sw/qa/uitest/writer_tests5/tdf123446.py index c7d8277d337e..dd39dd9f5c64 100644 --- a/sw/qa/uitest/writer_tests5/tdf123446.py +++ b/sw/qa/uitest/writer_tests5/tdf123446.py @@ -38,7 +38,8 @@ class tdf123446(UITestCase): #- Redo the ToC insertion. self.xUITest.executeCommand(".uno:Redo") #=> Crash. Now we verify the text -#self.xUITest.executeCommand(".uno:Undo") # This second undo crash in Clang build +# This second undo crash in Clang build https://bugs.documentfoundation.org/show_bug.cgi?id=123313#c9 +self.xUITest.executeCommand(".uno:Undo") self.assertEqual(document.Text.String[0:7], "LibreOf") self.ui_test.close_doc() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests/data/tdf124722.rtf | 873 +++ sw/qa/uitest/writer_tests5/tdf124722.py | 37 + 2 files changed, 910 insertions(+) New commits: commit af50621c2cc17414b52a5f4cbc2f65e1b685e252 Author: Zdeněk Crhonek AuthorDate: Fri Apr 26 19:28:50 2019 +0200 Commit: Zdenek Crhonek CommitDate: Sat Apr 27 12:19:42 2019 +0200 uitest for bug tdf#124722 Change-Id: Iec8dcde8090058d2d3c93c8eb7e9cbf32acd51e8 Reviewed-on: https://gerrit.libreoffice.org/71391 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf124722.rtf b/sw/qa/uitest/writer_tests/data/tdf124722.rtf new file mode 100644 index ..93f386d00a99 --- /dev/null +++ b/sw/qa/uitest/writer_tests/data/tdf124722.rtf @@ -0,0 +1,873 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;} +{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f379\fbidi \froman\fcharset238\fprq2 Cambria Math CE;} +{\f380\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f382\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f383\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f386\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;} +{\f387\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;} +{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} +{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf124816.xlsx |binary sc/qa/uitest/calc_tests7/tdf124816.py | 36 2 files changed, 36 insertions(+) New commits: commit 23e88b671ad2f63679a28f767173982292a45843 Author: Zdeněk Crhonek AuthorDate: Fri Apr 26 20:36:28 2019 +0200 Commit: Zdenek Crhonek CommitDate: Sat Apr 27 12:17:42 2019 +0200 uitest for bug tdf#124816 Change-Id: I658e7eb6eef88a23f3e86acd616d26c3fe793a82 Reviewed-on: https://gerrit.libreoffice.org/71393 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf124816.xlsx b/sc/qa/uitest/calc_tests/data/tdf124816.xlsx new file mode 100644 index ..890c9de8e0ac Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf124816.xlsx differ diff --git a/sc/qa/uitest/calc_tests7/tdf124816.py b/sc/qa/uitest/calc_tests7/tdf124816.py new file mode 100644 index ..b9b2b01f6eee --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf124816.py @@ -0,0 +1,36 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 124816 - CRASH: inserting a new row + +class tdf124816(UITestCase): + def test_tdf124816_crash_inserting_new_row(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124816.xlsx")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Go to Sheet - Insert Row - Insert row before +self.xUITest.executeCommand(".uno:InsertRowsBefore") +self.xUITest.executeCommand(".uno:Undo") +#verify; no crashes +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "1") +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf124822.xls |binary sc/qa/uitest/calc_tests7/tdf124822.py | 37 + 2 files changed, 37 insertions(+) New commits: commit a4d389d8a67240f7e056200a7bc6980d556b1379 Author: Zdeněk Crhonek AuthorDate: Fri Apr 26 20:09:16 2019 +0200 Commit: Zdenek Crhonek CommitDate: Sat Apr 27 12:16:13 2019 +0200 uitest for bug tdf#124822 Change-Id: Ia856b58c868e49ce2b293e95fd9503f1296bdcab Reviewed-on: https://gerrit.libreoffice.org/71392 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf124822.xls b/sc/qa/uitest/calc_tests/data/tdf124822.xls new file mode 100644 index ..2e5656978a9d Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf124822.xls differ diff --git a/sc/qa/uitest/calc_tests7/tdf124822.py b/sc/qa/uitest/calc_tests7/tdf124822.py new file mode 100644 index ..8c438df79725 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf124822.py @@ -0,0 +1,37 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +# Bug 124822 - CRASH: cutting and undoing + +class tdf124822(UITestCase): + def test_tdf124822_crash_cut_undo(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf124822.xls")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Select all ( Ctrl + A ) ; Cut ( Ctrl + X );Undo +self.xUITest.executeCommand(".uno:selectAll") +self.xUITest.executeCommand(".uno:Cut") +self.xUITest.executeCommand(".uno:Undo") +#verify; no crashes +self.assertEqual(get_cell_by_position(document, 2, 0, 0).getString(), "X") +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf120660.ods |binary sc/qa/uitest/calc_tests7/tdf120660.py | 66 + 2 files changed, 66 insertions(+) New commits: commit cd4d6187a24119cb4954ec10539902c2aa120c0f Author: Zdeněk Crhonek AuthorDate: Mon Apr 22 19:59:28 2019 +0200 Commit: Zdenek Crhonek CommitDate: Mon Apr 22 20:51:22 2019 +0200 uitest for bug tdf#120660 Change-Id: I73845626b9cc2872f3a38b6e6b13e05dde174113 Reviewed-on: https://gerrit.libreoffice.org/71076 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf120660.ods b/sc/qa/uitest/calc_tests/data/tdf120660.ods new file mode 100644 index ..fd9c3defd335 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf120660.ods differ diff --git a/sc/qa/uitest/calc_tests7/tdf120660.py b/sc/qa/uitest/calc_tests7/tdf120660.py new file mode 100644 index ..d36ad13bc365 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf120660.py @@ -0,0 +1,66 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 120660 - cells not recalculated after copy/paste different range of cells + +class tdf120660(UITestCase): +def test_tdf120660_undo_recalculate(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf120660.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-LibreOffice Calc-General-Input settings-Show overwrite warning when pasting data is unselected +#turn off message: You are pasting data into cells that already contain data +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General / replwarncb +xreplwarncb = xDialogOpt.getChild("replwarncb") +if (get_state_as_dict(xreplwarncb)["Selected"]) == "true": +xreplwarncb.executeAction("CLICK", tuple()) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A8:E8"})) +self.xUITest.executeCommand(".uno:Copy") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A4:E4"})) +self.xUITest.executeCommand(".uno:Paste") +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 1200) + +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 2200) + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A8:D8"})) +self.xUITest.executeCommand(".uno:Copy") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A4:D4"})) +self.xUITest.executeCommand(".uno:Paste") +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 1200) + +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 2200) + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests/data/tdf118540.docx |binary sw/qa/uitest/writer_tests5/tdf118540.py | 36 ++ 2 files changed, 36 insertions(+) New commits: commit c0af0d16193ccc82536ed61fc0f76e2bcdfef1b1 Author: Zdeněk Crhonek AuthorDate: Tue Apr 16 21:15:56 2019 +0200 Commit: Zdenek Crhonek CommitDate: Wed Apr 17 22:54:53 2019 +0200 uitest for bug tdf#118540 Change-Id: I71f479c00e47c277fe08329b4abd20dba8d68224 Reviewed-on: https://gerrit.libreoffice.org/70840 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf118540.docx b/sw/qa/uitest/writer_tests/data/tdf118540.docx new file mode 100644 index ..64022073e92f Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf118540.docx differ diff --git a/sw/qa/uitest/writer_tests5/tdf118540.py b/sw/qa/uitest/writer_tests5/tdf118540.py new file mode 100644 index ..0e00ad7ec0f3 --- /dev/null +++ b/sw/qa/uitest/writer_tests5/tdf118540.py @@ -0,0 +1,36 @@ +# -*- 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.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 118540 - LO6.1b2: DOCX crashes when properties are opened in print preview mode + +class tdf118540(UITestCase): + def test_tdf118540_preview_document_properties(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf118540.docx")) +document = self.ui_test.get_component() +self.xUITest.executeCommand(".uno:PrintPreview") #open print preview + self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties") #open properties dialog +xDialog = self.xUITest.getTopFocusWindow() +xOkBtn = xDialog.getChild("ok") +xOkBtn.executeAction("CLICK", tuple()) +self.xUITest.executeCommand(".uno:ClosePreview") # close print preview +#verify +self.assertEqual(document.Text.String[0:4], "Test") +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: sw/qa
sw/qa/uitest/writer_tests5/tdf121591.py | 36 1 file changed, 36 insertions(+) New commits: commit 8cd78aef23a5fe411ed19cce502dca9a3043c551 Author: Zdeněk Crhonek AuthorDate: Tue Apr 16 20:47:31 2019 +0200 Commit: Zdenek Crhonek CommitDate: Tue Apr 16 21:54:58 2019 +0200 uitest for bug tdf#121591 Change-Id: I374748da8d53045c411db35edbe4ddd65037456c Reviewed-on: https://gerrit.libreoffice.org/70838 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests5/tdf121591.py b/sw/qa/uitest/writer_tests5/tdf121591.py new file mode 100644 index ..04a42eec2ac9 --- /dev/null +++ b/sw/qa/uitest/writer_tests5/tdf121591.py @@ -0,0 +1,36 @@ +# -*- 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 +import time +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.debug import sleep +from uitest.uihelper.common import select_pos +#Bug 121591 - CRASH: Print Preview fails if cursor inside Floating frame +class tdf121591(UITestCase): + + def test_tdf121591_frame_print_preview(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +self.ui_test.execute_dialog_through_command(".uno:InsertFrame") # insert frame +xDialogFr = self.xUITest.getTopFocusWindow() + +xOkBtn=xDialogFr.getChild("ok") +xOkBtn.executeAction("CLICK", tuple()) + +type_text(xWriterEdit, "Text in the frame") +#open and close print preview +self.xUITest.executeCommand(".uno:PrintPreview") #open print preview +self.xUITest.executeCommand(".uno:ClosePreview") # close print preview +#verify nr. of frames +self.assertEqual(document.TextFrames.getCount(), 1) + +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: sw/qa
sw/qa/uitest/writer_tests/data/tdf117039.odt |binary sw/qa/uitest/writer_tests5/tdf117039.py | 31 +++ 2 files changed, 31 insertions(+) New commits: commit 8cab1756cf17279ef9fb36e2032d4fb76dbc0070 Author: Zdeněk Crhonek AuthorDate: Tue Apr 16 20:03:58 2019 +0200 Commit: Zdenek Crhonek CommitDate: Tue Apr 16 21:53:21 2019 +0200 uitest for bug tdf#117039 Change-Id: I80dc602db648c56edb895360188dfd0d43398b8c Reviewed-on: https://gerrit.libreoffice.org/70837 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf117039.odt b/sw/qa/uitest/writer_tests/data/tdf117039.odt new file mode 100644 index ..6f8f61d83ecc Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf117039.odt differ diff --git a/sw/qa/uitest/writer_tests5/tdf117039.py b/sw/qa/uitest/writer_tests5/tdf117039.py new file mode 100644 index ..f2750b35c2a8 --- /dev/null +++ b/sw/qa/uitest/writer_tests5/tdf117039.py @@ -0,0 +1,31 @@ +# -*- 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.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 117039 - Print Preview crashes on signed document + +class tdf117039(UITestCase): + def test_tdf117039_preview_signed_document(self): +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf117039.odt")) +document = self.ui_test.get_component() +self.xUITest.executeCommand(".uno:PrintPreview") #open print preview +self.xUITest.executeCommand(".uno:ClosePreview") # close print preview +#verify +self.assertEqual(document.Text.String[0:22], "Test digital signature") +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: sw/qa
sw/qa/uitest/writer_tests5/tdf123446.py | 45 1 file changed, 45 insertions(+) New commits: commit c37d632a12538dc1f7f32a4f9d2749aaf5f4d019 Author: Zdeněk Crhonek AuthorDate: Fri Mar 15 19:29:59 2019 +0100 Commit: Zdenek Crhonek CommitDate: Sun Apr 7 15:56:43 2019 +0200 uitest for bug tdf#123446 Change-Id: I46b23af4c98c96642b48741918a1f2bdbe10d444 Reviewed-on: https://gerrit.libreoffice.org/69318 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests5/tdf123446.py b/sw/qa/uitest/writer_tests5/tdf123446.py new file mode 100644 index ..c7d8277d337e --- /dev/null +++ b/sw/qa/uitest/writer_tests5/tdf123446.py @@ -0,0 +1,45 @@ +# -*- 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, type_text +import time +from uitest.debug import sleep +#Bug 123446 - Writer crashes after undoing + redoing ToC insertion in middle of word + +class tdf123446(UITestCase): + + def test_tsd123446_undo_redo_ToC_crash(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +#- Add a word to an empty document. +type_text(xWriterEdit, "LibreOffice") +#- Change its style to Heading 2. + self.xUITest.executeCommand(".uno:StyleApply?Style:string=Heading%202:string=ParagraphStyles") +#- Position cursor somewhere in the middle of the word, and add Table of Contents +#(no need to change anything in the dialog). +self.xUITest.executeCommand(".uno:GoLeft") +self.xUITest.executeCommand(".uno:GoLeft") +self.xUITest.executeCommand(".uno:GoLeft") +self.xUITest.executeCommand(".uno:GoLeft") + +self.ui_test.execute_dialog_through_command(".uno:InsertMultiIndex") +xDialog = self.xUITest.getTopFocusWindow() +xokbtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xokbtn) +#- Undo the ToC insertion. +self.xUITest.executeCommand(".uno:Undo") +#- Redo the ToC insertion. +self.xUITest.executeCommand(".uno:Redo") +#=> Crash. Now we verify the text +#self.xUITest.executeCommand(".uno:Undo") # This second undo crash in Clang build +self.assertEqual(document.Text.String[0:7], "LibreOf") + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf122509.ods |binary sc/qa/uitest/calc_tests7/tdf122509.py | 61 + 2 files changed, 61 insertions(+) New commits: commit a16e16a3669dbe992c3073ae0ff4545830618c76 Author: Zdeněk Crhonek AuthorDate: Fri Mar 29 20:10:27 2019 +0100 Commit: Zdenek Crhonek CommitDate: Sat Mar 30 17:21:23 2019 +0100 uitest for bug tdf#122509 Change-Id: Ie8b53cc693421fd18901b73b911ac2e9e0533281 Reviewed-on: https://gerrit.libreoffice.org/69937 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf122509.ods b/sc/qa/uitest/calc_tests/data/tdf122509.ods new file mode 100644 index ..cca0c5beb6db Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf122509.ods differ diff --git a/sc/qa/uitest/calc_tests7/tdf122509.py b/sc/qa/uitest/calc_tests7/tdf122509.py new file mode 100644 index ..87b28cb69b22 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf122509.py @@ -0,0 +1,61 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 122509 - EDITING Calc crashes when manipulating Negative numbers in red on Currency ( not gtk3 ) + +class tdf122509(UITestCase): +def test_tdf122509_format_cell_negative_numbers(self): +#numberingformatpage.ui +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf122509.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#select cell A1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#format - cell +self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "0") #tab Numbers +xliststore1 = xDialog.getChild("categorylb") #1st list / Category +xliststore2 = xDialog.getChild("formatlb") #2nd list / Format +xdecimalsed = xDialog.getChild("decimalsed") +xleadzerosed = xDialog.getChild("leadzerosed") +xnegnumred = xDialog.getChild("negnumred") +xthousands = xDialog.getChild("thousands") +xlanguagelb = xDialog.getChild("languagelb") +xformatted = xDialog.getChild("formatted") + +self.assertEqual(get_state_as_dict(xformatted)["Text"], "#,##0.00 [$USD];[RED]-#,##0.00 [$USD]") +#click negative +xnegnumred.executeAction("CLICK", tuple()) +#format check; https://bugs.documentfoundation.org/show_bug.cgi?id=122509#c7 +self.assertEqual(get_state_as_dict(xformatted)["Text"], "#,##0.00 [$USD];-#,##0.00 [$USD]") +# click negative +xnegnumred.executeAction("CLICK", tuple()) +#OK +xOk = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOk) +#verify; no crashes +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 2) + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf123479.ods |binary sc/qa/uitest/calc_tests7/tdf123479.py | 51 + 2 files changed, 51 insertions(+) New commits: commit e0656101ac92a37855b1302a6db19b91a5b8c149 Author: Zdeněk Crhonek AuthorDate: Fri Mar 29 20:31:07 2019 +0100 Commit: Zdenek Crhonek CommitDate: Sat Mar 30 06:56:12 2019 +0100 uitest for bug tdf#123479 Change-Id: I836ab17dbb6cbeaf62462cfac90d3c9ac1c890a9 Reviewed-on: https://gerrit.libreoffice.org/69940 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf123479.ods b/sc/qa/uitest/calc_tests/data/tdf123479.ods new file mode 100644 index ..90cf7efd854b Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf123479.ods differ diff --git a/sc/qa/uitest/calc_tests7/tdf123479.py b/sc/qa/uitest/calc_tests7/tdf123479.py new file mode 100644 index ..dc346313d696 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf123479.py @@ -0,0 +1,51 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 123479 - Crash in: ScFormulaResult::GetMatrixFormulaCellToken() + +class tdf123479(UITestCase): +def test_tdf123479_Crash_ScFormulaResult_GetMatrixFormulaCellToken(self): +#numberingformatpage.ui +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf123479.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Select D14:D16 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "D14:D16"})) +#Open Formula Wizard (Ctrl+F2) + self.ui_test.execute_modeless_dialog_through_command(".uno:FunctionDialog") +xDialog = self.xUITest.getTopFocusWindow() +edArg1 = xDialog.getChild("ED_ARG1") +edArg2 = xDialog.getChild("ED_ARG2") +formulaRes = xDialog.getChild("formula_result") + +#check formula wizzard data +self.assertEqual(get_state_as_dict(edArg1)["Text"], "CHAR(10)") +self.assertEqual(get_state_as_dict(edArg2)["Text"], "OFFSET($Data.$A$2:$Data.$A$4,0,COLUMN()-3)") +self.assertEqual(get_state_as_dict(formulaRes)["Text"], "{4;4;4}") + +xOk = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOk) +#verify; no crashes +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "Pass/Fail") + +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: sc/Module_sc.mk sc/qa sc/UITest_options.mk
sc/Module_sc.mk |1 sc/UITest_options.mk | 20 + sc/qa/uitest/options/tdf117458.py | 144 ++ 3 files changed, 165 insertions(+) New commits: commit 107af098311beafaadb343c5a3634389f56006a0 Author: Zdeněk Crhonek Date: Sat Jul 7 08:35:59 2018 +0200 uitest for bug tdf#117458 Change-Id: Ie6316a3b10567d0a291281a2358d4edfc5ab761c Reviewed-on: https://gerrit.libreoffice.org/57107 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 933d41736740..11518813b4eb 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -192,6 +192,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_solver \ UITest_goalSeek \ UITest_protect \ + UITest_options \ )) endif diff --git a/sc/UITest_options.mk b/sc/UITest_options.mk new file mode 100644 index ..2869fb4a510e --- /dev/null +++ b/sc/UITest_options.mk @@ -0,0 +1,20 @@ +# -*- 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,options)) + +$(eval $(call gb_UITest_add_modules,options,$(SRCDIR)/sc/qa/uitest,\ + options/ \ +)) + +$(eval $(call gb_UITest_set_defs,options, \ +TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/options/tdf117458.py b/sc/qa/uitest/options/tdf117458.py new file mode 100644 index ..8d12f3cf63db --- /dev/null +++ b/sc/qa/uitest/options/tdf117458.py @@ -0,0 +1,144 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +#Bug 117458 - Selection doesn't move left nor right by pressing ENTER + +class tdf117458(UITestCase): +def test_tdf117458_selection_move_by_enter(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Go to Tools -> Options -> LibreOffice Calc -> General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xCalcEntry = xPages.getChild('3') # Calc +xCalcEntry.executeAction("EXPAND", tuple()) +xCalcGeneralEntry = xCalcEntry.getChild('0') +xCalcGeneralEntry.executeAction("SELECT", tuple()) #General +xaligncb = xDialogOpt.getChild("aligncb") +xalignlb = xDialogOpt.getChild("alignlb") +if (get_state_as_dict(xaligncb)["Selected"]) == "false": +xaligncb.executeAction("CLICK", tuple()) +#Down +props = {"TEXT": "Down"} +actionProps = mkPropertyValues(props) +xalignlb.executeAction("SELECT", actionProps) + +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Select cell A1 +#and down up to "deselect" range +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:GoDown") +self.xUITest.executeCommand(".uno:GoUp") +#press Enter +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) +#Verify +self.assertEqual(get_state_as_dict(gridwin)["CurrentRow"], "1") + +#Go to Tools -> Options -> LibreOffice Calc -> General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xCalcEntry = xPages.getChild('3') # Calc +xCalcEntry.executeAction("EXPAND", tuple()) +xCalcGeneralEntry = xCalcEntry.getChild('0') +
[Libreoffice-commits] core.git: sw/Module_sw.mk sw/qa sw/UITest_writer_tests2.mk
sw/Module_sw.mk|1 sw/UITest_writer_tests2.mk | 16 +++ sw/qa/uitest/writer_tests/data/LibreOffice.jpg |binary sw/qa/uitest/writer_tests2/tdf116474.py| 55 + 4 files changed, 72 insertions(+) New commits: commit 616917f4e15d30307062f3c1a73656c8c9fbf3a9 Author: Zdeněk Crhonek Date: Thu Jun 28 21:26:57 2018 +0200 uitest for bug tdf#116474 Change-Id: I6b19626bf872c2eff61c57342579ec682a1c37d0 Reviewed-on: https://gerrit.libreoffice.org/56632 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 1e56264ac8de..a05c310abdb9 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -134,6 +134,7 @@ $(eval $(call gb_Module_add_screenshot_targets,sw,\ $(eval $(call gb_Module_add_uicheck_targets,sw,\ UITest_writer_tests \ + UITest_writer_tests2 \ )) endif diff --git a/sw/UITest_writer_tests2.mk b/sw/UITest_writer_tests2.mk new file mode 100644 index ..11fcfcb0e992 --- /dev/null +++ b/sw/UITest_writer_tests2.mk @@ -0,0 +1,16 @@ +# 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,writer_tests2)) + +$(eval $(call gb_UITest_add_modules,writer_tests2,$(SRCDIR)/sw/qa/uitest,\ + writer_tests2/ \ +)) + +$(eval $(call gb_UITest_set_defs,writer_tests2, \ +TDOC="$(SRCDIR)/sw/qa/uitest/writer_tests/data" \ +)) diff --git a/sw/qa/uitest/writer_tests/data/LibreOffice.jpg b/sw/qa/uitest/writer_tests/data/LibreOffice.jpg new file mode 100644 index ..23812dcfdd7e Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/LibreOffice.jpg differ diff --git a/sw/qa/uitest/writer_tests2/tdf116474.py b/sw/qa/uitest/writer_tests2/tdf116474.py new file mode 100644 index ..1354efa7b899 --- /dev/null +++ b/sw/qa/uitest/writer_tests2/tdf116474.py @@ -0,0 +1,55 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# 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 +from uitest.path import get_srcdir_url +from uitest.debug import sleep +from uitest.uihelper.common import select_pos + +#Bug 116474 - Undo/redo: The redo of adding caption to an image isn't working: no image + +def get_url_for_data_file(file_name): +return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name + +class tdf116474(UITestCase): + + def test_tdf116474_insert_caption_undo(self): +writer_doc = self.ui_test.create_doc_in_start_center("writer") +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +document = self.ui_test.get_component() +text = document.getText() +cursor = text.createTextCursor() +textGraphic = document.createInstance('com.sun.star.text.TextGraphicObject') +provider = self.xContext.ServiceManager.createInstance('com.sun.star.graphic.GraphicProvider') +graphic = provider.queryGraphic( mkPropertyValues({"URL": get_url_for_data_file("LibreOffice.jpg")})) +textGraphic.Graphic = graphic +text.insertTextContent(cursor, textGraphic, False) +#select image + document.getCurrentController().select(document.getDrawPage().getByIndex(0)) + + self.ui_test.execute_dialog_through_command(".uno:InsertCaptionDialog") # caption +xDialogCaption = self.xUITest.getTopFocusWindow() + +xCapt = xDialogCaption.getChild("caption_edit") +xCapt.executeAction("TYPE", mkPropertyValues({"TEXT":"Caption"})) + +xOkBtn=xDialogCaption.getChild("ok") +xOkBtn.executeAction("CLICK", tuple()) + +xFrame = document.TextFrames.getByIndex(0) +self.assertEqual(document.TextFrames.getByIndex(0).Text.String, "\nFigure 1: Caption") +self.assertEqual(document.GraphicObjects.getCount(), 1) #nr. of images +#Undo, redo +self.xUITest.executeCommand(".uno:Undo") +self.xUITest.executeCommand(".uno:Redo") +#Verify +self.assertEqual(document.TextFrames.getByIndex(0).Text.String, "\nFigure 1: Caption") +self.assertEqual(document.GraphicObjects.getCount(), 1) #nr. of images + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/Module_sc.mk sc/qa sc/UITest_protect.mk
sc/Module_sc.mk|1 sc/UITest_protect.mk | 20 ++ sc/qa/uitest/calc_tests3/clearCells.py | 287 + sc/qa/uitest/protect/protectSheet.py | 54 + sc/qa/uitest/protect/protectSpreadsheet.py | 46 5 files changed, 408 insertions(+) New commits: commit 681b3facd3ddb7ab4577c48e232fb29a269d0d40 Author: Zdeněk Crhonek Date: Wed Jun 27 21:56:55 2018 +0200 uitest ProtectSheet, protectSpreadsheet, clearCells, tdf#101904 Change-Id: I18f5563be60fa7826d8f720288abcfaf9d93313e Reviewed-on: https://gerrit.libreoffice.org/56564 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 2474f08553fa..933d41736740 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -191,6 +191,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_statistics \ UITest_solver \ UITest_goalSeek \ + UITest_protect \ )) endif diff --git a/sc/UITest_protect.mk b/sc/UITest_protect.mk new file mode 100644 index ..39ff0fba0941 --- /dev/null +++ b/sc/UITest_protect.mk @@ -0,0 +1,20 @@ +# -*- 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,protect)) + +$(eval $(call gb_UITest_add_modules,protect,$(SRCDIR)/sc/qa/uitest,\ + protect/ \ +)) + +$(eval $(call gb_UITest_set_defs,protect, \ +TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/calc_tests3/clearCells.py b/sc/qa/uitest/calc_tests3/clearCells.py new file mode 100644 index ..0c53947c99c4 --- /dev/null +++ b/sc/qa/uitest/calc_tests3/clearCells.py @@ -0,0 +1,287 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#deletecontents.ui +#+ Bug 101904 - Delete Contents dialog -- won't delete cell content "Date & time" +class clearCells(UITestCase): +def test_clear_cells_text(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +enter_text_to_cell(gridwin, "A1", "aa") +enter_text_to_cell(gridwin, "A2", "1") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) +self.ui_test.execute_dialog_through_command(".uno:Delete") +xDialog = self.xUITest.getTopFocusWindow() +xdeleteall = xDialog.getChild("deleteall") +xtext = xDialog.getChild("text") +xdatetime = xDialog.getChild("datetime") +xcomments = xDialog.getChild("comments") +xobjects = xDialog.getChild("objects") +xnumbers = xDialog.getChild("numbers") +xformulas = xDialog.getChild("formulas") +xformats = xDialog.getChild("formats") + +if (get_state_as_dict(xdeleteall)["Selected"]) == "true": +xdeleteall.executeAction("CLICK", tuple()) +if (get_state_as_dict(xtext)["Selected"]) == "false": +xtext.executeAction("CLICK", tuple()) +if (get_state_as_dict(xdatetime)["Selected"]) == "true": +xdatetime.executeAction("CLICK", tuple()) +if (get_state_as_dict(xcomments)["Selected"]) == "true": +xcomments.executeAction("CLICK", tuple()) +if (get_state_as_dict(xobjects)["Selected"]) == "true": +xobjects.executeAction("CLICK", tuple()) +if (get_state_as_dict(xnumbers)["Selected"]) == "true": +xnumbers.executeAction("CLICK", tuple()) +if (get_state_as_dict(xfor
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/solver/solver.py | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit df579bea05a27567ffecde5291d50f8a3720b730 Author: Zdeněk Crhonek Date: Wed Jun 27 21:13:13 2018 +0200 repair uitest solver.py Change-Id: I64b5d78e9a63c3b78b6ac87123bf09903556f8d9 Reviewed-on: https://gerrit.libreoffice.org/56543 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py index 4503a5da6877..2ac209b3d96b 100644 --- a/sc/qa/uitest/solver/solver.py +++ b/sc/qa/uitest/solver/solver.py @@ -11,13 +11,11 @@ from uitest.uihelper.calc import enter_text_to_cell from libreoffice.calc.document import get_cell_by_position from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.debug import sleep -# import org.libreoffice.unotest -# import pathlib -from uitest.path import get_srcdir_url -def get_url_for_data_file(file_name): -#return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() -return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name +import org.libreoffice.unotest +import pathlib +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() class solver(UITestCase): def test_solver(self): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/autofilter/tdf97340.py | 38 1 file changed, 38 insertions(+) New commits: commit 8e908ed926354703a00e19669e3f2631ebb05497 Author: Zdeněk Crhonek Date: Sun Jun 24 22:56:37 2018 +0200 uitest for bug tdf#97340 Change-Id: I5d8cb62f89e680e6d3cc3ad3ddaa727358b42424 Reviewed-on: https://gerrit.libreoffice.org/56362 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/autofilter/tdf97340.py b/sc/qa/uitest/autofilter/tdf97340.py new file mode 100644 index ..237ed71178ba --- /dev/null +++ b/sc/qa/uitest/autofilter/tdf97340.py @@ -0,0 +1,38 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 97340 - Calc crashes on filtering with select checkbox with space bar + +class tdf97340(UITestCase): +def test_tdf97340_autofilter(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xsearchEdit = xFloatWindow.getChild("search_edit") +xsearchEdit.executeAction("TYPE", mkPropertyValues({"TEXT":" "})) +xsearchEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/autofilter/data/tdf101165.ods |binary sc/qa/uitest/autofilter/tdf101165.py | 39 + 2 files changed, 39 insertions(+) New commits: commit 0daff7fc119a4c6430bb47425d3f842e21abdfaf Author: Zdeněk Crhonek Date: Sun Jun 24 23:20:30 2018 +0200 uitest for bug tdf#101165 Change-Id: Ia70a6f591c4f699ba441e4b0b87a2d7fcafde5dd Reviewed-on: https://gerrit.libreoffice.org/56364 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/autofilter/data/tdf101165.ods b/sc/qa/uitest/autofilter/data/tdf101165.ods new file mode 100644 index ..9c459bbc52c0 Binary files /dev/null and b/sc/qa/uitest/autofilter/data/tdf101165.ods differ diff --git a/sc/qa/uitest/autofilter/tdf101165.py b/sc/qa/uitest/autofilter/tdf101165.py new file mode 100644 index ..32ffb7c27c62 --- /dev/null +++ b/sc/qa/uitest/autofilter/tdf101165.py @@ -0,0 +1,39 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 101165 - Crashing on a filter selection, every time + +class tdf101165(UITestCase): +def test_tdf101165_autofilter(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf101165.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xAll = xFloatWindow.getChild("toggle_all") +xAll.executeAction("CLICK", tuple()) + +self.assertEqual(get_cell_by_position(document, 1, 0, 1).getValue(), 6494) + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/Module_sc.mk sc/qa
sc/Module_sc.mk |3 +-- sc/qa/uitest/goalSeek/tdf37341.py |4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) New commits: commit 37f71d7a954b2fdb3f0a03452eed8bec963f0033 Author: Zdeněk Crhonek Date: Sun Jun 24 14:57:51 2018 +0200 enable uitest for goal seek again changed failling test tdf37341 to not check exact result. Change-Id: I9a4328c6b518cd0c768414c602d765384ab02603 Reviewed-on: https://gerrit.libreoffice.org/56351 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index b51de1a23879..2474f08553fa 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -190,9 +190,8 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_calc_tests4 \ UITest_statistics \ UITest_solver \ + UITest_goalSeek \ )) endif -#FIXME needs debugging -# UITest_goalSeek \ # vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/goalSeek/tdf37341.py b/sc/qa/uitest/goalSeek/tdf37341.py index dcae4bb38aed..730c3482e296 100644 --- a/sc/qa/uitest/goalSeek/tdf37341.py +++ b/sc/qa/uitest/goalSeek/tdf37341.py @@ -40,7 +40,7 @@ class tdf37341(UITestCase): self.ui_test.execute_blocking_action(xOKBtn.executeAction, args=('CLICK', ()), dialog_handler=handle_OK_dlg) #verify -self.assertEqual(get_cell_by_position(document, 0, 4, 6).getValue(), 12879.147) +self.assertEqual(get_cell_by_position(document, 0, 4, 6).getValue() > 0, True) self.ui_test.close_doc() -# vim: set shiftwidth=4 softtabstop=4 expandtab: +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/emptyFile.ods |binary sc/qa/uitest/calc_tests2/tdf118189.py | 53 + 2 files changed, 53 insertions(+) New commits: commit fcb97088e7be05098b829913a4f392c8d91ff4a8 Author: Zdeněk Crhonek Date: Thu Jun 21 22:37:55 2018 +0200 uitest for bug tdf#118189 Change-Id: I1814d5609e905ab8e940ca8c838f7861cbb7a295 Reviewed-on: https://gerrit.libreoffice.org/56263 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/emptyFile.ods b/sc/qa/uitest/calc_tests/data/emptyFile.ods new file mode 100644 index ..cd2454dba44a Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/emptyFile.ods differ diff --git a/sc/qa/uitest/calc_tests2/tdf118189.py b/sc/qa/uitest/calc_tests2/tdf118189.py new file mode 100644 index ..ed33b20bcbee --- /dev/null +++ b/sc/qa/uitest/calc_tests2/tdf118189.py @@ -0,0 +1,53 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 118189 - EDITING Crashes on Undo after Cut conditional formatting data + +class tdf118189(UITestCase): +def test_tdf118189(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf118189.xlsx")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#1. Open attached document +#2. Copy Column A +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:SelectColumn") +self.xUITest.executeCommand(".uno:Copy") +#3. New Spreadsheet +calc_doc2 = self.ui_test.load_file(get_url_for_data_file("emptyFile.ods")) +gridwin2 = xCalcDoc.getChild("grid_window") +document2 = self.ui_test.get_component() + +frames = self.ui_test.get_frames() +frames[1].activate() +#4. Paste it +gridwin2.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:Paste") +#5. Cut it +self.xUITest.executeCommand(".uno:Cut") +#6. Undo +self.xUITest.executeCommand(".uno:Undo") + +#-> CRASH +self.assertEqual(get_cell_by_position(document2, 0, 0, 0).getString(), "") + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf93328.ods |binary sc/qa/uitest/calc_tests/tdf93328.py | 41 ++ 2 files changed, 41 insertions(+) New commits: commit 6ed8083ab4124b7469e567d1b24c1471f1688e62 Author: Zdeněk Crhonek Date: Thu Jun 21 17:41:10 2018 +0200 uitest for bug tdf#93328 Change-Id: Id20f21153e98e4c724f2fffdb52c7bbb274c53a9 Reviewed-on: https://gerrit.libreoffice.org/56260 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf93328.ods b/sc/qa/uitest/calc_tests/data/tdf93328.ods new file mode 100644 index ..1f6e32381b39 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf93328.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf93328.py b/sc/qa/uitest/calc_tests/tdf93328.py new file mode 100644 index ..c7681c264cd6 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf93328.py @@ -0,0 +1,41 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 93328 - Editing circular reference causes #VALUE! error +#In the attached spreadsheet, when either the cell g15 or g27 is edited (say include a "+1"), a #VALUE! error is generated throughout the circular reference loop. +#Editing of other cells in the loop do not (seem to consistently) generate this error. +class tdf93328(UITestCase): +def test_tdf93328(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf93328.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +enter_text_to_cell(gridwin, "G27", "=SUM(G24:G26)+1") + +#Verify +self.assertEqual(round(get_cell_by_position(document, 0, 6, 26).getValue() ,2), 6427.89) + +#undo +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(round(get_cell_by_position(document, 0, 6, 26).getValue() ,2), 6426.95) + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf118189.xlsx |binary sc/qa/uitest/calc_tests4/tdf118207.py | 60 2 files changed, 60 insertions(+) New commits: commit 33e223d07da289a25cbb2e0a06bd58ffde8d7c0b Author: Zdeněk Crhonek Date: Wed Jun 20 19:40:50 2018 +0200 uitest for bug tdf#118207 Change-Id: I40d0917673e602d4e0979249f34937af85caee03 Reviewed-on: https://gerrit.libreoffice.org/56177 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf118189.xlsx b/sc/qa/uitest/calc_tests/data/tdf118189.xlsx new file mode 100644 index ..5208b9de9b38 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf118189.xlsx differ diff --git a/sc/qa/uitest/calc_tests4/tdf118207.py b/sc/qa/uitest/calc_tests4/tdf118207.py new file mode 100644 index ..1f07672fa176 --- /dev/null +++ b/sc/qa/uitest/calc_tests4/tdf118207.py @@ -0,0 +1,60 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#Bug 118207 - CRASH: Cutting and pasting a conditional format column and undoing + +class tdf118207(UITestCase): +def test_tdf118207(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf118189.xlsx")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Make sure that tools-options-LibreOffice Calc-General-Input settings-Show overwrite warning when pasting data is NOT tagged. +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xCalcEntry = xPages.getChild('3') # Calc +xCalcEntry.executeAction("EXPAND", tuple()) +xCalcGeneralEntry = xCalcEntry.getChild('0') +xCalcGeneralEntry.executeAction("SELECT", tuple()) #General / replwarncb +xreplwarncb = xDialogOpt.getChild("replwarncb") +if (get_state_as_dict(xreplwarncb)["Selected"]) == "true": +xreplwarncb.executeAction("CLICK", tuple()) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Select Column A +#Cut it +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:SelectColumn") +self.xUITest.executeCommand(".uno:Cut") +#Paste it in Column B , Paste it in Column B again +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B1"})) +self.xUITest.executeCommand(".uno:Paste") +self.xUITest.executeCommand(".uno:Paste") +#Undo 3 times +self.xUITest.executeCommand(".uno:Undo") +self.xUITest.executeCommand(".uno:Undo") +self.xUITest.executeCommand(".uno:Undo") +#-> CRASH +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString() , "On Back Order") +#verify + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/Module_sc.mk sc/qa sc/UITest_goalSeek.mk
sc/Module_sc.mk |1 sc/UITest_goalSeek.mk | 20 sc/qa/uitest/calc_tests/data/goalSeek.ods |binary sc/qa/uitest/calc_tests/data/tdf37341.ods |binary sc/qa/uitest/calc_tests/data/tdf43693.ods |binary sc/qa/uitest/goalSeek/goalSeek.py | 49 ++ sc/qa/uitest/goalSeek/tdf37341.py | 46 sc/qa/uitest/goalSeek/tdf43693.py | 46 sc/qa/uitest/solver/solver.py |3 - 9 files changed, 163 insertions(+), 2 deletions(-) New commits: commit 1b4c09401053ff6df8de9e839299ac26efa28b37 Author: Zdeněk Crhonek Date: Wed Jun 20 20:03:26 2018 +0200 uitest Calc/Goal seek; tdf#37341 ; tdf#43693 Change-Id: Ib6416eec6245f22f49687437a466b1e5c6d60efb Reviewed-on: https://gerrit.libreoffice.org/56181 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index e8e1bb5b2bfb..2474f08553fa 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -190,6 +190,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_calc_tests4 \ UITest_statistics \ UITest_solver \ + UITest_goalSeek \ )) endif diff --git a/sc/UITest_goalSeek.mk b/sc/UITest_goalSeek.mk new file mode 100644 index ..0990482e7fd2 --- /dev/null +++ b/sc/UITest_goalSeek.mk @@ -0,0 +1,20 @@ +# -*- 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,goalSeek)) + +$(eval $(call gb_UITest_add_modules,goalSeek,$(SRCDIR)/sc/qa/uitest,\ + goalSeek/ \ +)) + +$(eval $(call gb_UITest_set_defs,goalSeek, \ +TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/calc_tests/data/goalSeek.ods b/sc/qa/uitest/calc_tests/data/goalSeek.ods new file mode 100644 index ..fd78ec0197e4 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/goalSeek.ods differ diff --git a/sc/qa/uitest/calc_tests/data/tdf37341.ods b/sc/qa/uitest/calc_tests/data/tdf37341.ods new file mode 100644 index ..d0f5024fb1ac Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf37341.ods differ diff --git a/sc/qa/uitest/calc_tests/data/tdf43693.ods b/sc/qa/uitest/calc_tests/data/tdf43693.ods new file mode 100644 index ..501a07765e71 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf43693.ods differ diff --git a/sc/qa/uitest/goalSeek/goalSeek.py b/sc/qa/uitest/goalSeek/goalSeek.py new file mode 100644 index ..59d8b894009d --- /dev/null +++ b/sc/qa/uitest/goalSeek/goalSeek.py @@ -0,0 +1,49 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + + +class goalSeek(UITestCase): +def test_goalSeek(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("goalSeek.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog") +xDialog = self.xUITest.getTopFocusWindow() +xformulaedit = xDialog.getChild("formulaedit") +xtarget = xDialog.getChild("target") +xvaredit = xDialog.getChild("varedit") +xtarget.executeAction("TYPE", mkPropertyValues({"TEXT":"15000"})) +xvaredit.executeAction("TYPE", mkPropertyValues({"TEXT":"B1"})) +xOKBtn = xDialog.getChild("ok") + +def handle_OK_dlg(dialog): +print(dialog.getChildren()) +xYesButn = dialog.getChild("yes") +self.ui_test.close_dialog_through_button(xYesButn)
[Libreoffice-commits] core.git: sc/Module_sc.mk sc/qa sc/UITest_solver.mk
sc/Module_sc.mk |1 sc/UITest_solver.mk | 20 + sc/qa/uitest/calc_tests/data/solver.ods |binary sc/qa/uitest/solver/solver.py | 65 4 files changed, 86 insertions(+) New commits: commit 3c744c65270681d00a50ff2df80702d2ef338ed0 Author: Zdeněk Crhonek Date: Tue Jun 19 18:12:50 2018 +0200 uitest Calc/Solver Change-Id: I6fdef503cdae8cb681f1acfec437c5ab3e7bcc5b Reviewed-on: https://gerrit.libreoffice.org/56121 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index b85622c0cdd3..e8e1bb5b2bfb 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -189,6 +189,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_calc_tests3 \ UITest_calc_tests4 \ UITest_statistics \ + UITest_solver \ )) endif diff --git a/sc/UITest_solver.mk b/sc/UITest_solver.mk new file mode 100644 index ..2e8e6af0076e --- /dev/null +++ b/sc/UITest_solver.mk @@ -0,0 +1,20 @@ +# -*- 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,solver)) + +$(eval $(call gb_UITest_add_modules,solver,$(SRCDIR)/sc/qa/uitest,\ + solver/ \ +)) + +$(eval $(call gb_UITest_set_defs,solver, \ +TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/calc_tests/data/solver.ods b/sc/qa/uitest/calc_tests/data/solver.ods new file mode 100644 index ..a6739664abb5 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/solver.ods differ diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py new file mode 100644 index ..e6ca81029985 --- /dev/null +++ b/sc/qa/uitest/solver/solver.py @@ -0,0 +1,65 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep +# import org.libreoffice.unotest +# import pathlib +from uitest.path import get_srcdir_url +def get_url_for_data_file(file_name): +#return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name + + +class solver(UITestCase): +def test_solver(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("solver.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog") +xDialog = self.xUITest.getTopFocusWindow() +xtargetedit = xDialog.getChild("targetedit") +xvalue = xDialog.getChild("value") +xvalueedit = xDialog.getChild("valueedit") +xchangeedit = xDialog.getChild("changeedit") +xref1edit = xDialog.getChild("ref1edit") +xval1edit = xDialog.getChild("val1edit") +xref2edit = xDialog.getChild("ref2edit") +xval2edit = xDialog.getChild("val2edit") +xop2list = xDialog.getChild("op2list") + +xvalue.executeAction("CLICK", tuple()) +xvalueedit.executeAction("TYPE", mkPropertyValues({"TEXT":"1000"})) +xchangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"C2"})) +xref1edit.executeAction("TYPE", mkPropertyValues({"TEXT":"C2"})) +xval1edit.executeAction("TYPE", mkPropertyValues({"TEXT":"C4"})) +xref2edit.executeAction("TYPE", mkPropertyValues({"TEXT":"C4"})) +props = {"TEXT": "=>"} +actionProps = mkPropertyValues(props) +xop2list.executeAction("SELECT", actionProps) + +xval2edit.executeAction("TYPE", mkPropertyValues({"TEXT":"0"
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf76731.ods |binary sc/qa/uitest/statistics/tdf76731.py | 73 ++ 2 files changed, 73 insertions(+) New commits: commit 3430102137a082625957d0669f7ec57834b94022 Author: Zdeněk Crhonek Date: Sun Jun 17 22:45:39 2018 +0200 uitest for bug tdf#76731 Change-Id: Id514b43050fec4bb8f1b4aac4cb2cd8e449812c6 Reviewed-on: https://gerrit.libreoffice.org/55970 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf76731.ods b/sc/qa/uitest/calc_tests/data/tdf76731.ods new file mode 100644 index ..6435d5f505f5 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf76731.ods differ diff --git a/sc/qa/uitest/statistics/tdf76731.py b/sc/qa/uitest/statistics/tdf76731.py new file mode 100644 index ..0dc1f86cb734 --- /dev/null +++ b/sc/qa/uitest/statistics/tdf76731.py @@ -0,0 +1,73 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +#Bug 76731 - ANOVA: F critical is not shown + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class anova(UITestCase): +def test_tdf76731_anova(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf76731.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#1. Open the attached sample document in Calc. +#2. Select the data range, i.e. A1:C5. +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C5"})) +#3. Choose Data - Analysis of Variance (ANOVA). +#4. Choose an arbitrary output cell and click OK. + self.ui_test.execute_modeless_dialog_through_command(".uno:AnalysisOfVarianceDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xradiotwofactor = xDialog.getChild("radio-two-factor") +xradiosinglefactor = xDialog.getChild("radio-single-factor") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") +xalphaspin = xDialog.getChild("alpha-spin") + +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$F$1"})) +xradiosinglefactor.executeAction("CLICK", tuple()) +xalphaspin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xalphaspin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xalphaspin.executeAction("TYPE", mkPropertyValues({"TEXT":"0.05"})) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Verify, Table of results is shown, "F critical" cell has "#NAME?" error value. +self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "ANOVA - Single Factor") +self.assertEqual(get_cell_by_position(document, 0, 5, 1).getString(), "Alpha") +self.assertEqual(get_cell_by_position(document, 0, 5, 3).getString(), "Groups") +self.assertEqual(get_cell_by_position(document, 0, 5, 4).getString(), "Column 1") +self.assertEqual(get_cell_by_position(document, 0, 5, 5).getString(), "Column 2") +self.assertEqual(get_cell_by_position(document, 0, 5, 6).getString(), "Column 3") +self.assertEqual(get_cell_by_position(document, 0, 5, 8).getString(), "Source of Variation&q
[Libreoffice-commits] core.git: sc/inc
sc/inc/scfuncs.hrc |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit e3bbc87b461f494536778033585852204fe3ec97 Author: Zdeněk Crhonek Date: Tue Jun 12 20:17:42 2018 +0200 tdf#71850 delete string "case-sensitive" in function wizzard EUROCONVERT Change-Id: I9ab56279c748eae1e54f4cecc799db1aee2e2601 Reviewed-on: https://gerrit.libreoffice.org/55716 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc index 5c750d26c7fd..c469214af76c 100644 --- a/sc/inc/scfuncs.hrc +++ b/sc/inc/scfuncs.hrc @@ -3895,9 +3895,9 @@ const char* SC_OPCODE_EUROCONVERT_ARY[] = NC_("SC_OPCODE_EUROCONVERT", "Value"), NC_("SC_OPCODE_EUROCONVERT", "The value to be converted."), NC_("SC_OPCODE_EUROCONVERT", "From currency"), -NC_("SC_OPCODE_EUROCONVERT", "ISO 4217 code of the currency from which is converted, case-sensitive."), +NC_("SC_OPCODE_EUROCONVERT", "ISO 4217 code of the currency from which is converted."), NC_("SC_OPCODE_EUROCONVERT", "To currency"), -NC_("SC_OPCODE_EUROCONVERT", "ISO 4217 code of the currency into which is converted, case-sensitive."), +NC_("SC_OPCODE_EUROCONVERT", "ISO 4217 code of the currency into which is converted."), NC_("SC_OPCODE_EUROCONVERT", "Full precision"), NC_("SC_OPCODE_EUROCONVERT", "If omitted or 0 or FALSE, the result is rounded to the decimals of To_currency. Else the result is not rounded."), NC_("SC_OPCODE_EUROCONVERT", "Triangulation precision"), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/chiSquare.py | 89 ++ sc/qa/uitest/statistics/fTest.py | 115 ++ sc/qa/uitest/statistics/tTest.py | 116 +++ sc/qa/uitest/statistics/zTest.py | 106 +++ 4 files changed, 426 insertions(+) New commits: commit 125412959553b8d345620b8532e4416607636da1 Author: Zdeněk Crhonek Date: Fri Jun 15 16:07:29 2018 +0200 uitest Calc-statistics- ttest, ztest,ftest, chi square Change-Id: I5d4aa467c786a04f5d2a4ad6da2d021d39a0aafb Reviewed-on: https://gerrit.libreoffice.org/55868 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/chiSquare.py b/sc/qa/uitest/statistics/chiSquare.py new file mode 100644 index ..bc922c4d0ea0 --- /dev/null +++ b/sc/qa/uitest/statistics/chiSquare.py @@ -0,0 +1,89 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class chiSquare(UITestCase): +def test_chiSquare(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "28") +enter_text_to_cell(gridwin, "A2", "26") +enter_text_to_cell(gridwin, "A3", "31") +enter_text_to_cell(gridwin, "A4", "23") +enter_text_to_cell(gridwin, "A5", "20") +enter_text_to_cell(gridwin, "A6", "27") +enter_text_to_cell(gridwin, "A7", "28") +enter_text_to_cell(gridwin, "A8", "14") +enter_text_to_cell(gridwin, "A9", "4") +enter_text_to_cell(gridwin, "A10", "0") +enter_text_to_cell(gridwin, "A11", "2") +enter_text_to_cell(gridwin, "A12", "8") +enter_text_to_cell(gridwin, "A13", "9") + +enter_text_to_cell(gridwin, "B1", "19") +enter_text_to_cell(gridwin, "B2", "13") +enter_text_to_cell(gridwin, "B3", "12") +enter_text_to_cell(gridwin, "B4", "5") +enter_text_to_cell(gridwin, "B5", "34") +enter_text_to_cell(gridwin, "B6", "31") +enter_text_to_cell(gridwin, "B7", "31") +enter_text_to_cell(gridwin, "B8", "12") +enter_text_to_cell(gridwin, "B9", "24") +enter_text_to_cell(gridwin, "B10", "23") +enter_text_to_cell(gridwin, "B11", "19") +enter_text_to_cell(gridwin, "B12", "10") +enter_text_to_cell(gridwin, "B13", "33") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:ChiSquareTestDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") + +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$B$13"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE&qu
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/regression.py | 289 ++ 1 file changed, 289 insertions(+) New commits: commit f32428f7eb03bce4fa8a4f8e7837d306cb7f4558 Author: Zdeněk Crhonek Date: Thu Jun 14 17:23:00 2018 +0200 uitest Calc/statistics/ regression Change-Id: If14073ad3c078925e32a946398ec1db73d2daa39 Reviewed-on: https://gerrit.libreoffice.org/55813 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/regression.py b/sc/qa/uitest/statistics/regression.py new file mode 100644 index ..b586d7af7c49 --- /dev/null +++ b/sc/qa/uitest/statistics/regression.py @@ -0,0 +1,289 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class regression(UITestCase): +def test_regression_column(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "Time") +enter_text_to_cell(gridwin, "A2", "1") +enter_text_to_cell(gridwin, "A3", "2") +enter_text_to_cell(gridwin, "A4", "3") +enter_text_to_cell(gridwin, "A5", "4") +enter_text_to_cell(gridwin, "A6", "5") +enter_text_to_cell(gridwin, "A7", "6") +enter_text_to_cell(gridwin, "A8", "7") +enter_text_to_cell(gridwin, "A9", "8") +enter_text_to_cell(gridwin, "A10", "9") +enter_text_to_cell(gridwin, "A11", "10") + +enter_text_to_cell(gridwin, "B1", "Measurement") +enter_text_to_cell(gridwin, "B2", "2.7") +enter_text_to_cell(gridwin, "B3", "4") +enter_text_to_cell(gridwin, "B4", "4.4") +enter_text_to_cell(gridwin, "B5", "7.1") +enter_text_to_cell(gridwin, "B6", "4.9") +enter_text_to_cell(gridwin, "B7", "3.6") +enter_text_to_cell(gridwin, "B8", "4") +enter_text_to_cell(gridwin, "B9", "0.6") +enter_text_to_cell(gridwin, "B10", "1") +enter_text_to_cell(gridwin, "B11", "4.3") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:B11"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:RegressionDialog") +xDialog = self.xUITest.getTopFocusWindow() +xvariable1rangeedit = xDialog.getChild("variable1-range-edit") +xvariable2rangeedit = xDialog.getChild("variable2-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") +xlinearcheck = xDialog.getChild("linear-check") +xlogarithmiccheck = xDialog.getChild("logarithmic-check") +xpowercheck = xDialog.getChild("power-check") + +xvariable1rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvariable1rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvariable1rangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$2:$A$11"})) +xvariable2rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvariable2rangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvariable2rangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$B$2:$B$11"})) +xoutputrangeedit.executeAction("TY
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests/data/tdf51816.odt |binary sw/qa/uitest/writer_tests/data/tdf58050.html | 19 + sw/qa/uitest/writer_tests/data/tdf68347.odt |binary sw/qa/uitest/writer_tests/wordCount.py | 294 +++ 4 files changed, 313 insertions(+) New commits: commit 5db29ca06b56bb235b0e8dfd0956715730f9cf0d Author: Zdeněk Crhonek Date: Sun Feb 25 12:56:44 2018 +0100 uitest-Word Count;tdf#68347 tdf#91100 tdf#58050 tdf#56975 tdf#56975 Change-Id: I76685155ca0d9f19a787c8cda13c1fa5afde8250 Reviewed-on: https://gerrit.libreoffice.org/50304 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sw/qa/uitest/writer_tests/data/tdf51816.odt b/sw/qa/uitest/writer_tests/data/tdf51816.odt new file mode 100644 index ..a7816a74fec9 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf51816.odt differ diff --git a/sw/qa/uitest/writer_tests/data/tdf58050.html b/sw/qa/uitest/writer_tests/data/tdf58050.html new file mode 100644 index ..9d61cf1c47d8 --- /dev/null +++ b/sw/qa/uitest/writer_tests/data/tdf58050.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + @page { margin: 56.7pt } + p { margin-bottom: 7pt; line-height: 120% } + + + +Bug 58050 test + + \ No newline at end of file diff --git a/sw/qa/uitest/writer_tests/data/tdf68347.odt b/sw/qa/uitest/writer_tests/data/tdf68347.odt new file mode 100644 index ..2e72fb541ba3 Binary files /dev/null and b/sw/qa/uitest/writer_tests/data/tdf68347.odt differ diff --git a/sw/qa/uitest/writer_tests/wordCount.py b/sw/qa/uitest/writer_tests/wordCount.py new file mode 100644 index ..da0dedbcc000 --- /dev/null +++ b/sw/qa/uitest/writer_tests/wordCount.py @@ -0,0 +1,294 @@ +# -*- 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.debug import sleep +from uitest.uihelper.common import get_state_as_dict, type_text +from uitest.path import get_srcdir_url + +def get_url_for_data_file(file_name): +return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name + +class writerWordCount(UITestCase): + +def test_word_count_dialog(self): + +self.ui_test.create_doc_in_start_center("writer") +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +document = self.ui_test.get_component() + +type_text(xWriterEdit, "Test for word count dialog") #type text +xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "8"})) #select two words + + self.ui_test.execute_modeless_dialog_through_command(".uno:WordCountDialog") +xDialog = self.xUITest.getTopFocusWindow() + +xselectwords = xDialog.getChild("selectwords") +xdocwords = xDialog.getChild("docwords") +xselectchars = xDialog.getChild("selectchars") +xdocchars = xDialog.getChild("docchars") +xselectcharsnospaces = xDialog.getChild("selectcharsnospaces") +xdoccharsnospaces = xDialog.getChild("doccharsnospaces") +xselectcjkchars = xDialog.getChild("selectcjkchars") +xdoccjkchars = xDialog.getChild("doccjkchars") + +self.assertEqual(get_state_as_dict(xselectwords)["Text"], "2") +self.assertEqual(get_state_as_dict(xdocwords)["Text"], "5") +self.assertEqual(get_state_as_dict(xselectchars)["Text"], "8") +self.assertEqual(get_state_as_dict(xdocchars)["Text"], "26") +self.assertEqual(get_state_as_dict(xselectcharsnospaces)["Text"], "7") +self.assertEqual(get_state_as_dict(xdoccharsnospaces)["Text"], "22") +self.assertEqual(get_state_as_dict(xselectcjkchars)["Text"], "0") +self.assertEqual(get_state_as_dict(xdoccjkchars)["Text"], "0") +xCloseBtn = xDialog.getChild("close") +self.ui_test.close_dialog_through_button(xCloseBtn) + +self.ui_test.close_doc() + +def test_tdf68347(self): +#Bug 68347 - Incorrect word count in a document with recorded changes +writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf68347.odt")) +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit&qu
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/movingAverage.py | 176 +++ 1 file changed, 176 insertions(+) New commits: commit 8f43ffc8b6701a70bbf992f798b1264d38b1ec7c Author: Zdeněk Crhonek Date: Wed Jun 13 13:01:26 2018 +0200 uitest Calc-statistics- Moving average Change-Id: I0e442ca3787c1b71c919dbf2d4da75eabfaca47f Reviewed-on: https://gerrit.libreoffice.org/55747 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/movingAverage.py b/sc/qa/uitest/statistics/movingAverage.py new file mode 100644 index ..ebb819fbfa3e --- /dev/null +++ b/sc/qa/uitest/statistics/movingAverage.py @@ -0,0 +1,176 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class movingAverage(UITestCase): +def test_moving_average_column(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "1") +enter_text_to_cell(gridwin, "A2", "0") +enter_text_to_cell(gridwin, "A3", "0") +enter_text_to_cell(gridwin, "A4", "0") +enter_text_to_cell(gridwin, "A5", "0") +enter_text_to_cell(gridwin, "A7", "0") +enter_text_to_cell(gridwin, "A8", "0") +enter_text_to_cell(gridwin, "A9", "0") +enter_text_to_cell(gridwin, "A10", "0") +enter_text_to_cell(gridwin, "A11", "0") +enter_text_to_cell(gridwin, "A12", "0") +enter_text_to_cell(gridwin, "A13", "0") + +enter_text_to_cell(gridwin, "B1", "0") +enter_text_to_cell(gridwin, "B2", "0") +enter_text_to_cell(gridwin, "B3", "1") +enter_text_to_cell(gridwin, "B4", "0") +enter_text_to_cell(gridwin, "B5", "0") +enter_text_to_cell(gridwin, "B6", "0") +enter_text_to_cell(gridwin, "B7", "0") +enter_text_to_cell(gridwin, "B8", "0") +enter_text_to_cell(gridwin, "B9", "0") +enter_text_to_cell(gridwin, "B10", "0") +enter_text_to_cell(gridwin, "B11", "0") +enter_text_to_cell(gridwin, "B12", "0") +enter_text_to_cell(gridwin, "B13", "0") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:MovingAverageDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") +xintervalspin = xDialog.getChild("interval-spin") + +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$B$13"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$F$1"})) +xintervalspin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/exponentialSmoothing.py | 184 1 file changed, 184 insertions(+) New commits: commit dc2d19b17c86c2a4e43d19ccb2a46c669c1dc530 Author: Zdeněk Crhonek Date: Tue Jun 12 16:32:26 2018 +0200 uitest Calc-statistics- Exponential Smoothing Change-Id: Ia6d711faaad8c7e1af16b5f72ab5f2b417172e36 Reviewed-on: https://gerrit.libreoffice.org/55700 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/exponentialSmoothing.py b/sc/qa/uitest/statistics/exponentialSmoothing.py new file mode 100644 index ..83ff5a9f76fc --- /dev/null +++ b/sc/qa/uitest/statistics/exponentialSmoothing.py @@ -0,0 +1,184 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class exponentialSmoothing(UITestCase): +def test_exponential_smoothing_column(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +sleep(30) +enter_text_to_cell(gridwin, "A1", "1") +enter_text_to_cell(gridwin, "A2", "0") +enter_text_to_cell(gridwin, "A3", "0") +enter_text_to_cell(gridwin, "A4", "0") +enter_text_to_cell(gridwin, "A5", "0") +enter_text_to_cell(gridwin, "A7", "0") +enter_text_to_cell(gridwin, "A8", "0") +enter_text_to_cell(gridwin, "A9", "0") +enter_text_to_cell(gridwin, "A10", "0") +enter_text_to_cell(gridwin, "A11", "0") +enter_text_to_cell(gridwin, "A12", "0") +enter_text_to_cell(gridwin, "A13", "0") + +enter_text_to_cell(gridwin, "B1", "0") +enter_text_to_cell(gridwin, "B2", "0") +enter_text_to_cell(gridwin, "B3", "1") +enter_text_to_cell(gridwin, "B4", "0") +enter_text_to_cell(gridwin, "B5", "0") +enter_text_to_cell(gridwin, "B6", "0") +enter_text_to_cell(gridwin, "B7", "0") +enter_text_to_cell(gridwin, "B8", "0") +enter_text_to_cell(gridwin, "B9", "0") +enter_text_to_cell(gridwin, "B10", "0") +enter_text_to_cell(gridwin, "B11", "0") +enter_text_to_cell(gridwin, "B12", "0") +enter_text_to_cell(gridwin, "B13", "0") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B13"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:ExponentialSmoothingDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") +xmoothingfactorspin = xDialog.getChild("smoothing-factor-spin") + +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$B$13"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xoutputrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$F$1"})) +xmoothingfactor
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/descriptiveStatistics.py | 157 +++ 1 file changed, 157 insertions(+) New commits: commit d776263a9968752e5098c7b61367d0ac8ca5e23c Author: Zdeněk Crhonek Date: Sat Jun 9 14:25:26 2018 +0200 uitest Calc-Statistics- Descriptive statistics Change-Id: If1b985d8b29cf2d30449f04c2a788b6db2f5db67 Reviewed-on: https://gerrit.libreoffice.org/55507 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/descriptiveStatistics.py b/sc/qa/uitest/statistics/descriptiveStatistics.py new file mode 100644 index ..aa2c10ff01fd --- /dev/null +++ b/sc/qa/uitest/statistics/descriptiveStatistics.py @@ -0,0 +1,157 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class descriptiveStatistics(UITestCase): +def test_descriptive_statistics(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "Math") +enter_text_to_cell(gridwin, "A2", "47") +enter_text_to_cell(gridwin, "A3", "36") +enter_text_to_cell(gridwin, "A4", "40") +enter_text_to_cell(gridwin, "A5", "39") +enter_text_to_cell(gridwin, "A7", "47") +enter_text_to_cell(gridwin, "A8", "29") +enter_text_to_cell(gridwin, "A9", "27") +enter_text_to_cell(gridwin, "A10", "57") +enter_text_to_cell(gridwin, "A11", "56") +enter_text_to_cell(gridwin, "A12", "57") +enter_text_to_cell(gridwin, "A13", "26") + + +enter_text_to_cell(gridwin, "B1", "Physics") +enter_text_to_cell(gridwin, "B2", "67") +enter_text_to_cell(gridwin, "B3", "68") +enter_text_to_cell(gridwin, "B4", "65") +enter_text_to_cell(gridwin, "B5", "64") +enter_text_to_cell(gridwin, "B6", "38") +enter_text_to_cell(gridwin, "B7", "84") +enter_text_to_cell(gridwin, "B8", "80") +enter_text_to_cell(gridwin, "B9", "49") +enter_text_to_cell(gridwin, "B10", "49") +enter_text_to_cell(gridwin, "B11", "33") + +enter_text_to_cell(gridwin, "C1", "Biology") +enter_text_to_cell(gridwin, "C2", "33") +enter_text_to_cell(gridwin, "C3", "42") +enter_text_to_cell(gridwin, "C4", "44") +enter_text_to_cell(gridwin, "C5", "60") +enter_text_to_cell(gridwin, "C6", "43") +enter_text_to_cell(gridwin, "C7", "62") +enter_text_to_cell(gridwin, "C8", "51") +enter_text_to_cell(gridwin, "C9", "40") +enter_text_to_cell(gridwin, "C10", "12") +enter_text_to_cell(gridwin, "C11", "60") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C13"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:DescriptiveStatisticsDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") + +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") + +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xinputrangeedit.executeAction("TYPE", mkProp
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/anova.py | 141 +++ 1 file changed, 141 insertions(+) New commits: commit 1f90d2c04b0fc4acd7db6224704793eb77617da1 Author: Zdeněk Crhonek Date: Sun Jun 10 14:48:18 2018 +0200 uitest - Calc-statistics- ANOVA Change-Id: I7e055f296f524e39c37fc7c502b8486d0cbbe3fd Reviewed-on: https://gerrit.libreoffice.org/55560 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/anova.py b/sc/qa/uitest/statistics/anova.py new file mode 100644 index ..158f5ee2b04c --- /dev/null +++ b/sc/qa/uitest/statistics/anova.py @@ -0,0 +1,141 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class anova(UITestCase): +def test_statistic_anova(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "Maths") +enter_text_to_cell(gridwin, "A2", "47") +enter_text_to_cell(gridwin, "A3", "36") +enter_text_to_cell(gridwin, "A4", "40") +enter_text_to_cell(gridwin, "A5", "39") +enter_text_to_cell(gridwin, "A7", "47") +enter_text_to_cell(gridwin, "A8", "29") +enter_text_to_cell(gridwin, "A9", "27") +enter_text_to_cell(gridwin, "A10", "57") +enter_text_to_cell(gridwin, "A11", "56") +enter_text_to_cell(gridwin, "A12", "57") +enter_text_to_cell(gridwin, "A13", "26") + +enter_text_to_cell(gridwin, "B1", "Physics") +enter_text_to_cell(gridwin, "B2", "67") +enter_text_to_cell(gridwin, "B3", "68") +enter_text_to_cell(gridwin, "B4", "65") +enter_text_to_cell(gridwin, "B5", "64") +enter_text_to_cell(gridwin, "B6", "38") +enter_text_to_cell(gridwin, "B7", "84") +enter_text_to_cell(gridwin, "B8", "80") +enter_text_to_cell(gridwin, "B9", "49") +enter_text_to_cell(gridwin, "B10", "49") +enter_text_to_cell(gridwin, "B11", "33") + +enter_text_to_cell(gridwin, "C1", "Biology") +enter_text_to_cell(gridwin, "C2", "33") +enter_text_to_cell(gridwin, "C3", "42") +enter_text_to_cell(gridwin, "C4", "44") +enter_text_to_cell(gridwin, "C5", "60") +enter_text_to_cell(gridwin, "C6", "43") +enter_text_to_cell(gridwin, "C7", "62") +enter_text_to_cell(gridwin, "C8", "51") +enter_text_to_cell(gridwin, "C9", "40") +enter_text_to_cell(gridwin, "C10", "12") +enter_text_to_cell(gridwin, "C11", "60") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:C13"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:AnalysisOfVarianceDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xradiotwofactor = xDialog.getChild("radio-two-factor") +xradiosinglefactor = xDialog.getChild("radio-single-factor") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") +xalphaspin = xDialog.getChild("alpha-spin") + +xinputrangeedit.executeAction("TYPE&qu
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/statistics/correlation.py | 196 + sc/qa/uitest/statistics/covariance.py | 194 2 files changed, 390 insertions(+) New commits: commit c36c3995bb6bd3396d76c8f124d7780f4bfc78d7 Author: Zdeněk Crhonek Date: Sun Jun 10 22:58:09 2018 +0200 uitest Calc-Statistics-Correlation and Covariance Change-Id: I147ed2c69a279703ad857a9532737201b7cde015 Reviewed-on: https://gerrit.libreoffice.org/55567 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/statistics/correlation.py b/sc/qa/uitest/statistics/correlation.py new file mode 100644 index ..44059ca433eb --- /dev/null +++ b/sc/qa/uitest/statistics/correlation.py @@ -0,0 +1,196 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class correlation(UITestCase): +def test_statistic_correlation_column(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "Maths") +enter_text_to_cell(gridwin, "A2", "47") +enter_text_to_cell(gridwin, "A3", "36") +enter_text_to_cell(gridwin, "A4", "40") +enter_text_to_cell(gridwin, "A5", "39") +enter_text_to_cell(gridwin, "A7", "47") +enter_text_to_cell(gridwin, "A8", "29") +enter_text_to_cell(gridwin, "A9", "27") +enter_text_to_cell(gridwin, "A10", "57") +enter_text_to_cell(gridwin, "A11", "56") +enter_text_to_cell(gridwin, "A12", "57") +enter_text_to_cell(gridwin, "A13", "26") + +enter_text_to_cell(gridwin, "B1", "Physics") +enter_text_to_cell(gridwin, "B2", "67") +enter_text_to_cell(gridwin, "B3", "68") +enter_text_to_cell(gridwin, "B4", "65") +enter_text_to_cell(gridwin, "B5", "64") +enter_text_to_cell(gridwin, "B6", "38") +enter_text_to_cell(gridwin, "B7", "84") +enter_text_to_cell(gridwin, "B8", "80") +enter_text_to_cell(gridwin, "B9", "49") +enter_text_to_cell(gridwin, "B10", "49") +enter_text_to_cell(gridwin, "B11", "33") + +enter_text_to_cell(gridwin, "C1", "Biology") +enter_text_to_cell(gridwin, "C2", "33") +enter_text_to_cell(gridwin, "C3", "42") +enter_text_to_cell(gridwin, "C4", "44") +enter_text_to_cell(gridwin, "C5", "60") +enter_text_to_cell(gridwin, "C6", "43") +enter_text_to_cell(gridwin, "C7", "62") +enter_text_to_cell(gridwin, "C8", "51") +enter_text_to_cell(gridwin, "C9", "40") +enter_text_to_cell(gridwin, "C10", "12") +enter_text_to_cell(gridwin, "C11", "60") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C13"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:CorrelationDialog") +xDialog = self.xUITest.getTopFocusWindow() +xinputrangeedit = xDialog.getChild("input-range-edit") +xoutputrangeedit = xDialog.getChild("output-range-edit") +xgroupedbyrowsradio = xDialog.getChild("groupedby-rows-radio") +xgroupedbycolumnsradio = xDialog.getChild("groupedby-columns-radio") + +xinputrangeedit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xinputrangeedit.executeActio
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/rows.py | 78 +++- 1 file changed, 77 insertions(+), 1 deletion(-) New commits: commit 9ac659ec61a88252344d08f0a79d2ac699da264d Author: Zdeněk Crhonek Date: Sun Jun 10 19:35:12 2018 +0200 uitest for bug tdf#83901 Change-Id: I7a718dd1cedb71e3c7430936a0f5b855af18090b Reviewed-on: https://gerrit.libreoffice.org/55563 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/rows.py b/sc/qa/uitest/calc_tests/rows.py index df6eb44ddc1c..52a71768d963 100644 --- a/sc/qa/uitest/calc_tests/rows.py +++ b/sc/qa/uitest/calc_tests/rows.py @@ -225,4 +225,80 @@ class CalcRows(UITestCase): self.ui_test.close_doc() -# vim: set shiftwidth=4 softtabstop=4 expandtab: +def test_row_height_insert_below(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-StarOffice Calc-General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General /cm +xunitlb = xDialogOpt.getChild("unitlb") +props = {"TEXT": "Centimeter"} +actionProps = mkPropertyValues(props) +xunitlb.executeAction("SELECT", actionProps) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#select A3 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) +#row height +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"1 cm"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#select row 3 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) +self.xUITest.executeCommand(".uno:SelectRow") +#insert rows below +self.xUITest.executeCommand(".uno:InsertRowsAfter") + +#verify +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A4"})) +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +self.ui_test.close_doc() + +def test_tdf83901_row_insert_after(self): +#Bug 83901 - ROW() value is not updated if row is inserted after +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#- A2 = ROW(A3) +enter_text_to_cell(gridwin, "A2", "=ROW(A3)") +#- Insert a row between rows 2 and 3 by right-clicking on row 3 and choosing "insert rows above". +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) +self.xUITest.executeCommand(".uno:SelectRow") +self.xUITest.executeCommand(".uno:InsertRowsBefore") + +#- Result: cell A2 still shows "3" as its value, although it should show "4". +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 4) + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/columns.py | 113 + 1 file changed, 113 insertions(+) New commits: commit 1202b34e977c64b2b643c45773dd3697889790b6 Author: Zdeněk Crhonek Date: Sun Jun 10 15:32:14 2018 +0200 uitest for bug tdf#117522 Change-Id: I02f0dfc9d6bb1cced1304db7e645b94413cff626 Reviewed-on: https://gerrit.libreoffice.org/55561 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/columns.py b/sc/qa/uitest/calc_tests/columns.py index 56b2adbfb1b3..259bf09fcc00 100644 --- a/sc/qa/uitest/calc_tests/columns.py +++ b/sc/qa/uitest/calc_tests/columns.py @@ -225,4 +225,117 @@ class CalcColumns(UITestCase): self.ui_test.close_doc() +def test_tdf117522_column_width_insert_left(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-StarOffice Calc-General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General /cm +xunitlb = xDialogOpt.getChild("unitlb") +props = {"TEXT": "Centimeter"} +actionProps = mkPropertyValues(props) +xunitlb.executeAction("SELECT", actionProps) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#select C1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) +#column width +self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"1 cm"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#select D1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"})) +#column width +self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"2 cm"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#select E1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E1"})) +#column width +self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"3 cm"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#select columns C-E +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C1:E1"})) +self.xUITest.executeCommand(".uno:SelectColumn") +#Insert Columns Left +self.xUITest.executeCommand(".uno:InsertColumnsBefore") +#verify +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) +self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +self.assertEqual(get_state_as_dict(xvalue)["Text&
[Libreoffice-commits] core.git: sc/Module_sc.mk sc/qa sc/UITest_statistics.mk
sc/Module_sc.mk |1 sc/UITest_statistics.mk | 20 ++ sc/qa/uitest/statistics/sampling.py | 110 3 files changed, 131 insertions(+) New commits: commit 508175a8af0da217a4670558a2ef6b52a3f71ccb Author: Zdeněk Crhonek Date: Sat Jun 9 08:09:25 2018 +0200 uitest Calc - statistics - sampling Change-Id: I6339cab59ea26ad624237f6bd2e001ff7e01ac51 Reviewed-on: https://gerrit.libreoffice.org/55495 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index ee30a84469e5..b85622c0cdd3 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -188,6 +188,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\ UITest_calc_tests2 \ UITest_calc_tests3 \ UITest_calc_tests4 \ + UITest_statistics \ )) endif diff --git a/sc/UITest_statistics.mk b/sc/UITest_statistics.mk new file mode 100644 index ..4e668f425e94 --- /dev/null +++ b/sc/UITest_statistics.mk @@ -0,0 +1,20 @@ +# -*- 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,statistics)) + +$(eval $(call gb_UITest_add_modules,statistics,$(SRCDIR)/sc/qa/uitest,\ + statistics/ \ +)) + +$(eval $(call gb_UITest_set_defs,statistics, \ +TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/qa/uitest/statistics/sampling.py b/sc/qa/uitest/statistics/sampling.py new file mode 100644 index ..cf084b50dde4 --- /dev/null +++ b/sc/qa/uitest/statistics/sampling.py @@ -0,0 +1,110 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class sampling(UITestCase): +def test_statistic_sampling(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#fill data +enter_text_to_cell(gridwin, "A1", "11") +enter_text_to_cell(gridwin, "A2", "12") +enter_text_to_cell(gridwin, "A3", "13") +enter_text_to_cell(gridwin, "A4", "14") +enter_text_to_cell(gridwin, "A5", "15") +enter_text_to_cell(gridwin, "A6", "16") +enter_text_to_cell(gridwin, "A7", "17") +enter_text_to_cell(gridwin, "A8", "18") +enter_text_to_cell(gridwin, "A9", "19") + +enter_text_to_cell(gridwin, "B1", "21") +enter_text_to_cell(gridwin, "B2", "22") +enter_text_to_cell(gridwin, "B3", "23") +enter_text_to_cell(gridwin, "B4", "24") +enter_text_to_cell(gridwin, "B5", "25") +enter_text_to_cell(gridwin, "B6", "26") +enter_text_to_cell(gridwin, "B7", "27") +enter_text_to_cell(gridwin, "B8", "28") +enter_text_to_cell(gridwin, "B9", "29") + +enter_text_to_cell(gridwin, "C1", "31") +enter_text_to_cell(gridwin, "C2", "32") +enter_text_to_cell(gridwin, "C3", "33") +enter_text_to_cell(gridwin, "C4", "34") +enter_text_to_cell(gridwin, "C5", "35") +enter_text_to_cell(gridwin, "C6", "36") +enter_text_to_cell(gridwin, "C7", "37") +enter_text_to_cell(gridwin, "C8", "38") +enter_text_to_cell(gridwin, "C9", "39") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C9"})) + self
[Libreoffice-commits] core.git: sc/inc
sc/inc/strings.hrc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 081d7b92ce503fa77043332728d056af7ead1604 Author: Zdeněk Crhonek Date: Thu Jun 7 12:25:28 2018 +0200 delete space in string in Calc-Statistics-Descriptive Statistics Change-Id: Ib3a40744a08befc09c6ae37a75ab38a4c7f2334d Reviewed-on: https://gerrit.libreoffice.org/55494 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index ad3a8fa583dd..470f06161690 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -252,7 +252,7 @@ #define STRID_CALC_MAX NC_("STRID_CALC_MAX", "Maximum") #define STRID_CALC_SUM NC_("STRID_CALC_SUM", "Sum") #define STRID_CALC_COUNTNC_("STRID_CALC_COUNT", "Count") -#define STRID_CALC_FIRST_QUARTILE NC_("STRID_CALC_FIRST_QUARTILE", "First Quartile ") +#define STRID_CALC_FIRST_QUARTILE NC_("STRID_CALC_FIRST_QUARTILE", "First Quartile") #define STRID_CALC_THIRD_QUARTILE NC_("STRID_CALC_THIRD_QUARTILE", "Third Quartile") /* RandomNumberGeneratorDialog */ #define STR_UNDO_DISTRIBUTION_TEMPLATE NC_("STR_UNDO_DISTRIBUTION_TEMPLATE", "Random ($(DISTRIBUTION))") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf77509.xls |binary sc/qa/uitest/calc_tests3/tdf77509.py | 65 ++ 2 files changed, 65 insertions(+) New commits: commit 288878045e54651ffe96e5faa879ab3bbabf9510 Author: Zdeněk Crhonek Date: Mon Jun 4 19:50:42 2018 +0200 uitest for bug tdf#77509 Change-Id: Ide912b1c3323520a0d83a5e505fba1ff87fa694a Reviewed-on: https://gerrit.libreoffice.org/55291 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/tdf77509.xls b/sc/qa/uitest/calc_tests/data/tdf77509.xls new file mode 100644 index ..d8d690c8be6d Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf77509.xls differ diff --git a/sc/qa/uitest/calc_tests3/tdf77509.py b/sc/qa/uitest/calc_tests3/tdf77509.py new file mode 100644 index ..216a6f763aed --- /dev/null +++ b/sc/qa/uitest/calc_tests3/tdf77509.py @@ -0,0 +1,65 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#consolidatedialog.ui +class tdf77509(UITestCase): +def test_tdf77509_consolidate(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf77509.xls")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#1. Open attachment: Consolidate-test.xls +#2. Select any empty cell, eg. cell D1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"})) +#3. Tab: Data > Consolidate + self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") +xDialog = self.xUITest.getTopFocusWindow() +xfunc = xDialog.getChild("func") +xeddataarea = xDialog.getChild("eddataarea") +xadd = xDialog.getChild("add") +xbyrow = xDialog.getChild("byrow") +xbycol = xDialog.getChild("bycol") +xeddestarea = xDialog.getChild("eddestarea") + +props = {"TEXT": "Sum"} +actionProps = mkPropertyValues(props) +xfunc.executeAction("SELECT", actionProps) +#4. Source data ranges: $Sheet1.$A$1:$B$7 +#5. Click 'Add' so that ranges appear in "Consolidation ranges" +xeddataarea.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$B$7"})) +xadd.executeAction("CLICK", tuple()) +#6. Click 'Options' > check 'Row labels' > click OK +xbyrow.executeAction("CLICK", tuple()) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#verify +self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "A 1") +self.assertEqual(get_cell_by_position(document, 0, 3, 1).getString(), "AB 1") +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getString(), "AB 12") +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getString(), "AB 123") +self.assertEqual(get_cell_by_position(document, 0, 3, 4).getString(), "ABC 1") + +self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 1) +self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 2) +self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 2) +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 1) +self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 1) +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests2/consolidate.py | 41 1 file changed, 41 insertions(+) New commits: commit ea8efce49dc2b45be014b0709e913c322358deb5 Author: Zdeněk Crhonek Date: Sun Jun 3 23:07:08 2018 +0200 uitest / Calc consolidate;one more test Change-Id: I6b04b943bb5a62e35a7dd0dc8749652312488435 Reviewed-on: https://gerrit.libreoffice.org/55253 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py index e0bfc83fa312..4d47d03be898 100644 --- a/sc/qa/uitest/calc_tests2/consolidate.py +++ b/sc/qa/uitest/calc_tests2/consolidate.py @@ -76,6 +76,47 @@ class consolidate(UITestCase): self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 312) self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 315) self.assertEqual(get_cell_by_position(document, 0, 4, 5).getValue(), 318) +#verify dialog + self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") +xDialog = self.xUITest.getTopFocusWindow() +xfunc = xDialog.getChild("func") +xlbdataarea = xDialog.getChild("lbdataarea") +xdelete = xDialog.getChild("delete") +xbyrow = xDialog.getChild("byrow") +xbycol = xDialog.getChild("bycol") +xeddestarea = xDialog.getChild("eddestarea") +xconsareas = xDialog.getChild("consareas") +self.assertEqual(get_state_as_dict(xfunc)["SelectEntryText"], "Sum") +self.assertEqual(get_state_as_dict(xconsareas)["EntryCount"], "3") +self.assertEqual(get_state_as_dict(xeddestarea)["Text"], "$Total.$A$2") +self.assertEqual(get_state_as_dict(xbyrow)["Selected"], "true") +self.assertEqual(get_state_as_dict(xbycol)["Selected"], "true") +#delete first range +select_pos(xconsareas, "0") +xdelete.executeAction("CLICK", tuple()) +self.assertEqual(get_state_as_dict(xconsareas)["EntryCount"], "2") +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 200) +self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 202) +self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 204) +self.assertEqual(get_cell_by_position(document, 0, 1, 5).getValue(), 206) + +self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 202) +self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 204) +self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 206) +self.assertEqual(get_cell_by_position(document, 0, 2, 5).getValue(), 208) + +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 204) +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 206) +self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 208) +self.assertEqual(get_cell_by_position(document, 0, 3, 5).getValue(), 210) + +self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 206) +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 208) +self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 210) +self.assertEqual(get_cell_by_position(document, 0, 4, 5).getValue(), 212) self.ui_test.close_doc() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/consolidate.ods |binary sc/qa/uitest/calc_tests2/consolidate.py | 82 +++ 2 files changed, 82 insertions(+) New commits: commit 795945860f8ba9cbceb3b9b3b3d535076564c490 Author: Zdeněk Crhonek Date: Sat Jun 2 20:37:50 2018 +0200 uitest - Calc consolidate Change-Id: I2d38570f6dbd6046dacbbc9aa1eb9dac657c4f1c Reviewed-on: https://gerrit.libreoffice.org/55213 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/data/consolidate.ods b/sc/qa/uitest/calc_tests/data/consolidate.ods new file mode 100644 index ..8e17d7478f0f Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/consolidate.ods differ diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py new file mode 100644 index ..e0bfc83fa312 --- /dev/null +++ b/sc/qa/uitest/calc_tests2/consolidate.py @@ -0,0 +1,82 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +#consolidatedialog.ui +class consolidate(UITestCase): +def test_consolidate(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("consolidate.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + + self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") +xDialog = self.xUITest.getTopFocusWindow() +xfunc = xDialog.getChild("func") +xlbdataarea = xDialog.getChild("lbdataarea") +xadd = xDialog.getChild("add") +xbyrow = xDialog.getChild("byrow") +xbycol = xDialog.getChild("bycol") +xeddestarea = xDialog.getChild("eddestarea") + +props = {"TEXT": "Sum"} +actionProps = mkPropertyValues(props) +xfunc.executeAction("SELECT", actionProps) + +propsA = {"TEXT": "range1"} +actionPropsA = mkPropertyValues(propsA) +xlbdataarea.executeAction("SELECT", actionPropsA) +xadd.executeAction("CLICK", tuple()) +propsB = {"TEXT": "range2"} +actionPropsB = mkPropertyValues(propsB) +xlbdataarea.executeAction("SELECT", actionPropsB) +xadd.executeAction("CLICK", tuple()) +propsC = {"TEXT": "range3"} +actionPropsC = mkPropertyValues(propsC) +xlbdataarea.executeAction("SELECT", actionPropsC) +xadd.executeAction("CLICK", tuple()) +xbyrow.executeAction("CLICK", tuple()) +xbycol.executeAction("CLICK", tuple()) +xeddestarea.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xeddestarea.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xeddestarea.executeAction("TYPE", mkPropertyValues({"TEXT":"$Total.$A$2"})) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#verify +self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 300) +self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 303) +self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 306) +self.assertEqual(get_cell_by_position(document, 0, 1, 5).getValue(), 309) + +self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 303) +self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 306) +self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 309) +self.assertEqual(get_cell_by_position(document, 0, 2, 5).getValue(), 312) + +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 306) +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 309) +self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 312) +self.assertEqual(get_cell_by_posi
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf104117.py | 54 sc/qa/uitest/calc_tests/tdf80693.py | 58 +++ 2 files changed, 112 insertions(+) New commits: commit f5af8615e40bca1a747695c8ca28675c4ab0d384 Author: Zdeněk Crhonek Date: Tue May 29 16:03:22 2018 +0200 uitest for bug tdf#104117 and tdf#80693 Change-Id: I29bdf088c83ce69152d5c3edee2c855bfece4585 Reviewed-on: https://gerrit.libreoffice.org/55019 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/tdf104117.py b/sc/qa/uitest/calc_tests/tdf104117.py new file mode 100644 index ..84ab28580461 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf104117.py @@ -0,0 +1,54 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +#Bug 104117 - Crash in Calc when selecting "Uniform Integer" with an max value "100" in "Random Number Generator +class tdf104117(UITestCase): +def test_tdf104117(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog") +xDialog = self.xUITest.getTopFocusWindow() +xcellrangeedit = xDialog.getChild("cell-range-edit") +xdistributioncombo = xDialog.getChild("distribution-combo") +xparameter1spin = xDialog.getChild("parameter1-spin") +xparameter2spin = xDialog.getChild("parameter2-spin") +xenableseedcheck = xDialog.getChild("enable-seed-check") +xseedspin = xDialog.getChild("seed-spin") +xenableroundingcheck = xDialog.getChild("enable-rounding-check") +xdecimalplacesspin = xDialog.getChild("decimal-places-spin") + +xcellrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$A$2"})) +props = {"TEXT": "Uniform Integer"} +actionProps = mkPropertyValues(props) +xdistributioncombo.executeAction("SELECT", actionProps) +xparameter2spin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xparameter2spin.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xparameter2spin.executeAction("TYPE", mkPropertyValues({"TEXT":"10"})) + +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Verify +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 0).getString() ), True) +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 1).getString() ), True) +#undo +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 0).getString() ), False) +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 1).getString() ), False) +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file diff --git a/sc/qa/uitest/calc_tests/tdf80693.py b/sc/qa/uitest/calc_tests/tdf80693.py new file mode 100644 index ..f416fce81514 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf80693.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 uitest.uihelper.common import get_state_as_dict +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from li
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/fillRandomNumber.py | 58 1 file changed, 58 insertions(+) New commits: commit ee3a23978da998b4d5ebac89c422cd78f7b31c3a Author: Zdeněk Crhonek Date: Mon May 28 14:53:19 2018 +0200 uitest Calc Fill random number Change-Id: I6922a537f06c7cced0f8b5390c8261c57d07b29b Reviewed-on: https://gerrit.libreoffice.org/54928 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek diff --git a/sc/qa/uitest/calc_tests/fillRandomNumber.py b/sc/qa/uitest/calc_tests/fillRandomNumber.py new file mode 100644 index ..a2c55fb353d5 --- /dev/null +++ b/sc/qa/uitest/calc_tests/fillRandomNumber.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 uitest.uihelper.common import get_state_as_dict +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +#randomnumbergenerator.ui +class fillRandomNumber(UITestCase): +def test_fill_random_number(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog") +xDialog = self.xUITest.getTopFocusWindow() +xcellrangeedit = xDialog.getChild("cell-range-edit") +xdistributioncombo = xDialog.getChild("distribution-combo") +xparameter1spin = xDialog.getChild("parameter1-spin") +xparameter2spin = xDialog.getChild("parameter2-spin") +xenableseedcheck = xDialog.getChild("enable-seed-check") +xseedspin = xDialog.getChild("seed-spin") +xenableroundingcheck = xDialog.getChild("enable-rounding-check") +xdecimalplacesspin = xDialog.getChild("decimal-places-spin") + +xcellrangeedit.executeAction("TYPE", mkPropertyValues({"TEXT":"$Sheet1.$A$1:$A$2"})) +props = {"TEXT": "Uniform Integer"} +actionProps = mkPropertyValues(props) +xdistributioncombo.executeAction("SELECT", actionProps) + +xparameter1spin.executeAction("UP", tuple()) +xparameter2spin.executeAction("UP", tuple()) +xenableseedcheck.executeAction("CLICK", tuple()) +xseedspin.executeAction("UP", tuple()) +xenableroundingcheck.executeAction("CLICK", tuple()) +xdecimalplacesspin.executeAction("UP", tuple()) + +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Verify +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 0).getString() ), True) +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 1).getString() ), True) +#undo +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 0).getString() ), False) +self.assertEqual(bool(get_cell_by_position(document, 0, 0, 1).getString() ), False) +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf54018.ods |binary sc/qa/uitest/calc_tests/tdf54018.py | 55 ++ 2 files changed, 55 insertions(+) New commits: commit 91cd384e8fb77db88bf75a9fc3b3213724cfc36d Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Fri May 25 19:15:13 2018 +0200 uitest for bug tdf#54018 Change-Id: I4a5356e275f1132898aec758a79f3a38c71d35ea Reviewed-on: https://gerrit.libreoffice.org/54820 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf54018.ods b/sc/qa/uitest/calc_tests/data/tdf54018.ods new file mode 100644 index ..dab482fb4f9e Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf54018.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf54018.py b/sc/qa/uitest/calc_tests/tdf54018.py new file mode 100644 index ..2802ba4cfa8f --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf54018.py @@ -0,0 +1,55 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +# import org.libreoffice.unotest +# import pathlib +from uitest.path import get_srcdir_url +#Bug 54018 - EDITING: CRASH sorting cells range with Comments +def get_url_for_data_file(file_name): +#return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name + +class tdf54018(UITestCase): +def test_td54018_sort_with_comments(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf54018.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#click top left columns / rows heading field to select all cells +self.xUITest.executeCommand(".uno:SelectAll") +#Menu 'Data -> Sort -> Column D -> Descending' +self.ui_test.execute_dialog_through_command(".uno:DataSort") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "0") +xSortKey1 = xDialog.getChild("sortlb") +xdown = xDialog.getChild("down") +props = {"TEXT": "Column B"} +actionProps = mkPropertyValues(props) +xSortKey1.executeAction("SELECT", actionProps) +xdown.executeAction("CLICK", tuple()) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Bug: When progress bar reaches 40% LibO Stops responding +#Verify +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "7") +self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "6") +self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "5") +self.assertEqual(get_cell_by_position(document, 0, 1, 3).getString(), "4") +self.assertEqual(get_cell_by_position(document, 0, 1, 4).getString(), "3") +self.assertEqual(get_cell_by_position(document, 0, 1, 5).getString(), "2") +self.assertEqual(get_cell_by_position(document, 0, 1, 6).getString(), "1") + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf89958.ods |binary sc/qa/uitest/calc_tests/tdf89958.py | 71 ++ 2 files changed, 71 insertions(+) New commits: commit 3a45af979605e2a1103304b0b52d328d39851fba Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Mon May 21 16:08:27 2018 +0200 uitest for bug tdf89958 Change-Id: I174c4c641d992e78056003fc8f4b9a24ea1c1b93 Reviewed-on: https://gerrit.libreoffice.org/54639 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf89958.ods b/sc/qa/uitest/calc_tests/data/tdf89958.ods new file mode 100644 index ..5a48917db0b7 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf89958.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf89958.py b/sc/qa/uitest/calc_tests/tdf89958.py new file mode 100644 index ..d08148fbd647 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf89958.py @@ -0,0 +1,71 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +#Bug 89958 - Data->Filter->Standard Filter, condition "does not end with" does filter too much +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class tdf89958(UITestCase): +def test_td89958_standard_filter(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf89958.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#select A1-> Column .uno:SelectColumn +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:SelectColumn") + +#Menu: Data->Filter->Standard Filter ... +#Field Name "Column A", Condition "Does not end with", Value: "CTORS" + self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") +xDialog = self.xUITest.getTopFocusWindow() +xfield1 = xDialog.getChild("field1") +xval1 = xDialog.getChild("val1") +xcond1 = xDialog.getChild("cond1") + +props = {"TEXT": "Column A"} +actionProps = mkPropertyValues(props) +xfield1.executeAction("SELECT", actionProps) +props2 = {"TEXT": "Does not end with"} +actionProps2 = mkPropertyValues(props2) +xcond1.executeAction("SELECT", actionProps2) +xval1.executeAction("TYPE", mkPropertyValues({"TEXT":"CTORS"})) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +#Expected behaviours: A2 is not filtered as it does not end with "CTORS". +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +gridWinState = get_state_as_dict(gridwin) +self.assertEqual(gridWinState["CurrentRow"], "1") +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +gridWinState = get_state_as_dict(gridwin) +self.assertEqual(gridWinState["CurrentRow"], "3") +##reopen filter and verify - doesn't works +#gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) +#gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) +# self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") +#xDialog = self.xUITest.getTopFocusWindow() +#xfield1 = xDialog.getChild("field1") +#xval1 = xDialog.getChild("val1") +#xcond1 = xDialog.getChild("cond1") +#self.assertEqual(get_state_as_dict(xfield1)["SelectEntryText"], "Column A") +#self.assertEqual(get_state_as_dict(xval1)["Text"], "CTORS") +#self.assertEqual(get_state_as_dict(xcond1)["SelectEntryText"], "Does not end with") +#xCancelBtn = xDialog.getChild("cancel") +#self.ui_test.close_dialog_through_button(xCancelBtn) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/standardFilter.ods |binary sc/qa/uitest/calc_tests/standardFilter.py | 745 2 files changed, 745 insertions(+) New commits: commit 9913458256effd34ab24fca166c37c0184a91f14 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Mon May 21 15:20:38 2018 +0200 uitest - Calc standard filter Change-Id: I578e0fa94326677ce277cd24e043c699d152a5dd Reviewed-on: https://gerrit.libreoffice.org/54636 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/standardFilter.ods b/sc/qa/uitest/calc_tests/data/standardFilter.ods new file mode 100644 index ..eee728b46e13 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/standardFilter.ods differ diff --git a/sc/qa/uitest/calc_tests/standardFilter.py b/sc/qa/uitest/calc_tests/standardFilter.py new file mode 100644 index ..8342b544eb8c --- /dev/null +++ b/sc/qa/uitest/calc_tests/standardFilter.py @@ -0,0 +1,745 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +# import org.libreoffice.unotest +# import pathlib +from uitest.path import get_srcdir_url +#Bug 113979 - Paste unformated text does not ignore empty cells +def get_url_for_data_file(file_name): +#return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() +return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name + +class standardFilter(UITestCase): +def test_standard_filter(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("standardFilter.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) + + self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") +xDialog = self.xUITest.getTopFocusWindow() +xfield1 = xDialog.getChild("field1") +xval1 = xDialog.getChild("val1") +xconnect2 = xDialog.getChild("connect2") +xfield2 = xDialog.getChild("field2") +xval2 = xDialog.getChild("val2") + +props = {"TEXT": "a"} +actionProps = mkPropertyValues(props) +xfield1.executeAction("SELECT", actionProps) +xval1.executeAction("TYPE", mkPropertyValues({"TEXT":"1"})) +propsA = {"TEXT": "OR"} +actionPropsA = mkPropertyValues(propsA) +xconnect2.executeAction("SELECT", actionPropsA) +props2 = {"TEXT": "b"} +actionProps2 = mkPropertyValues(props2) +xfield2.executeAction("SELECT", actionProps2) +xval2.executeAction("TYPE", mkPropertyValues({"TEXT":"3"})) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#3x down - should be on row 9 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +gridWinState = get_state_as_dict(gridwin) +self.assertEqual(gridWinState["CurrentRow"], "8") +#reopen filter and verify +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) +gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"})) + self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") +xDialog = self.xUITest.getTopFocusWindow() +xfield1 = xDialog.getChild("field1") +xval1 = xDialog.getChild("val1") +xconnect2 = xDialog.getChild("co
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/sheetRename.py | 111 + 1 file changed, 111 insertions(+) New commits: commit 923cf26dd0653c5ec1c32b7fec6952b9305e355c Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Wed May 16 19:12:57 2018 +0200 uitest - Calc sheet rename Change-Id: If7ea2fd921c2e673f76ecb79188dc5dcb4cba442 Reviewed-on: https://gerrit.libreoffice.org/54447 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/sheetRename.py b/sc/qa/uitest/calc_tests/sheetRename.py new file mode 100644 index ..b5382a28bc77 --- /dev/null +++ b/sc/qa/uitest/calc_tests/sheetRename.py @@ -0,0 +1,111 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class sheetRename(UITestCase): +def test_sheet_rename(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +self.ui_test.execute_dialog_through_command(".uno:RenameTable") +xDialog = self.xUITest.getTopFocusWindow() +xname_entry = xDialog.getChild("name_entry") +xname_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"NewName"})) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#Verify +self.ui_test.execute_dialog_through_command(".uno:RenameTable") +xDialog = self.xUITest.getTopFocusWindow() +xname_entry = xDialog.getChild("name_entry") +self.assertEqual(get_state_as_dict(xname_entry)["Text"], "NewName") +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +self.ui_test.close_doc() + +def test_sheet_rename_invalid_sheet_name(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +self.ui_test.execute_dialog_through_command(".uno:RenameTable") +xDialog = self.xUITest.getTopFocusWindow() +xname_entry = xDialog.getChild("name_entry") +nameVal = get_state_as_dict(xname_entry)["Text"] +xname_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"NewName**"})) +xOKBtn = xDialog.getChild("ok") +def handle_warn_dlg(dialog): +#show warning +xok = dialog.getChild("ok") +self.ui_test.close_dialog_through_button(xok) + +self.ui_test.execute_blocking_action(xOKBtn.executeAction, args=('CLICK', ()), +dialog_handler=handle_warn_dlg) +xCancelBtn = xDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(xCancelBtn) + +#Verify +self.ui_test.execute_dialog_through_command(".uno:RenameTable") +xDialog = self.xUITest.getTopFocusWindow() +xname_entry = xDialog.getChild("name_entry") +self.assertEqual(get_state_as_dict(xname_entry)["Text"], nameVal) +xOKBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +self.ui_test.close_doc() + +#def test_tdf81431_rename_sheet_clipboard_content_wiped_out(self): +#calc_doc = self.ui_test.create_doc_in_start_center("calc") +#xCalcDoc = self.xUITest.getTopFocusWindow() +#gridwin = xCalcDoc.getChild("grid_window") +#document = self.ui_test.get_component() +##enter text and copy text to clipboard +#enter_text_to_cell(gridwin, "A1", "String") +#gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#self.xUITest.executeCommand(".uno:Copy") +##rename sheet +#self.ui_test.execute_
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/formatCells.py | 420 + 1 file changed, 420 insertions(+) New commits: commit e6c99316fbe7ed48c6011acb109348192900ca64 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Tue May 15 17:02:38 2018 +0200 uitest Calc - format Cells Change-Id: I2a2f0515d872e1affd7c1c27eb901ea2a183114b Reviewed-on: https://gerrit.libreoffice.org/54387 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/formatCells.py b/sc/qa/uitest/calc_tests/formatCells.py new file mode 100644 index ..ea5e9eecd90b --- /dev/null +++ b/sc/qa/uitest/calc_tests/formatCells.py @@ -0,0 +1,420 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class formatCell(UITestCase): +def test_format_cell_numbers_tab(self): +#numberingformatpage.ui +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#select cell A1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#format - cell +self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "0") #tab Numbers +xliststore1 = xDialog.getChild("categorylb") #1st list / Category +xliststore2 = xDialog.getChild("formatlb") #2nd list / Format +xdecimalsed = xDialog.getChild("decimalsed") +xleadzerosed = xDialog.getChild("leadzerosed") +xnegnumred = xDialog.getChild("negnumred") +xthousands = xDialog.getChild("thousands") +xlanguagelb = xDialog.getChild("languagelb") +xformatted = xDialog.getChild("formatted") +#language +props3 = {"TEXT": "English (USA)"} +actionProps3 = mkPropertyValues(props3) +xlanguagelb.executeAction("SELECT", actionProps3) +#set Number +props = {"TEXT": "Number"} +actionProps = mkPropertyValues(props) +xliststore1.executeAction("SELECT", actionProps) +#set Standard +props2 = {"TEXT": "Standard"} +actionProps2 = mkPropertyValues(props2) +xliststore2.executeAction("SELECT", actionProps2) +#other properties +xdecimalsed.executeAction("UP", tuple()) +xleadzerosed.executeAction("UP", tuple()) +xnegnumred.executeAction("CLICK", tuple()) +xthousands.executeAction("CLICK", tuple()) +#format #,#00.0;[RED]-#,#00.0 +self.assertEqual(get_state_as_dict(xformatted)["Text"], "#,#00.0;[RED]-#,#00.0") +#save +xOk = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOk) +#verify +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#format - cell +self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "0") #tab Numbers +xliststore1 = xDialog.getChild("categorylb") #1st list / Category +xliststore2 = xDialog.getChild("formatlb") #2nd list / Format +xdecimalsed = xDialog.getChild("decimalsed") +xleadzerosed = xDialog.getChild("leadzerosed") +xnegnumred = xDialog.getChild("negnumred") +xthousands = xDialog.getChild("thousands") +xlanguagelb = xDialog.getChild("languagelb") +xformatted = xDialog.getChild("formatted") + +self.assertEqual(get_state_as_dict(xliststore1)["SelectEntryT
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/printRange.py | 118 ++ 1 file changed, 118 insertions(+) New commits: commit e29eacbb6a7efaf154430e41a68d986a951d7f4d Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Mon May 14 21:51:57 2018 +0200 Calc -print range + tdf#33341 Change-Id: I486dd0cffb4173530ee78d3971865df3bac2818b Reviewed-on: https://gerrit.libreoffice.org/54341 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/printRange.py b/sc/qa/uitest/calc_tests/printRange.py new file mode 100644 index ..4e99a30d29b9 --- /dev/null +++ b/sc/qa/uitest/calc_tests/printRange.py @@ -0,0 +1,118 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep + +class printRange(UITestCase): +def test_printRange(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:F20"})) +#Set print range +self.xUITest.executeCommand(".uno:DefinePrintArea") +# Print Range dialog + self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") +xDialog = self.xUITest.getTopFocusWindow() +xlbprintarea = xDialog.getChild("lbprintarea") +xedprintarea = xDialog.getChild("edprintarea") +#verify range +self.assertEqual(get_state_as_dict(xlbprintarea)["SelectEntryText"], "- selection -") +self.assertEqual(get_state_as_dict(xedprintarea)["Text"], "$A$1:$F$20") +#set Row +xedrepeatrow = xDialog.getChild("edrepeatrow") +xedrepeatrow.executeAction("TYPE", mkPropertyValues({"TEXT":"$1"})) +#set Column +xedrepeatcol = xDialog.getChild("edrepeatcol") +xedrepeatcol.executeAction("TYPE", mkPropertyValues({"TEXT":"$A"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify Print Range dialog + self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") +xDialog = self.xUITest.getTopFocusWindow() +xedprintarea = xDialog.getChild("edprintarea") +xedrepeatrow = xDialog.getChild("edrepeatrow") +xedrepeatcol = xDialog.getChild("edrepeatcol") +self.assertEqual(get_state_as_dict(xedprintarea)["Text"], "$A$1:$F$20") +self.assertEqual(get_state_as_dict(xedrepeatrow)["Text"], "$1") +self.assertEqual(get_state_as_dict(xedrepeatcol)["Text"], "$A") +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#delete print ranges +self.xUITest.executeCommand(".uno:DeletePrintArea") +#Verify Print Range dialog + self.ui_test.execute_modeless_dialog_through_command(".uno:EditPrintArea") +xDialog = self.xUITest.getTopFocusWindow() +xedprintarea = xDialog.getChild("edprintarea") +xlbprintarea = xDialog.getChild("lbprintarea") +xedrepeatrow = xDialog.getChild("edrepeatrow") +xedrepeatcol = xDialog.getChild("edrepeatcol") +self.assertEqual(get_state_as_dict(xedprintarea)["Text"], "") +self.assertEqual(get_state_as_dict(xlbprintarea)["SelectEntryText"], "- entire sheet -") +self.assertEqual(get_state_as_dict(xedrepeatrow)["Text"], "$1") +self.assertEqual(get_state_as_dict(xedrepeatcol)["Text"], "$A") +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +self.ui_test.close_doc() + +def test_tdf33341_copy_sheet_with_print_range(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.ge
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf88999.py | 53 1 file changed, 53 insertions(+) New commits: commit 4374f8b621dbefcb0a78a8005db48eb25675bf3c Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Thu May 10 17:25:33 2018 +0200 uitest for bug tdf#88999 Change-Id: I442704bb54490bdb37a5c3bf7dd0c123cfb89ee6 Reviewed-on: https://gerrit.libreoffice.org/54088 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf88999.py b/sc/qa/uitest/calc_tests/tdf88999.py new file mode 100644 index ..ddbfaa4279ee --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf88999.py @@ -0,0 +1,53 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 88999 - UI: Scientific format: unable to modify number of decimal places through Sidebar or Format > Cells + +class tdf88999(UITestCase): +def test_tdf88999_scientific_format_decimal_value(self): +#numberingformatpage.ui +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +enter_text_to_cell(gridwin, "A1", "1e-2") +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B1"})) +#select cell A1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#format - cell +self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "0") #tab Numbers +xliststore1 = xDialog.getChild("categorylb") #1st list / Category +xliststore2 = xDialog.getChild("formatlb") #2nd list / Format +xdecimalsed = xDialog.getChild("decimalsed") +xleadzerosed = xDialog.getChild("leadzerosed") +xnegnumred = xDialog.getChild("negnumred") +xthousands = xDialog.getChild("thousands") +xlanguagelb = xDialog.getChild("languagelb") +xformatted = xDialog.getChild("formatted") + +self.assertEqual(get_state_as_dict(xliststore1)["SelectEntryText"], "Scientific") +self.assertEqual(get_state_as_dict(xdecimalsed)["Text"], "2") +self.assertEqual(get_state_as_dict(xdecimalsed)["Enabled"], "true") +self.assertEqual(get_state_as_dict(xleadzerosed)["Text"], "1") +self.assertEqual(get_state_as_dict(xformatted)["Text"], "0.00E+00") +xOk = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOk) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/autofill.py | 153 ++ sc/qa/uitest/calc_tests/data/autofill.ods |binary 2 files changed, 153 insertions(+) New commits: commit 8f799c45659a2f5dd79941aa35d75486e5794eff Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Sun Apr 8 15:18:45 2018 +0200 uitest / Calc autofill Change-Id: I91f9c5eb69059eceedc190f1578c3d08a722409a Reviewed-on: https://gerrit.libreoffice.org/52595 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/autofill.py b/sc/qa/uitest/calc_tests/autofill.py new file mode 100644 index ..09b37d6a6258 --- /dev/null +++ b/sc/qa/uitest/calc_tests/autofill.py @@ -0,0 +1,153 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +import org.libreoffice.unotest +import pathlib +from libreoffice.uno.propertyvalue import mkPropertyValues +#Test for the AutoFill feature - auto-fill can't increment last octet of ip addresses + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class CalcAutofill(UITestCase): + +def test_autofill(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("autofill.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Select cell A12 and drag the fill handle in the bottom right corner of the cell down to A18 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A12:A18"})) +self.ui_test.execute_dialog_through_command(".uno:FillSeries") +xDialog = self.xUITest.getTopFocusWindow() +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#Compare with the content in the right next column +self.assertEqual(get_cell_by_position(document, 0, 0, 11).getValue(), 18.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 12).getValue(), 19.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 13).getValue(), 20.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 14).getValue(), 21.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 15).getValue(), 22.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 16).getValue(), 23.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 17).getValue(), 24.34) +#Select cell A12 and drag the fill handle in the bottom right corner of the cell up to A6 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A6:A12"})) +self.ui_test.execute_dialog_through_command(".uno:FillSeries") +xDialog = self.xUITest.getTopFocusWindow() +xup = xDialog.getChild("up") +xincrement = xDialog.getChild("increment") +xup.executeAction("CLICK", tuple()) +xincrement.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xincrement.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xincrement.executeAction("TYPE", mkPropertyValues({"TEXT":"-1"})) +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#Compare with the content in the right next column +self.assertEqual(get_cell_by_position(document, 0, 0, 5).getValue(), 12.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 6).getValue(), 13.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 14.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 8).getValue(), 15.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 9).getValue(), 16.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 10).getValue(), 17.34) +self.assertEqual(get_cell_by_position(document, 0, 0, 11).getValue(), 18.34) + +#Continue with the next cells with grey background +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "M12:M18"})) +self.ui_test.execute_dialog_through_command(".uno:FillSeries"
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/text_to_columns_comma.ods |binary sc/qa/uitest/calc_tests/data/text_to_columns_dot.ods|binary sc/qa/uitest/calc_tests/data/text_to_columns_pipe.ods |binary sc/qa/uitest/calc_tests/data/text_to_columns_pipe_space.ods |binary sc/qa/uitest/calc_tests/data/text_to_columns_semicolon.ods |binary sc/qa/uitest/calc_tests/data/text_to_columns_space.ods |binary sc/qa/uitest/calc_tests/textToColumns.py| 526 7 files changed, 526 insertions(+) New commits: commit a9ca2cf9da7892c24a2b4605fee99e0ff79d4510 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Tue Apr 17 17:16:38 2018 +0200 uitest - Calc Text to columns Change-Id: I89effeccc9615f4e34e3dc036f06a5e5437ec37b Reviewed-on: https://gerrit.libreoffice.org/53052 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/text_to_columns_comma.ods b/sc/qa/uitest/calc_tests/data/text_to_columns_comma.ods new file mode 100644 index ..3d5b7d583024 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/text_to_columns_comma.ods differ diff --git a/sc/qa/uitest/calc_tests/data/text_to_columns_dot.ods b/sc/qa/uitest/calc_tests/data/text_to_columns_dot.ods new file mode 100644 index ..29136ae453d9 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/text_to_columns_dot.ods differ diff --git a/sc/qa/uitest/calc_tests/data/text_to_columns_pipe.ods b/sc/qa/uitest/calc_tests/data/text_to_columns_pipe.ods new file mode 100644 index ..16652ceedaf5 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/text_to_columns_pipe.ods differ diff --git a/sc/qa/uitest/calc_tests/data/text_to_columns_pipe_space.ods b/sc/qa/uitest/calc_tests/data/text_to_columns_pipe_space.ods new file mode 100644 index ..0895d3497bb0 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/text_to_columns_pipe_space.ods differ diff --git a/sc/qa/uitest/calc_tests/data/text_to_columns_semicolon.ods b/sc/qa/uitest/calc_tests/data/text_to_columns_semicolon.ods new file mode 100644 index ..53eb7c6150b7 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/text_to_columns_semicolon.ods differ diff --git a/sc/qa/uitest/calc_tests/data/text_to_columns_space.ods b/sc/qa/uitest/calc_tests/data/text_to_columns_space.ods new file mode 100644 index ..4ae3f176ccf3 Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/text_to_columns_space.ods differ diff --git a/sc/qa/uitest/calc_tests/textToColumns.py b/sc/qa/uitest/calc_tests/textToColumns.py new file mode 100644 index ..6e2aad2c23fe --- /dev/null +++ b/sc/qa/uitest/calc_tests/textToColumns.py @@ -0,0 +1,526 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +#text to column testcase + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + + +class CalcTextToColumns(UITestCase): + +def test_text_to_columns_dot(self): +#_Dot_as_Separator +calc_doc = self.ui_test.load_file(get_url_for_data_file("text_to_columns_dot.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General / replwarncb +xreplwarncb = xDialogOpt.getChild("replwarncb") +print(get_state_as_dict(xreplwarncb)["Selected"]) +if (get_state_a
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/rows.py | 228 1 file changed, 228 insertions(+) New commits: commit cb749eb664d1908a1e507983989768227d4e5203 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Wed May 9 22:04:21 2018 +0200 uitest - Calc-Format-Rows + tdf#89140 Change-Id: Id2e9946b2bbf466c86aed6d37e592ccb2a4059d3 Reviewed-on: https://gerrit.libreoffice.org/54054 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/rows.py b/sc/qa/uitest/calc_tests/rows.py new file mode 100644 index ..df6eb44ddc1c --- /dev/null +++ b/sc/qa/uitest/calc_tests/rows.py @@ -0,0 +1,228 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class CalcRows(UITestCase): +def test_row_height(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-StarOffice Calc-General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General /cm +xunitlb = xDialogOpt.getChild("unitlb") +props = {"TEXT": "Centimeter"} +actionProps = mkPropertyValues(props) +xunitlb.executeAction("SELECT", actionProps) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#select A1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#row height +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xdefault = xDialog.getChild("default") +self.assertEqual(get_state_as_dict(xdefault)["Selected"], "true") #default selected +heightStrOrig = get_state_as_dict(xvalue)["Text"] +heightVal = heightStrOrig[:4] #default 0.45 cm +xvalue.executeAction("UP", tuple()) #0.50 cm +heightStr = get_state_as_dict(xvalue)["Text"] +heightValNew = heightStr[:4] +self.assertEqual(get_state_as_dict(xdefault)["Selected"], "false") #default not selected +self.assertEqual(heightValNew > heightVal, True) #new value is bigger +xdefault.executeAction("CLICK", tuple()) #click default +self.assertEqual(get_state_as_dict(xvalue)["Text"] == heightStrOrig, True) #default value set +#write your own value +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"1 cm"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#verify +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +self.ui_test.close_doc() + +def test_row_height_two_rows(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-StarOffice C
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/columns.py | 228 + 1 file changed, 228 insertions(+) New commits: commit 8a8fa23a37aa5b2d0b061ec34dd8058493e813b5 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Wed May 9 22:51:22 2018 +0200 uitest - Calc-Format-Columns Change-Id: Ie9375a9c464b658abf5a8f85ae76cc460ed4b9cf Reviewed-on: https://gerrit.libreoffice.org/54056 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/columns.py b/sc/qa/uitest/calc_tests/columns.py new file mode 100644 index ..56b2adbfb1b3 --- /dev/null +++ b/sc/qa/uitest/calc_tests/columns.py @@ -0,0 +1,228 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep + +class CalcColumns(UITestCase): +def test_column_width(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-StarOffice Calc-General +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General /cm +xunitlb = xDialogOpt.getChild("unitlb") +props = {"TEXT": "Centimeter"} +actionProps = mkPropertyValues(props) +xunitlb.executeAction("SELECT", actionProps) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#select A1 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +#column width +self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xdefault = xDialog.getChild("default") +self.assertEqual(get_state_as_dict(xdefault)["Selected"], "true") #default selected +heightStrOrig = get_state_as_dict(xvalue)["Text"] +heightVal = heightStrOrig[:4] #default 2.26 cm +xvalue.executeAction("UP", tuple()) #2.36 cm +heightStr = get_state_as_dict(xvalue)["Text"] +heightValNew = heightStr[:4] +self.assertEqual(get_state_as_dict(xdefault)["Selected"], "false") #default not selected +self.assertEqual(heightValNew > heightVal, True) #new value is bigger +xdefault.executeAction("CLICK", tuple()) #click default +self.assertEqual(get_state_as_dict(xvalue)["Text"] == heightStrOrig, True) #default value set +#write your own value +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"1 cm"})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#verify +self.ui_test.execute_dialog_through_command(".uno:ColumnWidth") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +self.assertEqual(get_state_as_dict(xvalue)["Text"], "1.00 cm") +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +self.ui_test.close_doc() + +def test_column_width_two_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_comp
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf91305.py | 140 1 file changed, 140 insertions(+) New commits: commit 1887806c401e3f2d522f500c9b83bdd452030c49 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Sun Apr 22 16:41:39 2018 +0200 uitest for bug tdf#91305 Change-Id: Icf4956214ddbad16fa39922267e3336fe621fbf6 Reviewed-on: https://gerrit.libreoffice.org/53289 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf91305.py b/sc/qa/uitest/calc_tests/tdf91305.py new file mode 100644 index ..eae7e8c4555e --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf91305.py @@ -0,0 +1,140 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 91305 - Sort button does not sort first cell if it has text format + +class tdf91305(UITestCase): + +def test_tdf91305_sort_text_cells_rows(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#In column A enter texts +enter_text_to_cell(gridwin, "A1", "cc") +enter_text_to_cell(gridwin, "A2", "ff") +enter_text_to_cell(gridwin, "A3", "aa") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A3"})) +#Press toolbarbutton for ascending sorting .uno:SortAsc +self.xUITest.executeCommand(".uno:SortAscending") +#verify +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "aa") +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "cc") +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "ff") +#Press toolbarbutton for descending sorting .uno:SortDescending +self.xUITest.executeCommand(".uno:SortDescending") +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "ff") +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "cc") +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "aa") + +def test_tdf91305_sort_text_cells_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#In column A enter texts +enter_text_to_cell(gridwin, "A1", "cc") +enter_text_to_cell(gridwin, "B1", "ff") +enter_text_to_cell(gridwin, "C1", "aa") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C1"})) +#Open sort dialog by DATA - SORT +self.ui_test.execute_dialog_through_command(".uno:DataSort") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +xleftright = xDialog.getChild("leftright") +select_pos(xTabs, "1") +xleftright.executeAction("CLICK", tuple()) +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#verify +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "aa") +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "cc") +self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "ff") +#Open sort dialog by DATA - SORT +self.ui_test.execute_dialog_through_command(".uno:DataSort") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +xleftright = xDialog.getChild("leftright") +xdown = xDialog.getChild("down") +select_pos(xTabs, "1") +xleftright.e
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf117367.py | 55 +++ 1 file changed, 55 insertions(+) New commits: commit 1bb5187a3b83bd0f1005d3f17b81c0f5bfd781d3 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Mon May 7 21:26:12 2018 +0200 uitest for bug tdf#117367 Change-Id: I9d272d7a1a55e470d18cc1765d792bec2ffdc3cd Reviewed-on: https://gerrit.libreoffice.org/53944 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf117367.py b/sc/qa/uitest/calc_tests/tdf117367.py new file mode 100644 index ..36f3e25802d6 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf117367.py @@ -0,0 +1,55 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep +#Bug 117367 - FORMATTING Merge cells dialog radio buttons cannot be unselected + +class tdf117367(UITestCase): +def test_tdf117367_merge_cells_radio_buttons(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +enter_text_to_cell(gridwin, "A1", "AAA") +enter_text_to_cell(gridwin, "A2", "BBB") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B4"})) + +#Right-click - Merge cells /Select all three options +self.ui_test.execute_dialog_through_command(".uno:MergeCells") +xDialog = self.xUITest.getTopFocusWindow() +xmoveCellsRadio = xDialog.getChild("move-cells-radio") +xemptyCellsRadio = xDialog.getChild("empty-cells-radio") +xkeepContentRadio = xDialog.getChild("keep-content-radio") +xmoveCellsRadio.executeAction("CLICK", tuple()) +xmoveCellsRadio.executeAction("CLICK", tuple()) +#Issue: I think these should be exclusive, not possible to select more than one. It is also impossible to uncheck any of the buttons. +self.assertEqual(get_state_as_dict(xmoveCellsRadio)["Checked"], "true") +self.assertEqual(get_state_as_dict(xemptyCellsRadio)["Checked"], "false") +self.assertEqual(get_state_as_dict(xkeepContentRadio)["Checked"], "false") + +xemptyCellsRadio.executeAction("CLICK", tuple()) +self.assertEqual(get_state_as_dict(xmoveCellsRadio)["Checked"], "false") +self.assertEqual(get_state_as_dict(xemptyCellsRadio)["Checked"], "true") +self.assertEqual(get_state_as_dict(xkeepContentRadio)["Checked"], "false") + +xkeepContentRadio.executeAction("CLICK", tuple()) +self.assertEqual(get_state_as_dict(xmoveCellsRadio)["Checked"], "false") +self.assertEqual(get_state_as_dict(xemptyCellsRadio)["Checked"], "false") +self.assertEqual(get_state_as_dict(xkeepContentRadio)["Checked"], "true") + +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +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: sc/qa
sc/qa/uitest/calc_tests/data/tdf63805.ods |binary sc/qa/uitest/calc_tests/tdf63805.py | 67 ++ 2 files changed, 67 insertions(+) New commits: commit c242335331b7095b17db43a78b91904b507a0a7f Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Thu Apr 12 16:53:04 2018 +0200 uitest for bug tdf#63805 Change-Id: Iab12166181b085e8b0ed84869b2b6857f55683ee Reviewed-on: https://gerrit.libreoffice.org/52783 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf63805.ods b/sc/qa/uitest/calc_tests/data/tdf63805.ods new file mode 100644 index ..fd2affb4e1cc Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf63805.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf63805.py b/sc/qa/uitest/calc_tests/tdf63805.py new file mode 100644 index ..bdc7f8775542 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf63805.py @@ -0,0 +1,67 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +#Bug 63805 - EDITING: 'Autofill - Date - Months' wrong if day of month exceeds max. days of month + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class tdf63805(UITestCase): + +def test_tdf63805_autofill_Date_Months(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf63805.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#1 - A1: 2012-10-31 +enter_text_to_cell(gridwin, "A1", "2012-10-31") +#2 - Select A1:A20 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A20"})) +#3 - Edit -> fill -> Series -> Down - Date-Month-Increment=1 +self.ui_test.execute_dialog_through_command(".uno:FillSeries") +xDialog = self.xUITest.getTopFocusWindow() +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#5 -Expected: All Cells show last day of month / Actual: some months skipped +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 41213) +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 41243) +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 41274) +self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 41305) +self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 41333) +self.assertEqual(get_cell_by_position(document, 0, 0, 5).getValue(), 41364) +self.assertEqual(get_cell_by_position(document, 0, 0, 6).getValue(), 41394) +self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 41425) +self.assertEqual(get_cell_by_position(document, 0, 0, 8).getValue(), 41455) +self.assertEqual(get_cell_by_position(document, 0, 0, 9).getValue(), 41486) +self.assertEqual(get_cell_by_position(document, 0, 0, 10).getValue(), 41517) +self.assertEqual(get_cell_by_position(document, 0, 0, 11).getValue(), 41547) +self.assertEqual(get_cell_by_position(document, 0, 0, 12).getValue(), 41578) +self.assertEqual(get_cell_by_position(document, 0, 0, 13).getValue(), 41608) +self.assertEqual(get_cell_by_position(document, 0, 0, 14).getValue(), 41639) +self.assertEqual(get_cell_by_position(document, 0, 0, 15).getValue(), 41670) +self.assertEqual(get_cell_by_position(document, 0, 0, 16).getValue(), 41698) +self.assertEqual(get_cell_by_position(document, 0, 0, 17).getValue(), 41729) +self.assertEqual(get_cell_by_position(document, 0, 0, 18).getValue(), 41759) +self.assertEqual(get_cell_by_position(document, 0, 0, 19).getValue(), 41790) +#4 - undo. +self.xUITest.executeCommand(".uno:Undo") +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 41213) +self.assertEqual(get_cell_by_
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf69981.ods |binary sc/qa/uitest/calc_tests/tdf69981.py | 91 ++ 2 files changed, 91 insertions(+) New commits: commit 5f42c9527333034bd01d8b78fdc3c0eb9924d2cb Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Mon Apr 16 19:44:07 2018 +0200 uitest for bug tdf#69981 Change-Id: I947786692f8c40c2bc7775632763f317738bc801 Reviewed-on: https://gerrit.libreoffice.org/52999 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf69981.ods b/sc/qa/uitest/calc_tests/data/tdf69981.ods new file mode 100644 index ..4647d1a2c80d Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf69981.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf69981.py b/sc/qa/uitest/calc_tests/tdf69981.py new file mode 100644 index ..9f1953f7812c --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf69981.py @@ -0,0 +1,91 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class tdf69981(UITestCase): + +def test_tdf69981_text_to_columns(self): + +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf69981.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General / replwarncb +xreplwarncb = xDialogOpt.getChild("replwarncb") +if (get_state_as_dict(xreplwarncb)["Selected"]) == "false": +xreplwarncb.executeAction("CLICK", tuple()) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) + +#Select A2:A7 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:A7"})) +#Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xtab = xDialog.getChild("tab") +xcomma = xDialog.getChild("comma") +xtab.executeAction("CLICK", tuple()) +xcomma.executeAction("CLICK", tuple()) +#Click Ok +#overwrite warning come up +#press Ok. +xOK = xDialog.getChild("ok") +def handle_warn_dlg(dialog): +xyesBtn = dialog.getChild("yes") +self.ui_test.close_dialog_through_button(xyesBtn) + +self.ui_test.execute_blocking_action(xOK.executeAction, args=('CLICK', ()), +dialog_handler=handle_warn_dlg) +#Verify +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Original") +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "a") +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "") +self.assertEqual(get_cell_by_position(document, 0, 0, 3).getString(), "") +self.assertEqual(get_cell_by_position(document, 0, 0, 4).getString(), "a") +self.assertEqual(get_cell_by_position(document, 0, 0, 5).getString(), "a") +self.assertEqual(get_cell_by_position(document, 0, 0, 6).getString(), "a") + +self.assertEqual(get_cell_by_position(document, 0, 1, 0).get
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf82398.py | 63 1 file changed, 63 insertions(+) New commits: commit b5fe54fa3cfeaa9208b9e04e7deb7db9d43683e7 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Wed Apr 18 21:55:39 2018 +0200 uitest forbug tdf#82398 Change-Id: I103981abed68dc88bed27040abf269b2e345d30e Reviewed-on: https://gerrit.libreoffice.org/53124 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf82398.py b/sc/qa/uitest/calc_tests/tdf82398.py new file mode 100644 index ..66e8d57840ea --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf82398.py @@ -0,0 +1,63 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 82398 - EDITING: "Text to Columns" not applied to selected cells after change 'Format Cells' + +class tdf82398(UITestCase): +def test_tdf82398_text_to_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Add data +enter_text_to_cell(gridwin, "A1", "afasdfs.fdfasd.fsadf.fasd") +enter_text_to_cell(gridwin, "A2", "3242.43242.3242.2342") +enter_text_to_cell(gridwin, "A3", "fdsfa.afsdfa.adfdas.fsad") +enter_text_to_cell(gridwin, "A4", "21312...111") +#select column A1:A4 / .uno:NumberFormatDate +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"})) +self.xUITest.executeCommand(".uno:NumberFormatDate") +# Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xother = xDialog.getChild("other") +xinputother = xDialog.getChild("inputother") + +if (get_state_as_dict(xother)["Selected"]) == "false": +xother.executeAction("CLICK", tuple()) +xinputother.executeAction("TYPE", mkPropertyValues({"TEXT":"."})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "afasdfs") +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 3242) +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "fdsfa") +self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 21312) +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "fdfasd") +self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 43242) +self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "afsdfa") +self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), ) +self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "fsadf") +self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3242) +self.assertEqual(get_cell_by_position(document, 0, 2, 2).getString(), "adfdas") +self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), ) +self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "fasd") +self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 2342) +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getString(), "fsad") +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 111) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests/sort.py | 72 ++ 1 file changed, 72 insertions(+) New commits: commit 31e96ad6d9cb907f46f37f6f30b60bd07316240b Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Fri Apr 20 15:34:24 2018 +0200 uitest / Writer Tools-Sort dialog Change-Id: I310339b38d8a2833fb0e6b09b89ca04e1a6db5c0 Reviewed-on: https://gerrit.libreoffice.org/53212 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sw/qa/uitest/writer_tests/sort.py b/sw/qa/uitest/writer_tests/sort.py new file mode 100644 index ..6ae06c5ecef2 --- /dev/null +++ b/sw/qa/uitest/writer_tests/sort.py @@ -0,0 +1,72 @@ +# -*- 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, type_text +import time +from uitest.debug import sleep +#Tools -Sort dialog + tdf81292 + +class WriterSort(UITestCase): + + def test_sort(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +type_text(xWriterEdit, "a") +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) +type_text(xWriterEdit, "c") +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) +type_text(xWriterEdit, "v") + +selection = self.xUITest.executeCommand(".uno:SelectAll") #select whole text +#Tools - Sort +self.ui_test.execute_dialog_through_command(".uno:SortDialog") +xDialog = self.xUITest.getTopFocusWindow() +xDown = xDialog.getChild("down1") +xDown.executeAction("CLICK", tuple()) +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#check +self.assertEqual(document.Text.String[0:1], "v") + +self.ui_test.close_doc() + + def test_sort_numerical(self): +self.ui_test.create_doc_in_start_center("writer") +document = self.ui_test.get_component() +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") + +type_text(xWriterEdit, "1;2;3") +xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) +type_text(xWriterEdit, "2;8;3") + +selection = self.xUITest.executeCommand(".uno:SelectAll") #select whole text +#Tools - Sort +self.ui_test.execute_dialog_through_command(".uno:SortDialog") +xDialog = self.xUITest.getTopFocusWindow() +xDown = xDialog.getChild("down1") +xcolsb1 = xDialog.getChild("colsb1") +xtypelb1 = xDialog.getChild("typelb1") +xcharacter = xDialog.getChild("character") +xseparator = xDialog.getChild("separator") +xDown.executeAction("CLICK", tuple()) +props = {"TEXT": "Numerical"} +actionProps = mkPropertyValues(props) +xtypelb1.executeAction("SELECT", actionProps) +xcharacter.executeAction("CLICK", tuple()) +xseparator.executeAction("TYPE", mkPropertyValues({"TEXT":";"})) +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#check +self.assertEqual(document.Text.String[0:5], "2;8;3") + +self.ui_test.close_doc() +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf89907.py | 64 1 file changed, 64 insertions(+) New commits: commit 0a5afd0cdd2b28fbdb67ec84c9f03fd9dc50eca5 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Wed Apr 18 19:42:29 2018 +0200 uitest for bug tdf#89907 Change-Id: I011d0e1e2671f88a012ac30754bf96a5631630da Reviewed-on: https://gerrit.libreoffice.org/53122 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf89907.py b/sc/qa/uitest/calc_tests/tdf89907.py new file mode 100644 index ..13a96014572e --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf89907.py @@ -0,0 +1,64 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 89907 - Text to columns only affects first line when width is auto set + +class tdf89907(UITestCase): +def test_tdf89907_text_to_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Add data +enter_text_to_cell(gridwin, "A1", "afasdfs.fdfasd.fsadf.fasd") +enter_text_to_cell(gridwin, "A2", "3242.43242.3242.2342") +enter_text_to_cell(gridwin, "A3", "fdsfa.afsdfa.adfdas.fsad") +enter_text_to_cell(gridwin, "A4", "21312...111") +#select column A +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:SelectColumn") +#Optimal Width +self.xUITest.executeCommand(".uno:SetOptimalColumnWidthDirect") +# Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xother = xDialog.getChild("other") +xinputother = xDialog.getChild("inputother") +if (get_state_as_dict(xother)["Selected"]) == "false": +xother.executeAction("CLICK", tuple()) +xinputother.executeAction("TYPE", mkPropertyValues({"TEXT":"."})) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "afasdfs") +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 3242) +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "fdsfa") +self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 21312) +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "fdfasd") +self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 43242) +self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "afsdfa") +self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), ) +self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "fsadf") +self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3242) +self.assertEqual(get_cell_by_position(document, 0, 2, 2).getString(), "adfdas") +self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), ) +self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "fasd") +self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 2342) +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getString(), "fsad") +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 111) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf85979.ods |binary sc/qa/uitest/calc_tests/tdf85979.py | 58 ++ 2 files changed, 58 insertions(+) New commits: commit a019ee36a37f3761d5ba2e90973c6a9cbc9399c9 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Thu Apr 19 07:11:41 2018 +0200 uitest for bug tdf#85979 Change-Id: I3d5ec58532956e7aae7d33759ef9aa9753f4dd1d Reviewed-on: https://gerrit.libreoffice.org/53137 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf85979.ods b/sc/qa/uitest/calc_tests/data/tdf85979.ods new file mode 100644 index ..2b8584a20d7d Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf85979.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf85979.py b/sc/qa/uitest/calc_tests/tdf85979.py new file mode 100644 index ..359a0f35c511 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf85979.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 uitest.uihelper.common import get_state_as_dict +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +#Bug 85979 - Crash: data text to columns +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class tdf85979(UITestCase): +def test_td85979_text_to_columns(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf85979.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#(I selected C1 to C5, then Text to Columns, unselected "Tab" and selected "Space") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C1:C5"})) +# Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xspace = xDialog.getChild("space") +if (get_state_as_dict(xspace)["Selected"]) == "false": +xspace.executeAction("CLICK", tuple()) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify +self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 99) +self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 4) +self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 9) +self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 9) +self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 260) +self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 10) +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 23) +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 23) +self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 149) +self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 6) +self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 14) +self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 14) +self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 0) +self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 16) +self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 35) +self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 35) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf73006.py | 43 1 file changed, 43 insertions(+) New commits: commit 36c1fab26f767894943203a88082ed50d3fd23f5 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Fri Apr 20 06:38:43 2018 +0200 uitest for bug tdf#73006 Change-Id: I91ed6776f5f045e832ce7f913521e80c05d13375 Reviewed-on: https://gerrit.libreoffice.org/53182 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf73006.py b/sc/qa/uitest/calc_tests/tdf73006.py new file mode 100644 index ..8124bb4209d0 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf73006.py @@ -0,0 +1,43 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 73006 - EDITING: Results filled in wrong cells after Text to Columns + +class tdf73006(UITestCase): +def test_tdf73006_text_to_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Add data +enter_text_to_cell(gridwin, "A2", "A B") +#select column A +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:SelectColumn") +# Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xspace = xDialog.getChild("space") +if (get_state_as_dict(xspace)["Selected"]) == "false": +xspace.executeAction("CLICK", tuple()) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "A") +self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "B") + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/data/tdf53482.ods |binary sc/qa/uitest/calc_tests/tdf53482.py | 96 ++ 2 files changed, 96 insertions(+) New commits: commit 35f8c6822ad012a9c7f33ec2173bef4e585875cb Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Sat Apr 21 08:34:50 2018 +0200 uitest for bug tdf#53482 Change-Id: I169cce450c3ba5ab63d0e4d0b1610261254c3a7c Reviewed-on: https://gerrit.libreoffice.org/53245 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/data/tdf53482.ods b/sc/qa/uitest/calc_tests/data/tdf53482.ods new file mode 100644 index ..cfd682d6a78c Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf53482.ods differ diff --git a/sc/qa/uitest/calc_tests/tdf53482.py b/sc/qa/uitest/calc_tests/tdf53482.py new file mode 100644 index ..33ffa71d6283 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf53482.py @@ -0,0 +1,96 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +import org.libreoffice.unotest +import pathlib +#Bug 53482 - UI: Option 'Range contains column headings' ignored + +def get_url_for_data_file(file_name): +return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +class tdf53482(UITestCase): + +def test_tdf53482_Range_contains_column_headings_file(self): +calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf53482.ods")) +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#1. Highlight cells to be sorted A8:J124 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A8:J124"})) +#2. Click Data menu, Sort +self.ui_test.execute_dialog_through_command(".uno:DataSort") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "1") +#3. On Options tab, tick 'Range contains column labels' +xHeader = xDialog.getChild("header") +xHeader.executeAction("CLICK", tuple()) +if (get_state_as_dict(xHeader)["Selected"]) == "false": +xHeader.executeAction("CLICK", tuple()) +#4. On Sort Criteria tab, set appropriate criteria +select_pos(xTabs, "0") +xDown = xDialog.getChild("down") +xDown.executeAction("CLICK", tuple()) +xSortKey1 = xDialog.getChild("sortlb") +props = {"TEXT": "Occupation"} +actionProps = mkPropertyValues(props) +xSortKey1.executeAction("SELECT", actionProps) +#5. Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#6. Expected behavior: Ignore column labels when sorting +self.assertEqual(get_cell_by_position(document, 0, 6, 7).getString(), "Occupation") +self.assertEqual(get_cell_by_position(document, 0, 6, 8).getString(), "Travel Industry") +self.assertEqual(get_cell_by_position(document, 0, 6, 123).getString(), "13") + +self.ui_test.close_doc() + +def test_tdf53482_Range_contains_column_headings(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#In column A enter: Misc; s; d; f; g +enter_text_to_cell(gridwin, "A1", "Misc") +enter_text_to_cell(gridwin, "A2", "s") +enter_text_to_cell(gridwin, "A3", "d") +enter_text_to_cell(gridwin, "A4", "f") +enter_text_to_cell(gridwin, "A5", "g") +#1. Highlight cells to be sorted +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A5"})) +#2. Click Data menu, Sort +self.ui_test.execute_dialog_through_command(".uno:DataSort") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getC
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf92423.py | 75 1 file changed, 75 insertions(+) New commits: commit 30251adb962f55c6486c491691015fc07052d069 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Tue Apr 17 16:20:56 2018 +0200 uitest for bug tdf#92423 (text to columns) Change-Id: I14702eeb60289f772a0cf54e995a420de1368f4c Reviewed-on: https://gerrit.libreoffice.org/53049 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf92423.py b/sc/qa/uitest/calc_tests/tdf92423.py new file mode 100644 index ..52920ae1799a --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf92423.py @@ -0,0 +1,75 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.debug import sleep +#Bug 92423 - EDITING Text to columns... does not respect currently selected cells + +class tdf92423(UITestCase): +def test_tdf92423_text_to_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. +self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog +xDialogOpt = self.xUITest.getTopFocusWindow() + +xPages = xDialogOpt.getChild("pages") +xWriterEntry = xPages.getChild('3') # Calc +xWriterEntry.executeAction("EXPAND", tuple()) +xWriterGeneralEntry = xWriterEntry.getChild('0') +xWriterGeneralEntry.executeAction("SELECT", tuple()) #General / replwarncb +xreplwarncb = xDialogOpt.getChild("replwarncb") +if (get_state_as_dict(xreplwarncb)["Selected"]) == "false": +xreplwarncb.executeAction("CLICK", tuple()) +xOKBtn = xDialogOpt.getChild("ok") +self.ui_test.close_dialog_through_button(xOKBtn) +#enter data +enter_text_to_cell(gridwin, "A1", "1;2") +enter_text_to_cell(gridwin, "A2", "2;3") +enter_text_to_cell(gridwin, "A3", "3;4") +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A3"})) +#copy data +self.xUITest.executeCommand(".uno:Copy") +#move down +self.xUITest.executeCommand(".uno:GoDown") +self.xUITest.executeCommand(".uno:GoDown") +self.xUITest.executeCommand(".uno:GoDown") +self.xUITest.executeCommand(".uno:GoDown") +self.xUITest.executeCommand(".uno:GoDown") +self.xUITest.executeCommand(".uno:GoDown") +#paste data, should be selected +self.xUITest.executeCommand(".uno:Paste") #A7:A9 +gridWinState = get_state_as_dict(gridwin) +self.assertEqual(gridWinState["MarkedArea"], "Sheet1.A7:Sheet1.A9") +# Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xSemicolon = xDialog.getChild("semicolon") #check semicolon checkbox +if (get_state_as_dict(xSemicolon)["Selected"]) == "false": +xSemicolon.executeAction("CLICK", tuple()) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify +self.assertEqual(get_cell_by_position(document, 0, 0, 6).getValue(), 1) +self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 2) +self.assertEqual(get_cell_by_position(document, 0, 0, 8).getValue(), 3) +self.assertEqual(get_cell_by_position(document, 0, 1, 6).getValue(), 2) +self.assertEqual(get_cell_by_position(document, 0, 1, 7).getValue(), 3) +self.assertEqual(get_cell_by_position(document, 0, 1, 8).getValue(), 4) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/trackedChanges.py | 125 ++ 1 file changed, 125 insertions(+) New commits: commit 709e9bbf89bcf762dee358c77abc7bac825b60e9 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Thu Apr 12 23:24:50 2018 +0200 uitest Calc tracked changes + tdf#66263 Change-Id: I8a563a0869d7e2208b345b281f2b30d343523a95 Reviewed-on: https://gerrit.libreoffice.org/52803 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/trackedChanges.py b/sc/qa/uitest/calc_tests/trackedChanges.py new file mode 100644 index ..f846159d14c7 --- /dev/null +++ b/sc/qa/uitest/calc_tests/trackedChanges.py @@ -0,0 +1,125 @@ +# -*- 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/. +# tests for tracked changes ; tdf912270 + +from uitest.framework import UITestCase +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +import time +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.calc import enter_text_to_cell + +class CalcTrackedChanges(UITestCase): + +def test_tdf66263_Protect_Records(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +self.xUITest.executeCommand(".uno:TraceChangeMode") +#protect dialog + self.ui_test.execute_dialog_through_command(".uno:ProtectTraceChangeMode") +xDialog = self.xUITest.getTopFocusWindow() +xpass = xDialog.getChild("pass1ed") +xpass.executeAction("TYPE", mkPropertyValues({"TEXT":"a"})) +xconfirm = xDialog.getChild("confirm1ed") +xconfirm.executeAction("TYPE", mkPropertyValues({"TEXT":"a"})) +xOkBtn = xDialog.getChild("ok") +xOkBtn.executeAction("CLICK", tuple()) +#verify password + self.ui_test.execute_dialog_through_command(".uno:ProtectTraceChangeMode") +xDialog = self.xUITest.getTopFocusWindow() +xpass = xDialog.getChild("pass1ed") +xpass.executeAction("TYPE", mkPropertyValues({"TEXT":"a"})) +xOkBtn = xDialog.getChild("ok") +xOkBtn.executeAction("CLICK", tuple()) + +self.ui_test.close_doc() + +def test_tracked_changes_accept(self): + +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#track changes; enter text to cell +self.xUITest.executeCommand(".uno:TraceChangeMode") +enter_text_to_cell(gridwin, "A1", "Test LibreOffice") +#accept tracked changes + self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges") +xTrackDlg = self.xUITest.getTopFocusWindow() +xAccBtn = xTrackDlg.getChild("accept") +xAccBtn.executeAction("CLICK", tuple()) +xCancBtn = xTrackDlg.getChild("close") +xCancBtn.executeAction("CLICK", tuple()) + +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Test LibreOffice") +self.ui_test.close_doc() + +def test_tracked_changes_acceptall(self): + +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#track changes; enter text to cell +self.xUITest.executeCommand(".uno:TraceChangeMode") +enter_text_to_cell(gridwin, "A1", "Test LibreOffice") +#accept All tracked changes + self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges") +xTrackDlg = self.xUITest.getTopFocusWindow() + +xAccBtn = xTrackDlg.getChild("acceptall") +xAccBtn.executeAction("CLICK", tuple()) +xCancBtn = xTrackDlg.getChild("close") +xCancBtn.executeAction("CLICK", tuple()) + +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Test LibreOffice") +self.ui_test.close_doc() + +def test_tracked
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/sorting.py | 303 + 1 file changed, 303 insertions(+) New commits: commit e2c03006a68cdd9424449eef64fbed68af66dad9 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Fri Apr 20 15:42:04 2018 +0200 uitest / Calc sort Change-Id: I3e70dc5b783335cdf30e337200d369b35865d772 Reviewed-on: https://gerrit.libreoffice.org/53214 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/sorting.py b/sc/qa/uitest/calc_tests/sorting.py new file mode 100644 index ..4b56ceea7c5b --- /dev/null +++ b/sc/qa/uitest/calc_tests/sorting.py @@ -0,0 +1,303 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Testcases Sorting TCS_Sorting + +class CalcSorting(UITestCase): + +def test_Sortingbuttons_detect_columnheaders(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#In column A enter: Number; 3; 4; 6; 2 / In column B enter: Misc; s; d; f; g +enter_text_to_cell(gridwin, "A1", "Number") +enter_text_to_cell(gridwin, "A2", "3") +enter_text_to_cell(gridwin, "A3", "4") +enter_text_to_cell(gridwin, "A4", "6") +enter_text_to_cell(gridwin, "A5", "2") +enter_text_to_cell(gridwin, "B1", "Misc") +enter_text_to_cell(gridwin, "B2", "s") +enter_text_to_cell(gridwin, "B3", "d") +enter_text_to_cell(gridwin, "B4", "f") +enter_text_to_cell(gridwin, "B5", "g") +#Select cell A3 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) +#Press toolbarbutton for descending sorting .uno:SortDescending +self.xUITest.executeCommand(".uno:SortDescending") +#Verify that cell A1 still contains "Number" and B1 "Misc" +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Number") +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "Misc") +#UNDO +self.xUITest.executeCommand(".uno:Undo") +#Select cell B3 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B3"})) +#Press toolbar button for ascending sorting +self.xUITest.executeCommand(".uno:SortAscending") +#Verify that cell A1 still contains "Number" and B1 "Misc" +self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Number") +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "Misc") +#UNDO +self.xUITest.executeCommand(".uno:Undo") +#Select cell A3 +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A3"})) +#Open sort dialog by DATA - SORT /Switch to tabpage Options +self.ui_test.execute_dialog_through_command(".uno:DataSort") +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "1") +#Verify that option "Range contains column labels" is set +xHeader = xDialog.getChild("header") +self.assertEqual(get_state_as_dict(xHeader)["Selected"], "true") +#Cancel dialog +xCanc = xDialog.getChild("cancel") +self.ui_test.close_dialog_through_button(xCanc) +#Select Range A1:B5 +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B5"})) +#Press toolbarbutton for descending sorting +self.xUITest.executeCommand(".uno:SortDescending") +#Verify that cell A1 still contains "Numb
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf51700.py | 55 1 file changed, 55 insertions(+) New commits: commit 9b5c9865d9d193d52e7d728f15ffcb8cfc4d5e4f Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Thu Apr 19 19:55:16 2018 +0200 uitest for bug tdf#51700 Change-Id: I2868a5a2abca775b0638fca1b32855c3adebc403 Reviewed-on: https://gerrit.libreoffice.org/53173 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf51700.py b/sc/qa/uitest/calc_tests/tdf51700.py new file mode 100644 index ..ed0cb934d47d --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf51700.py @@ -0,0 +1,55 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 51700 - Text to columns puts result into first line if whole column is selected + +class tdf51700(UITestCase): +def test_tdf51700_text_to_columns(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#Add data +enter_text_to_cell(gridwin, "A2", "3242,43242,3242,2342") +enter_text_to_cell(gridwin, "A3", "fdsfa,afsdfa,adfdas,fsad") +enter_text_to_cell(gridwin, "A4", "21312,,,111") +#select column A +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) +self.xUITest.executeCommand(".uno:SelectColumn") +# Data - Text to Columns +self.ui_test.execute_dialog_through_command(".uno:TextToColumns") +xDialog = self.xUITest.getTopFocusWindow() +xcomma = xDialog.getChild("comma") +if (get_state_as_dict(xcomma)["Selected"]) == "false": +xcomma.executeAction("CLICK", tuple()) +# Click Ok +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) + +#Verify +self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 3242) +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "fdsfa") +self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 21312) +self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 43242) +self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "afsdfa") +self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), ) +self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3242) +self.assertEqual(get_cell_by_position(document, 0, 2, 2).getString(), "adfdas") +self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), ) +self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 2342) +self.assertEqual(get_cell_by_position(document, 0, 3, 2).getString(), "fsad") +self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 111) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf64001.py | 40 1 file changed, 40 insertions(+) New commits: commit 90f6876bec3989e3fc8e4f961604c8d00e735eb9 Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Sun Apr 8 15:49:29 2018 +0200 uitest for bug tdf#64001 Change-Id: I7c0c2fbbb918a7ce2269920ce3f8342bf6f32583 Reviewed-on: https://gerrit.libreoffice.org/52599 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf64001.py b/sc/qa/uitest/calc_tests/tdf64001.py new file mode 100644 index ..4c19f32c9adc --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf64001.py @@ -0,0 +1,40 @@ +# -*- 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 +from uitest.uihelper.calc import enter_text_to_cell +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues + +class tdf64001(UITestCase): + +def test_tdf64001(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() +#1) Type TRUE in cell A1 +enter_text_to_cell(gridwin, "A1", "TRUE") +#2) Autofill/drag A1 to A10, all cells show TRUE +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A10"})) +self.ui_test.execute_dialog_through_command(".uno:FillSeries") +xDialog = self.xUITest.getTopFocusWindow() +xautofill = xDialog.getChild("autofill") +xautofill.executeAction("CLICK", tuple()) +xOK = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOK) +#3) Type FALSE in A11 +enter_text_to_cell(gridwin, "A11", "FALSE") +#4) Enter in B1: =COUNTIF(A1:A11,TRUE) , hit enter +enter_text_to_cell(gridwin, "B1", "=COUNTIF(A1:A11,TRUE)") +#The formula changes to =COUNTIF(A1:A11,1) and displays result of 1 not 10. +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"})) +self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 10) +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests/tdf94208.py | 52 1 file changed, 52 insertions(+) New commits: commit 14f98f26bb8153078f0f1eb2604d53a37a219a9d Author: Zdeněk Crhonek <zcrho...@gmail.com> Date: Wed Apr 11 19:21:37 2018 +0200 uitest for bug tdf#94208 Change-Id: I964303a415c581a97ad2578c6d2b8e304aae0b6b Reviewed-on: https://gerrit.libreoffice.org/52738 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrho...@gmail.com> diff --git a/sc/qa/uitest/calc_tests/tdf94208.py b/sc/qa/uitest/calc_tests/tdf94208.py new file mode 100644 index ..28961df8f865 --- /dev/null +++ b/sc/qa/uitest/calc_tests/tdf94208.py @@ -0,0 +1,52 @@ +# -*- 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 +from uitest.uihelper.common import select_pos +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.calc.document import get_sheet_from_doc +from libreoffice.calc.conditional_format import get_conditional_format_from_sheet +from uitest.debug import sleep +from libreoffice.calc.document import get_cell_by_position +from libreoffice.uno.propertyvalue import mkPropertyValues +#Bug 94208 - Undo after Control-D Fill doesn't broadcast deleted (undo-inserted) cells for calculation + +class tdf94208(UITestCase): + +def test_tdf94208_Undo_fill_down_rows_selected(self): +calc_doc = self.ui_test.create_doc_in_start_center("calc") +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +#1 - Fill data +enter_text_to_cell(gridwin, "A3", "Range") +enter_text_to_cell(gridwin, "A4", "Range") +enter_text_to_cell(gridwin, "A5", "Range") +enter_text_to_cell(gridwin, "A6", "Range") +enter_text_to_cell(gridwin, "A7", "Range") +enter_text_to_cell(gridwin, "A8", "Range") +enter_text_to_cell(gridwin, "B6", "test") +#2 - Select rows three though eight. +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A3:A8"})) +self.xUITest.executeCommand(".uno:SelectRow") +#3 - type Control-D/Fill Dow +self.xUITest.executeCommand(".uno:FillDown") +#4 - undo. +self.xUITest.executeCommand(".uno:Undo") +#5 - Ouch! The data isn't right. +self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "Range") +self.assertEqual(get_cell_by_position(document, 0, 0, 3).getString(), "Range") +self.assertEqual(get_cell_by_position(document, 0, 0, 4).getString(), "Range") +self.assertEqual(get_cell_by_position(document, 0, 0, 5).getString(), "Range") +self.assertEqual(get_cell_by_position(document, 0, 0, 6).getString(), "Range") +self.assertEqual(get_cell_by_position(document, 0, 0, 6).getString(), "Range") +self.assertEqual(get_cell_by_position(document, 0, 1, 5).getString(), "test") + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits