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

2020-02-11 Thread Artur Neumann (via logerrit)
 sw/qa/uitest/writer_tests7/data/tdf128739.docx |binary
 sw/qa/uitest/writer_tests7/tdf128739.py|   28 +
 2 files changed, 28 insertions(+)

New commits:
commit aa691417bc29fe866d2a05a2b5a353567baba515
Author: Artur Neumann 
AuthorDate: Fri Nov 29 16:18:09 2019 +0545
Commit: Xisco Faulí 
CommitDate: Tue Feb 11 21:01:30 2020 +0100

UI test for tdf#128739

cut, paste and undo with documents containing fieldmarks and bookmarks

Change-Id: I4ee8edf061f7cdb08ae90bee32ac07b6a0980cc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84054
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/sw/qa/uitest/writer_tests7/data/tdf128739.docx 
b/sw/qa/uitest/writer_tests7/data/tdf128739.docx
new file mode 100644
index ..cf5d00f91f28
Binary files /dev/null and b/sw/qa/uitest/writer_tests7/data/tdf128739.docx 
differ
diff --git a/sw/qa/uitest/writer_tests7/tdf128739.py 
b/sw/qa/uitest/writer_tests7/tdf128739.py
new file mode 100644
index ..64a394a07a63
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf128739.py
@@ -0,0 +1,28 @@
+# -*- 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.path import get_srcdir_url
+
+def get_url_for_data_file(file_name):
+   return get_srcdir_url() + "/sw/qa/uitest/writer_tests7/data/" + file_name
+
+class tdf128739 (UITestCase):
+
+def test_mark_cut_paste_undo_with_markers_tdf128739 (self):
+
+self.ui_test.load_file(get_url_for_data_file("tdf128739.docx"))
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterDoc.getChild("writer_edit")
+
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Cut")
+self.xUITest.executeCommand(".uno:Paste")
+self.xUITest.executeCommand(".uno:Undo")
+
+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_tests7.mk

2019-12-06 Thread Artur Neumann (via logerrit)
 sw/Module_sw.mk   |1 
 sw/UITest_writer_tests7.mk|   16 +++
 sw/qa/uitest/writer_tests7/data/tdf127652.odt |binary
 sw/qa/uitest/writer_tests7/tdf127652.py   |   56 ++
 4 files changed, 73 insertions(+)

New commits:
commit 06e45d45877349417000def82c20eaae4bfc3ee3
Author: Artur Neumann 
AuthorDate: Thu Nov 28 13:51:12 2019 +0545
Commit: Xisco Faulí 
CommitDate: Fri Dec 6 22:27:50 2019 +0100

UI test for tdf#127652

Test that the cursor is placed correctly after deleting a section
that overlaps page boundaries

Change-Id: I466770c7edadf09f11260ede236e598d3d1a875b
Reviewed-on: https://gerrit.libreoffice.org/83963
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 

diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 2dbd5f161f22..101d3b73921b 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -151,6 +151,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\
UITest_writer_tests4 \
UITest_writer_tests5 \
UITest_writer_tests6 \
+   UITest_writer_tests7 \
UITest_table \
UITest_sw_findReplace \
UITest_sw_findSimilarity \
diff --git a/sw/UITest_writer_tests7.mk b/sw/UITest_writer_tests7.mk
new file mode 100644
index ..b6de351eed13
--- /dev/null
+++ b/sw/UITest_writer_tests7.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_tests7))
+
+$(eval $(call gb_UITest_add_modules,writer_tests7,$(SRCDIR)/sw/qa/uitest,\
+   writer_tests7/ \
+))
+
+$(eval $(call gb_UITest_set_defs,writer_tests7, \
+TDOC="$(SRCDIR)/sw/qa/uitest/writer_tests7/data" \
+))
diff --git a/sw/qa/uitest/writer_tests7/data/tdf127652.odt 
b/sw/qa/uitest/writer_tests7/data/tdf127652.odt
new file mode 100644
index ..12b2b156bd23
Binary files /dev/null and b/sw/qa/uitest/writer_tests7/data/tdf127652.odt 
differ
diff --git a/sw/qa/uitest/writer_tests7/tdf127652.py 
b/sw/qa/uitest/writer_tests7/tdf127652.py
new file mode 100644
index ..b6e181c61b98
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf127652.py
@@ -0,0 +1,56 @@
+# -*- 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.path import get_srcdir_url
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+
+def get_url_for_data_file(file_name):
+   return get_srcdir_url() + "/sw/qa/uitest/writer_tests7/data/" + file_name
+
+class tdf127652 (UITestCase):
+
+def test_mark_delete_undo_delete_tdf127652 (self):
+
+self.ui_test.load_file(get_url_for_data_file("tdf127652.odt"))
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+# go to the start of page 4
+xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "4"}))
+xWriterEdit.executeAction("CLICK", tuple())
+
+# mark a section that overlaps multiple pages
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"DOWN"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"DOWN"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"SHIFT+UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"SHIFT+UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"SHIFT+UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"SHIFT+UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"SHIFT+UP"}))
+
+# delete the marked section
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"DELETE"}))
+
+# go to the start of page 4
+xWriterEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "4"}))
+xWriterEdit.executeAction("CLICK", tuple())
+
+# move up to page 3
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+
+# check that we are on the third page
+# in the bug one issue was that the cursor was places in the wrong 
place
+# moving up to the previous page would 

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

2019-07-26 Thread Artur Neumann (via logerrit)
 sc/Module_sc.mk   |1 +
 sc/UITest_calc_tests9.mk  |   20 
 sc/qa/uitest/calc_tests9/tdf121949.py |   30 ++
 3 files changed, 51 insertions(+)

New commits:
commit 36088d528a3df82b3fcdf9a8685e53ba2f1cbd16
Author: Artur Neumann 
AuthorDate: Fri Jul 26 12:59:48 2019 +0545
Commit: Zdenek Crhonek 
CommitDate: Fri Jul 26 11:24:05 2019 +0200

UI test for #tdf121949

Test if calc crashes when copying a noncoherent range to the
clipboard

Change-Id: I64d436ffb01775df9d50eb966ea2a12040482517
Reviewed-on: https://gerrit.libreoffice.org/76348
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 50fc8c3d7b8c..1b2ca6bfc399 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -254,6 +254,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\
UITest_pageFormat \
UITest_calc_tests8 \
UITest_calc_dialogs \
+   UITest_calc_tests9 \
 ))
 endif
 
diff --git a/sc/UITest_calc_tests9.mk b/sc/UITest_calc_tests9.mk
new file mode 100644
index ..9935977d66c0
--- /dev/null
+++ b/sc/UITest_calc_tests9.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_tests9))
+
+$(eval $(call gb_UITest_add_modules,calc_tests9,$(SRCDIR)/sc/qa/uitest,\
+   calc_tests9/ \
+))
+
+$(eval $(call gb_UITest_set_defs,calc_tests9, \
+TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/qa/uitest/calc_tests9/tdf121949.py 
b/sc/qa/uitest/calc_tests9/tdf121949.py
new file mode 100644
index ..92dd66866510
--- /dev/null
+++ b/sc/qa/uitest/calc_tests9/tdf121949.py
@@ -0,0 +1,30 @@
+# -*- 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
+
+class tdf121949 (UITestCase):
+
+def test_tdf121949_copy_block_with_single_cell_not_included(self):
+self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+# mark a range with a single cell left our and copy to clipboard
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A3"}))
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B1:B1", 
"EXTEND":"1"}))
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B3:B3", 
"EXTEND":"1"}))
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C1:C3", 
"EXTEND":"1"}))
+self.ui_test.execute_dialog_through_command(".uno:Copy")
+xDialog = self.xUITest.getTopFocusWindow()
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+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-07-26 Thread Artur Neumann (via logerrit)
 sw/qa/uitest/writer_tests6/tdf125104.py |   48 ++--
 1 file changed, 33 insertions(+), 15 deletions(-)

New commits:
commit df82473f320d3c703357b6ded31f519f271a9788
Author: Artur Neumann 
AuthorDate: Thu Jul 25 16:22:53 2019 +0545
Commit: Zdenek Crhonek 
CommitDate: Fri Jul 26 11:18:17 2019 +0200

improve UITest to check result in doc when changing number format

not only check in the dialog crashes writer but also check if the
changes has an effect on the page itself and if the correct format
is used
trying also two non-latin formats

Change-Id: I71fd17c8ed50fd043187e1006223ef462f2a56e9
Reviewed-on: https://gerrit.libreoffice.org/76295
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
index 4414ec1f41e8..cf38208c0fd8 100644
--- a/sw/qa/uitest/writer_tests6/tdf125104.py
+++ b/sw/qa/uitest/writer_tests6/tdf125104.py
@@ -6,39 +6,57 @@
 
 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()
-
+def open_page_style_dialog(self):
 self.ui_test.execute_dialog_through_command(".uno:PageDialog")
 xDialog = self.xUITest.getTopFocusWindow()
 tabcontrol = xDialog.getChild("tabcontrol")
 select_pos(tabcontrol, "1")
+return xDialog.getChild("comboLayoutFormat")
 
-comboLayoutFormat = xDialog.getChild("comboLayoutFormat")
-props = {"TEXT": "1st, 2nd, 3rd, ..."}
+def set_combo_layout_format(self, dialog, format):
+comboLayoutFormat = dialog.getChild("comboLayoutFormat")
+props = {"TEXT": format}
 actionProps = mkPropertyValues(props)
 comboLayoutFormat.executeAction("SELECT", actionProps)
-
-okBtn = xDialog.getChild("ok")
+okBtn = dialog.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")
+def test_tdf125104_pageFormat_numbering(self):
+self.ui_test.create_doc_in_start_center("writer")
+document = self.ui_test.get_component()
+
+# insert page numbers on multiple pages
+self.xUITest.executeCommand(".uno:InsertPageNumberField")
+self.xUITest.executeCommand(".uno:InsertPagebreak")
+self.xUITest.executeCommand(".uno:InsertPageNumberField")
+self.assertEqual(document.Text.String[0:1], "1")
+self.assertEqual(document.Text.String[2:3], "2")
+
+# Bug 125104 - Changing page numbering to "1st, 2nd, 3rd,..." causes 
crashes when trying to change Page settings later
+self.set_combo_layout_format(self.open_page_style_dialog(), "1st, 2nd, 
3rd, ...")
+self.assertEqual(document.Text.String[0:3], "1st")
+self.assertEqual(document.Text.String[4:7], "2nd")
+
+xDialog = self.open_page_style_dialog()
 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)
 
+# change to devanagari alphabet format
+self.set_combo_layout_format(self.open_page_style_dialog(), "क, ख, ग, 
...")
+self.assertEqual(document.Text.String[0:1], "क")
+self.assertEqual(document.Text.String[2:3], "ख")
+
+# change to devanagari number format
+self.set_combo_layout_format(self.open_page_style_dialog(), "१, २, ३, 
...")
+self.assertEqual(document.Text.String[0:1], "१")
+self.assertEqual(document.Text.String[2: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/Module_sc.mk sc/qa sc/UITest_calc_dialogs.mk sc/UITest_dialogs.mk sw/Module_sw.mk sw/qa sw/UITest_writer_dialogs.mk uitest/uitest uitest/writer_tests

2019-07-26 Thread Artur Neumann (via logerrit)
 sc/Module_sc.mk   |2 
 sc/UITest_calc_dialogs.mk |8 -
 sc/qa/uitest/calc_dialogs/openDialogs.py  |   26 
 sw/Module_sw.mk   |1 
 sw/UITest_writer_dialogs.mk   |   20 +++
 sw/qa/uitest/writer_dialogs/openDialogs.py|  137 ++
 sw/qa/uitest/writer_tests3/insertFootEndnote.py   |6 
 sw/qa/uitest/writer_tests3/insertSignatureLine.py |   14 ++
 sw/qa/uitest/writer_tests5/columns.py |2 
 sw/qa/uitest/writer_tests5/titlePage.py   |7 +
 uitest/uitest/uihelper/testDialog.py  |   39 ++
 uitest/writer_tests/goToPage.py   |8 +
 uitest/writer_tests/insertBreakDialog.py  |   13 ++
 uitest/writer_tests/insertTableDialog.py  |9 +
 uitest/writer_tests/pageDialog.py |   10 +
 15 files changed, 272 insertions(+), 30 deletions(-)

New commits:
commit 271dcc757d536718795f8c24a686a75424e90f23
Author: Artur Neumann 
AuthorDate: Fri Jul 5 15:36:30 2019 +0545
Commit: Zdenek Crhonek 
CommitDate: Fri Jul 26 08:18:22 2019 +0200

UI tests opening all dialogs in writer and see if it crashes

Open a dialog, close it by the given button e.g. "cancel" or "close".
If the dialog has an enabled "OK" button open the dialog again
and try to close it also using the OK button.
For every dialog a complete new document is opened to ensure 
test-separation,
otherwise one action could hamper the next action.

For dialogs that already have other tests a "cancel/close" test was added to
the previous test. As far as possible opening new documents was avoided in 
those
cases. And in some cases a simple check was added to check if the "cancel" 
button
does not change anything.

Simmilar tests for calc have been renamed and code dublication has been
removed by moving main part of the code to a helper file

Change-Id: I01f197cae8bc6fe0345661fe042b655f16229485
Reviewed-on: https://gerrit.libreoffice.org/75124
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 3b4cf0aa687f..50fc8c3d7b8c 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -253,7 +253,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\
UITest_chart \
UITest_pageFormat \
UITest_calc_tests8 \
-   UITest_dialogs \
+   UITest_calc_dialogs \
 ))
 endif
 
diff --git a/sc/UITest_dialogs.mk b/sc/UITest_calc_dialogs.mk
similarity index 68%
rename from sc/UITest_dialogs.mk
rename to sc/UITest_calc_dialogs.mk
index 9498a6cb9488..42ed785b6000 100644
--- a/sc/UITest_dialogs.mk
+++ b/sc/UITest_calc_dialogs.mk
@@ -7,13 +7,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_UITest_UITest,dialogs))
+$(eval $(call gb_UITest_UITest,calc_dialogs))
 
-$(eval $(call gb_UITest_add_modules,dialogs,$(SRCDIR)/sc/qa/uitest,\
-   dialogs/ \
+$(eval $(call gb_UITest_add_modules,calc_dialogs,$(SRCDIR)/sc/qa/uitest,\
+   calc_dialogs/ \
 ))
 
-$(eval $(call gb_UITest_set_defs,dialogs, \
+$(eval $(call gb_UITest_set_defs,calc_dialogs, \
 TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \
 ))
 
diff --git a/sc/qa/uitest/dialogs/openDialogs.py 
b/sc/qa/uitest/calc_dialogs/openDialogs.py
similarity index 90%
rename from sc/qa/uitest/dialogs/openDialogs.py
rename to sc/qa/uitest/calc_dialogs/openDialogs.py
index 341a9e1f9998..94a7ca916c14 100644
--- a/sc/qa/uitest/dialogs/openDialogs.py
+++ b/sc/qa/uitest/calc_dialogs/openDialogs.py
@@ -7,7 +7,7 @@
 
 from uitest.framework import UITestCase
 import unittest
-from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.testDialog import testDialog
 
 dialogs = [
 {"command": ".uno:OpenRemote", "closeButton": "cancel"},
@@ -165,29 +165,7 @@ def load_tests(loader, tests, pattern):
 # the test only checks if calc crashes by opening the dialog, see e.g. 
tdf#120227, tdf#125985, tdf#125982
 class openDialogs(UITestCase):
 def check(self, dialog):
-calc_doc = self.ui_test.create_doc_in_start_center("calc")
-self.ui_test.execute_dialog_through_command(dialog['command'])
-xDialog = self.xUITest.getTopFocusWindow()
-xCloseBtn = xDialog.getChild(dialog['closeButton'])
-if 'skipTestOK' in dialog and dialog['skipTestOK'] == True:
-xOKBtn = None
-else:
-try:
-xOKBtn = xDialog.getChild("ok")
-if (get_state_as_dict(xOKBtn)["Enabled"] != "true"):
-xOKBtn = None
-except:
-xOKBtn = None
-
-self.ui_test.close_dialog_through_button(xCloseBtn)
-if (xOKBtn != None):
-print("check also OK button")
-self.ui_test.execute_dialog_through_command(dialog['command'])
-xDialog = 

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

2019-07-13 Thread Artur Neumann (via logerrit)
 sw/Module_sw.mk   |1 +
 sw/UITest_writer_macro_tests.mk   |   16 
 sw/qa/uitest/macro_tests/tdf124413.py |   32 
 3 files changed, 49 insertions(+)

New commits:
commit 474fad31db327486b04b7223563633f183dc9152
Author: Artur Neumann 
AuthorDate: Fri Jul 12 15:46:09 2019 +0545
Commit: Zdenek Crhonek 
CommitDate: Sat Jul 13 22:21:53 2019 +0200

UI test for #tdf124413

Test if LibreOffice crashes when text is copied and pasted
overwriting the original content and then undoing and redoing
the change several times

Change-Id: I22d92bde02364675fbbbe8064065ae955bdcae24
Reviewed-on: https://gerrit.libreoffice.org/75485
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 644649206b1f..fd47c9831a5c 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -155,6 +155,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\
UITest_librelogo \
UITest_options \
UITest_classification \
+   UITest_writer_macro_tests \
 ))
 endif
 
diff --git a/sw/UITest_writer_macro_tests.mk b/sw/UITest_writer_macro_tests.mk
new file mode 100644
index ..3aad09e8f04f
--- /dev/null
+++ b/sw/UITest_writer_macro_tests.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,macro_tests))
+
+$(eval $(call gb_UITest_add_modules,macro_tests,$(SRCDIR)/sw/qa/uitest,\
+   macro_tests/ \
+))
+
+$(eval $(call gb_UITest_set_defs,macro_tests, \
+TDOC="$(SRCDIR)/sw/qa/uitest/macro_tests/data" \
+))
diff --git a/sw/qa/uitest/macro_tests/tdf124413.py 
b/sw/qa/uitest/macro_tests/tdf124413.py
new file mode 100644
index ..926c4a2afcd9
--- /dev/null
+++ b/sw/qa/uitest/macro_tests/tdf124413.py
@@ -0,0 +1,32 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+
+class tdf124413(UITestCase):
+
+def test_copy_paste_overwriting_undo_redo_in_macro_editor_tdf124413(self):
+
+self.ui_test.create_doc_in_start_center("writer")
+#Start LibreOffice. Go to Tools > Macros > Organize Macros > Basic
+self.ui_test.execute_dialog_through_command(".uno:MacroDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+#Open Editor
+xEditBtn = xDialog.getChild("edit")
+xEditBtn.executeAction("CLICK", tuple())
+
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Copy")
+self.xUITest.executeCommand(".uno:SelectAll")
+self.xUITest.executeCommand(".uno:Paste")
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Redo")
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Redo")
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Redo")
+# 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] dev-tools.git: uitest/mass-testing

2019-07-03 Thread Artur Neumann (via logerrit)
 uitest/mass-testing/run.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 864307a03f5b3f60362994d02de8fcc2e636c078
Author: Artur Neumann 
AuthorDate: Wed Jul 3 20:24:19 2019 +0545
Commit: Xisco Faulí 
CommitDate: Wed Jul 3 16:45:36 2019 +0200

mass-uitesting: fix typo in comment

Change-Id: I4b97b06b4c86d081e562bea70ad53972980deb12
Reviewed-on: https://gerrit.libreoffice.org/75050
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 

diff --git a/uitest/mass-testing/run.py b/uitest/mass-testing/run.py
index 0c20706..3d5bf28 100755
--- a/uitest/mass-testing/run.py
+++ b/uitest/mass-testing/run.py
@@ -125,7 +125,7 @@ def run_tests_and_get_results(liboPath, listFiles, isDebug, 
isResume):
 fcntl.fcntl(process.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
 
 # Kill the process if:
-# 1. The file can't be loaded in 'fielInterval' seconds
+# 1. The file can't be loaded in 'fileInterval' seconds
 # 2. The test can't be executed in 'testInterval' seconds
 fileInterval = 10
 testIternval = 20
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - include/connectivity sc/Module_sc.mk sc/qa sc/UITest_dialogs.mk

2019-07-02 Thread Artur Neumann (via logerrit)
 include/connectivity/sqlparse.hxx |4 
 sc/Module_sc.mk   |1 
 sc/UITest_dialogs.mk  |   20 ++
 sc/qa/uitest/calc_tests/columns.py|6 
 sc/qa/uitest/calc_tests/fillRandomNumber.py   |9 
 sc/qa/uitest/calc_tests/printRange.py |6 
 sc/qa/uitest/calc_tests/sheetRename.py|6 
 sc/qa/uitest/calc_tests2/consolidate.py   |6 
 sc/qa/uitest/calc_tests2/subtotals.py |7 
 sc/qa/uitest/calc_tests3/clearCells.py|   24 ++
 sc/qa/uitest/calc_tests6/moveCopySheet.py |   10 +
 sc/qa/uitest/dialogs/openDialogs.py   |  202 ++
 sc/qa/uitest/pageFormat/tdf123508.py  |4 
 sc/qa/uitest/protect/protectSheet.py  |8 
 sc/qa/uitest/protect/protectSpreadsheet.py|4 
 sc/qa/uitest/range_name/tdf119954.py  |6 
 sc/qa/uitest/signatureLine/insertSignatureLine.py |   15 +
 sc/qa/uitest/statistics/anova.py  |6 
 sc/qa/uitest/statistics/chiSquare.py  |8 
 sc/qa/uitest/statistics/correlation.py|8 
 sc/qa/uitest/statistics/covariance.py |8 
 sc/qa/uitest/statistics/descriptiveStatistics.py  |8 
 sc/qa/uitest/statistics/exponentialSmoothing.py   |6 
 sc/qa/uitest/statistics/fTest.py  |8 
 sc/qa/uitest/statistics/movingAverage.py  |8 
 sc/qa/uitest/statistics/regression.py |9 
 sc/qa/uitest/statistics/sampling.py   |7 
 sc/qa/uitest/statistics/tTest.py  |8 
 sc/qa/uitest/statistics/zTest.py  |8 
 sc/qa/uitest/validity/validity.py |6 
 30 files changed, 409 insertions(+), 27 deletions(-)

New commits:
commit 25bf2c5c0074fbcc162c02593d896705e225b5b5
Author: Artur Neumann 
AuthorDate: Wed Jun 19 12:15:08 2019 +0545
Commit: Zdenek Crhonek 
CommitDate: Wed Jul 3 07:08:05 2019 +0200

UI tests opening all dialogs in calc and see if it crashes

Open a dialog, close it by the given button e.g. "cancel" or "close".
If the dialog has an enabled "OK" button open the dialog again
and try to close it also using the OK button.
For every dialog a complete new document is opened to ensure 
test-separation,
otherwise one action could hamper the next action.
E.g. ".uno:Protect" would hamper any edit action.

For dialogs that already have other tests a "cancel/close" test was added to
the previous test. As far as possible opening new documents was avoided in 
those
cases. And in some cases a simple check was added to check if the "cancel" 
button
does not change anything.

Change-Id: I727cad43603770245f27baf752a1985f9a754847
Reviewed-on: https://gerrit.libreoffice.org/74333
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 7d4928f41599..3b4cf0aa687f 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -253,6 +253,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sc,\
UITest_chart \
UITest_pageFormat \
UITest_calc_tests8 \
+   UITest_dialogs \
 ))
 endif
 
diff --git a/sc/UITest_dialogs.mk b/sc/UITest_dialogs.mk
new file mode 100644
index ..9498a6cb9488
--- /dev/null
+++ b/sc/UITest_dialogs.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,dialogs))
+
+$(eval $(call gb_UITest_add_modules,dialogs,$(SRCDIR)/sc/qa/uitest,\
+   dialogs/ \
+))
+
+$(eval $(call gb_UITest_set_defs,dialogs, \
+TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/qa/uitest/calc_tests/columns.py 
b/sc/qa/uitest/calc_tests/columns.py
index 259bf09fcc00..09d6990686f1 100644
--- a/sc/qa/uitest/calc_tests/columns.py
+++ b/sc/qa/uitest/calc_tests/columns.py
@@ -63,8 +63,8 @@ class CalcColumns(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()
 
@@ -338,4 +338,4 @@ class CalcColumns(UITestCase):
 
 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:
diff --git a/sc/qa/uitest/calc_tests/fillRandomNumber.py 

[Libreoffice-commits] core.git: uitest/calc_tests

2019-06-12 Thread Artur Neumann (via logerrit)
 uitest/calc_tests/tdf117987.py |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit 3d61113a803f3d99a52ca9acce06c5dc6cb38f35
Author: Artur Neumann 
AuthorDate: Tue Jun 11 12:29:13 2019 +0545
Commit: Zdenek Crhonek 
CommitDate: Wed Jun 12 17:36:37 2019 +0200

UI test for tdf#117987

test to check if the background color is set in the first attempt after 
moving the cursor

Change-Id: I6340fe9bd128ac7e44c277427db3bca7b2b9fcfa
Reviewed-on: https://gerrit.libreoffice.org/73803
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/uitest/calc_tests/tdf117987.py b/uitest/calc_tests/tdf117987.py
new file mode 100644
index ..3de0b176ed01
--- /dev/null
+++ b/uitest/calc_tests/tdf117987.py
@@ -0,0 +1,25 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import get_cell_by_position
+
+class tdf117987(UITestCase):
+
+def test_highlight_cell_after_moving_cursor(self):
+self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+colorProperty = mkPropertyValues({"BackgroundColor": 16776960})
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", 
colorProperty)
+gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
+self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", 
colorProperty)
+
+document = self.ui_test.get_component()
+self.assertEqual(get_cell_by_position(document, 0, 0, 
1).CellBackColor, 16776960)
+self.ui_test.close_doc()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits