[Libreoffice-commits] core.git: sc/qa

2019-03-29 Thread Zdeněk Crhonek (via logerrit)
 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/qa

2019-03-30 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-04-07 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-04-17 Thread Zdeněk Crhonek (via logerrit)
 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

2019-04-16 Thread Zdeněk Crhonek (via logerrit)
 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

2019-04-16 Thread Zdeněk Crhonek (via logerrit)
 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

2019-05-15 Thread Zdeněk Crhonek (via logerrit)
 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/qa

2019-05-15 Thread Zdeněk Crhonek (via logerrit)
 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: sc/Module_sc.mk sc/qa sc/UITest_calc_tests8.mk

2019-05-15 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-05-17 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-06-04 Thread Zdeněk Crhonek (via logerrit)
 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

2019-05-31 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-05-28 Thread Zdeněk Crhonek (via logerrit)
 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

2019-05-29 Thread Zdeněk Crhonek (via logerrit)
 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

2019-06-11 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-06-25 Thread Zdeněk Crhonek (via logerrit)
 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

2019-06-13 Thread Zdeněk Crhonek (via logerrit)
 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: sw/Module_sw.mk sw/qa sw/UITest_writer_tests6.mk

2019-05-09 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-05-23 Thread Zdeněk Crhonek (via logerrit)
 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

2019-05-16 Thread Zdeněk Crhonek (via logerrit)
 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/qa

2019-05-01 Thread Zdeněk Crhonek (via logerrit)
 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

2019-05-04 Thread Zdeněk Crhonek (via logerrit)
 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")
+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 = 

[Libreoffice-commits] core.git: sw/qa

2019-04-27 Thread Zdeněk Crhonek (via logerrit)
 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

2019-04-27 Thread Zdeněk Crhonek (via logerrit)
 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

2019-04-27 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-04-27 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-04-28 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-04-28 Thread Zdeněk Crhonek (via logerrit)
 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

2019-04-22 Thread Zdeněk Crhonek (via logerrit)
 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: sd/qa

2019-08-21 Thread Zdeněk Crhonek (via logerrit)
 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: sd/qa

2019-09-06 Thread Zdeněk Crhonek (via logerrit)
 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("customshowlist")
+self.assertEqual(get_state_as_dict(customshowlist)["Children"], "1")
+
+#delete.executeAction("CLICK",tuple())
+#self.assertEqual(get_state_as_dict(customshowlist)["Children"], "0")
+
+ok = CustomSlideShows.getChild("ok")
+self.ui_test.close_dialog_through_button(ok)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
___

[Libreoffice-commits] core.git: sw/qa

2019-07-15 Thread Zdeněk Crhonek (via logerrit)
 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: Branch 'libreoffice-6-3' - 2 commits - sw/qa sw/source

2019-07-22 Thread Zdeněk Crhonek (via logerrit)
 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 (IsDestroyFrameAnchoredAtChar(*pPos, *pStart, 
*pEnd))
+{
+return true;
+}
+}

[Libreoffice-commits] core.git: sw/qa

2019-11-11 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-11-13 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-11-14 Thread Zdeněk Crhonek (via logerrit)
 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

2019-11-18 Thread Zdeněk Crhonek (via logerrit)
 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: sw/qa

2019-11-20 Thread Zdeněk Crhonek (via logerrit)
 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

2019-11-22 Thread Zdeněk Crhonek (via logerrit)
 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

2019-11-21 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-11-23 Thread Zdeněk Crhonek (via logerrit)
 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: sc/qa

2019-11-25 Thread Zdeněk Crhonek (via logerrit)
 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