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

2020-10-23 Thread Xisco Fauli (via logerrit)
 dev/null|binary
 uitest/calc_tests/autofilter.py |   49 
 2 files changed, 49 deletions(-)

New commits:
commit d5772a39a0433ebc4b3f402da0200afa138ef326
Author: Xisco Fauli 
AuthorDate: Fri Oct 23 12:34:21 2020 +0200
Commit: Xisco Fauli 
CommitDate: Fri Oct 23 19:31:02 2020 +0200

uitest: remove duplicated tests

already covered in sc/qa/uitest/autofilter/autofilter.py

Change-Id: I55259bdf741bcf3d51f7970b070bb15aaf144f22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104722
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/uitest/calc_tests/autofilter.py b/uitest/calc_tests/autofilter.py
deleted file mode 100644
index 431043b02f03..
--- a/uitest/calc_tests/autofilter.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- 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
-
-import time
-
-def get_url_for_data_file(file_name):
-return get_srcdir_url() + "/uitest/calc_tests/data/" + file_name
-
-class AutofilterTest(UITestCase):
-
-def test_launch_autofilter(self):
-doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods"))
-
-xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
-xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "1"}))
-
-time.sleep(1)
-
-self.ui_test.close_doc()
-
-def test_hierarchy(self):
-doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods"))
-
-xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
-xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
-
-xFloatWindow = self.xUITest.getFloatWindow()
-xCheckListMenu = xFloatWindow.getChild("check_list_menu")
-
-xTreeList = xCheckListMenu.getChild("check_list_box")
-xFirstEntry = xTreeList.getChild("0")
-
-xFirstEntry.executeAction("CLICK", tuple())
-
-xOkBtn = xFloatWindow.getChild("ok")
-xOkBtn.executeAction("CLICK", tuple())
-
-self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/data/autofilter.ods 
b/uitest/calc_tests/data/autofilter.ods
deleted file mode 100644
index a03dba608076..
Binary files a/uitest/calc_tests/data/autofilter.ods and /dev/null differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[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

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

2018-10-30 Thread Libreoffice Gerrit user
 uitest/calc_tests/input_window.py |   33 +
 1 file changed, 33 insertions(+)

New commits:
commit 8e037373d342826f6b80a3887b0421cace324ac7
Author: Markus Mohrhard 
AuthorDate: Sat Oct 27 11:41:49 2018 +0200
Commit: Markus Mohrhard 
CommitDate: Wed Oct 31 02:19:48 2018 +0100

uitest: add demo showing how to access the calc input window

Change-Id: I5e1fc327a785e892e1c2f526cce8c58fe1ab928c
Reviewed-on: https://gerrit.libreoffice.org/62413
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/input_window.py 
b/uitest/calc_tests/input_window.py
new file mode 100644
index ..eea8b53d950f
--- /dev/null
+++ b/uitest/calc_tests/input_window.py
@@ -0,0 +1,33 @@
+# -*- 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, type_text
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+from libreoffice.calc.document import get_cell_by_position
+
+import time
+
+class InputWindowTest(UITestCase):
+
+def test_input_window(self):
+
+self.ui_test.create_doc_in_start_center("calc")
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+document = self.ui_test.get_component()
+
+xInputWin = xCalcDoc.getChild("sc_input_window")
+
+type_text(xInputWin, "test")
+xInputWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), 
"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: uitest/calc_tests

2017-03-25 Thread Markus Mohrhard
 uitest/calc_tests/autofilter.py |   27 +++
 1 file changed, 11 insertions(+), 16 deletions(-)

New commits:
commit aaea953b6e43ca5672b104308042419899a52c72
Author: Markus Mohrhard 
Date:   Sun Mar 26 01:13:34 2017 +0100

uitest: add demo showing how to use auto filter popup

Change-Id: Id42c2856e4eee03dae374ea36d6dcba16419c70e
Reviewed-on: https://gerrit.libreoffice.org/35700
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/autofilter.py b/uitest/calc_tests/autofilter.py
index fc5c1c897ef9..431043b02f03 100644
--- a/uitest/calc_tests/autofilter.py
+++ b/uitest/calc_tests/autofilter.py
@@ -31,23 +31,18 @@ class AutofilterTest(UITestCase):
 doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods"))
 
 xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
-xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "1"}))
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
+
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+
+xTreeList = xCheckListMenu.getChild("check_list_box")
+xFirstEntry = xTreeList.getChild("0")
+
+xFirstEntry.executeAction("CLICK", tuple())
 
-time.sleep(3)
-
-print(xGridWin.getChildren())
-xCheckListMenu = xGridWin.getChild("check_list_menu")
-print("temp")
-print(xCheckListMenu)
-print(dir(xCheckListMenu))
-print("temp")
-
-json_string = xCheckListMenu.getHierarchy()
-print(json_string)
-json_content = json.loads(json_string)
-print(json_content)
-print(json.dumps(json_content, indent=4))
-time.sleep(10)
+xOkBtn = xFloatWindow.getChild("ok")
+xOkBtn.executeAction("CLICK", tuple())
 
 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: uitest/calc_tests

2017-03-25 Thread Markus Mohrhard
 uitest/calc_tests/autofilter.py |   24 
 1 file changed, 24 insertions(+)

New commits:
commit b3ebb8942115ef0d3fa3840f2056eac9a3bbe23a
Author: Markus Mohrhard 
Date:   Sun Mar 26 01:19:00 2017 +0100

uitest: add demo showing how to interact with autofilter popup

Change-Id: Icda3c00a3a8c593a8f3129662c7688be000e3c7e
Reviewed-on: https://gerrit.libreoffice.org/35694
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/autofilter.py b/uitest/calc_tests/autofilter.py
index 82a2023fea75..fc5c1c897ef9 100644
--- a/uitest/calc_tests/autofilter.py
+++ b/uitest/calc_tests/autofilter.py
@@ -27,4 +27,28 @@ class AutofilterTest(UITestCase):
 
 self.ui_test.close_doc()
 
+def test_hierarchy(self):
+doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "1"}))
+
+time.sleep(3)
+
+print(xGridWin.getChildren())
+xCheckListMenu = xGridWin.getChild("check_list_menu")
+print("temp")
+print(xCheckListMenu)
+print(dir(xCheckListMenu))
+print("temp")
+
+json_string = xCheckListMenu.getHierarchy()
+print(json_string)
+json_content = json.loads(json_string)
+print(json_content)
+print(json.dumps(json_content, indent=4))
+time.sleep(10)
+
+self.ui_test.close_doc()
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-25 Thread Markus Mohrhard
 uitest/calc_tests/autofilter.py   |   30 ++
 uitest/calc_tests/data/autofilter.ods |binary
 2 files changed, 30 insertions(+)

New commits:
commit 8d65a2076ee9e76ce2301762fd147cea7091aae4
Author: Markus Mohrhard 
Date:   Sat Mar 25 04:10:24 2017 +0100

uitest: add initial autofilter test

Change-Id: I06029afbf9be93054ef932f8c37a56b929c3e436
Reviewed-on: https://gerrit.libreoffice.org/35693
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/autofilter.py b/uitest/calc_tests/autofilter.py
new file mode 100644
index ..82a2023fea75
--- /dev/null
+++ b/uitest/calc_tests/autofilter.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 uitest.path import get_srcdir_url
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+import time
+
+def get_url_for_data_file(file_name):
+return get_srcdir_url() + "/uitest/calc_tests/data/" + file_name
+
+class AutofilterTest(UITestCase):
+
+def test_launch_autofilter(self):
+doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "1"}))
+
+time.sleep(1)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/data/autofilter.ods 
b/uitest/calc_tests/data/autofilter.ods
new file mode 100644
index ..a03dba608076
Binary files /dev/null and b/uitest/calc_tests/data/autofilter.ods differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-17 Thread Markus Mohrhard
 uitest/calc_tests/about_test.py|2 +-
 uitest/calc_tests/create_chart.py  |   12 ++--
 uitest/calc_tests/create_range_name.py |4 ++--
 uitest/calc_tests/edit_chart.py|2 +-
 uitest/calc_tests/function_wizard.py   |2 +-
 uitest/calc_tests/tdf105411.py |2 +-
 uitest/calc_tests/tdf105466.py |2 +-
 uitest/calc_tests/tdf96453.py  |2 +-
 uitest/demo_ui/radiobutton.py  |2 +-
 uitest/demo_ui/tabdialog.py|4 ++--
 uitest/uitest/test.py  |2 +-
 11 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 7ec0500e20cf273d70c4fbddb4063b8f8295307c
Author: Markus Mohrhard 
Date:   Tue Feb 14 00:45:12 2017 +0100

use special method to close dialog through button click

Change-Id: Id884cc75503cb433742f9316d9647cff801565f7
Reviewed-on: https://gerrit.libreoffice.org/34230
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/about_test.py b/uitest/calc_tests/about_test.py
index 016c486..a5082ee 100644
--- a/uitest/calc_tests/about_test.py
+++ b/uitest/calc_tests/about_test.py
@@ -18,7 +18,7 @@ class AboutDlgTest(UITestCase):
 xAboutDlg = self.xUITest.getTopFocusWindow()
 
 xCloseBtn = xAboutDlg.getChild("close")
-xCloseBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xCloseBtn)
 
 self.ui_test.close_doc()
 
diff --git a/uitest/calc_tests/create_chart.py 
b/uitest/calc_tests/create_chart.py
index d98eeff..427b4ce 100644
--- a/uitest/calc_tests/create_chart.py
+++ b/uitest/calc_tests/create_chart.py
@@ -39,7 +39,7 @@ class CalcChartUIDemo(UITestCase):
 xChartDlg = self.xUITest.getTopFocusWindow()
 
 xCancelBtn = xChartDlg.getChild("cancel")
-xCancelBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xCancelBtn)
 
 self.ui_test.close_doc()
 
@@ -54,7 +54,7 @@ class CalcChartUIDemo(UITestCase):
 xChartDlg = self.xUITest.getTopFocusWindow()
 
 xOkBtn = xChartDlg.getChild("finish")
-xOkBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xOkBtn)
 
 self.ui_test.close_doc()
 
@@ -78,7 +78,7 @@ class CalcChartUIDemo(UITestCase):
 xDataInCols.executeAction("CLICK", tuple())
 
 xCancelBtn = xChartDlg.getChild("finish")
-xCancelBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xCancelBtn)
 
 self.ui_test.close_doc()
 
@@ -95,7 +95,7 @@ class CalcChartUIDemo(UITestCase):
 xChartDlg = self.xUITest.getTopFocusWindow()
 
 xNextBtn = xChartDlg.getChild("finish")
-xNextBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xNextBtn)
 
 xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
 
@@ -118,7 +118,7 @@ class CalcChartUIDemo(UITestCase):
 xChartDlg = self.xUITest.getTopFocusWindow()
 
 xNextBtn = xChartDlg.getChild("finish")
-xNextBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xNextBtn)
 
 xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
 
@@ -144,7 +144,7 @@ class CalcChartUIDemo(UITestCase):
 xChartDlg = self.xUITest.getTopFocusWindow()
 
 xNextBtn = xChartDlg.getChild("finish")
-xNextBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xNextBtn)
 
 xGridWindow.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""}))
 
diff --git a/uitest/calc_tests/create_range_name.py 
b/uitest/calc_tests/create_range_name.py
index 1ab7805..1babca7 100644
--- a/uitest/calc_tests/create_range_name.py
+++ b/uitest/calc_tests/create_range_name.py
@@ -24,7 +24,7 @@ class CreateRangeNameTest(UITestCase):
 type_text(xEdit, "simpleRangeName")
 
 xAddBtn = xAddNameDlg.getChild("add")
-xAddBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xAddBtn)
 
 self.ui_test.close_doc()
 
@@ -43,7 +43,7 @@ class CreateRangeNameTest(UITestCase):
 select_pos(xScope, "1")
 
 xAddBtn = xAddNameDlg.getChild("add")
-xAddBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xAddBtn)
 
 self.ui_test.close_doc()
 
diff --git a/uitest/calc_tests/edit_chart.py b/uitest/calc_tests/edit_chart.py
index a8aa36e..4d44d52 100644
--- a/uitest/calc_tests/edit_chart.py
+++ b/uitest/calc_tests/edit_chart.py
@@ -42,7 +42,7 @@ class CalcChartEditUIDemo(UITestCase):
 xChartDlg = self.xUITest.getTopFocusWindow()
 
 xNextBtn = xChartDlg.getChild("finish")
-xNextBtn.executeAction("CLICK", tuple())
+self.ui_test.close_dialog_through_button(xNextBtn)
 
 

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

2017-01-24 Thread Xisco Fauli
 uitest/calc_tests/tdf105466.py |   31 +++
 1 file changed, 31 insertions(+)

New commits:
commit efbbf4a7950a63b771877f5e9fc98acb174d55ed
Author: Xisco Fauli 
Date:   Tue Jan 24 11:40:29 2017 +0100

tdf#105466: Add uitest

Change-Id: I21ba4b716b3b7d2c1c23db816701331ba462b379
Reviewed-on: https://gerrit.libreoffice.org/33494
Tested-by: Jenkins 
Reviewed-by: Xisco Faulí 

diff --git a/uitest/calc_tests/tdf105466.py b/uitest/calc_tests/tdf105466.py
new file mode 100644
index 000..6e3593b
--- /dev/null
+++ b/uitest/calc_tests/tdf105466.py
@@ -0,0 +1,31 @@
+# -*- 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 tdf105466(UITestCase):
+
+def test_changing_conditional_format(self):
+
+self.ui_test.create_doc_in_start_center("calc")
+
+
self.ui_test.execute_modeless_dialog_through_command(".uno:ConditionalFormatDialog")
+
+for i in range(0,4):
+xCondFormatDlg = self.xUITest.getTopFocusWindow()
+xTypeLstBox = xCondFormatDlg.getChild("type")
+xTypeLstBox.executeAction("SELECT", mkPropertyValues({"POS": 
str(i)}))
+
+xCondFormatDlg = self.xUITest.getTopFocusWindow()
+xOkBtn = xCondFormatDlg.getChild("ok")
+xOkBtn.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: uitest/calc_tests

2017-01-20 Thread Xisco Fauli
 uitest/calc_tests/tdf105411.py |   35 +++
 1 file changed, 35 insertions(+)

New commits:
commit 36f2fd038d6dd281358db9d3161d7082d9559f4c
Author: Xisco Fauli 
Date:   Fri Jan 20 12:10:09 2017 +0100

tdf#105411: Add uitest

Change-Id: Iff93a61441aa13670903ef2dd82de38af4eb5320
Reviewed-on: https://gerrit.libreoffice.org/33347
Tested-by: Jenkins 
Reviewed-by: Xisco Faulí 

diff --git a/uitest/calc_tests/tdf105411.py b/uitest/calc_tests/tdf105411.py
new file mode 100644
index 000..c9910bc
--- /dev/null
+++ b/uitest/calc_tests/tdf105411.py
@@ -0,0 +1,35 @@
+# -*- 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 tdf105411(UITestCase):
+
+def test_delete_conditional_format(self):
+
+self.ui_test.create_doc_in_start_center("calc")
+
+
self.ui_test.execute_modeless_dialog_through_command(".uno:ConditionalFormatDialog")
+
+xCondFormatDlg = self.xUITest.getTopFocusWindow()
+
+xDeleteBtn = xCondFormatDlg.getChild("delete")
+xDeleteBtn.executeAction("CLICK", tuple())
+
+xCondFormatDlg = self.xUITest.getTopFocusWindow()
+
+xDeleteBtn = xCondFormatDlg.getChild("add")
+xDeleteBtn.executeAction("CLICK", tuple())
+
+xCondFormatDlg = self.xUITest.getTopFocusWindow()
+
+xOkBtn = xCondFormatDlg.getChild("ok")
+xOkBtn.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: uitest/calc_tests uitest/demo_ui uitest/math_tests uitest/uitest

2016-12-24 Thread Markus Mohrhard
 uitest/calc_tests/create_range_name.py |6 ++
 uitest/demo_ui/combobox.py |5 ++---
 uitest/demo_ui/listbox.py  |5 ++---
 uitest/demo_ui/spinfield.py|6 +++---
 uitest/demo_ui/tabcontrol.py   |3 ++-
 uitest/demo_ui/tabdialog.py|5 ++---
 uitest/demo_ui/treelist.py |4 ++--
 uitest/math_tests/start.py |6 +++---
 uitest/uitest/uihelper/common.py   |3 +++
 9 files changed, 21 insertions(+), 22 deletions(-)

New commits:
commit 85a1dda8ef9d5970adf881dca2bf9d1a652f7245
Author: Markus Mohrhard 
Date:   Thu Dec 22 03:58:26 2016 +0100

uitest: write a helper method for selecting based on position

Change-Id: Ia7c4450f83a5a7cebd9d518c9ccac1ce07045570
Reviewed-on: https://gerrit.libreoffice.org/32407
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/create_range_name.py 
b/uitest/calc_tests/create_range_name.py
index 5f3b8c3..1ab7805 100644
--- a/uitest/calc_tests/create_range_name.py
+++ b/uitest/calc_tests/create_range_name.py
@@ -8,7 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
-from uitest.uihelper.common import type_text
+from uitest.uihelper.common import type_text, select_pos
 
 class CreateRangeNameTest(UITestCase):
 
@@ -40,9 +40,7 @@ class CreateRangeNameTest(UITestCase):
 type_text(xEdit, "simpleRangeName")
 
 xScope = xAddNameDlg.getChild("scope")
-props = {"POS": "1"}
-scopeProps = mkPropertyValues(props)
-xScope.executeAction("SELECT", scopeProps)
+select_pos(xScope, "1")
 
 xAddBtn = xAddNameDlg.getChild("add")
 xAddBtn.executeAction("CLICK", tuple())
diff --git a/uitest/demo_ui/combobox.py b/uitest/demo_ui/combobox.py
index 9b677a4..32e6402 100644
--- a/uitest/demo_ui/combobox.py
+++ b/uitest/demo_ui/combobox.py
@@ -8,6 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
 
 class ComboBoxTest(UITestCase):
 
@@ -19,9 +20,7 @@ class ComboBoxTest(UITestCase):
 xAddNameDlg = self.xUITest.getTopFocusWindow()
 
 scopeCB = xAddNameDlg.getChild("scope")
-props = {"POS": "1"}
-actionProps = mkPropertyValues(props)
-scopeCB.executeAction("SELECT", actionProps)
+select_pos(scopeCB, "1")
 
 xCancelBtn = xAddNameDlg.getChild("cancel")
 xCancelBtn.executeAction("CLICK", tuple())
diff --git a/uitest/demo_ui/listbox.py b/uitest/demo_ui/listbox.py
index 5c56c10..15bd8ab 100644
--- a/uitest/demo_ui/listbox.py
+++ b/uitest/demo_ui/listbox.py
@@ -8,6 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
 
 class ListBoxTest(UITestCase):
 
@@ -19,9 +20,7 @@ class ListBoxTest(UITestCase):
 xCellsDlg = self.xUITest.getTopFocusWindow()
 
 categoryLB = xCellsDlg.getChild("categorylb")
-props = {"POS": "4"}
-actionProps = mkPropertyValues(props)
-categoryLB.executeAction("SELECT", actionProps)
+select_pos(categoryLB, "4")
 
 xOkBtn = xCellsDlg.getChild("ok")
 xOkBtn.executeAction("CLICK", tuple())
diff --git a/uitest/demo_ui/spinfield.py b/uitest/demo_ui/spinfield.py
index c093cf5..a36189a 100644
--- a/uitest/demo_ui/spinfield.py
+++ b/uitest/demo_ui/spinfield.py
@@ -8,7 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import get_state_as_dict, type_text, select_pos
 
 class SpinFieldTest(UITestCase):
 
@@ -20,7 +20,7 @@ class SpinFieldTest(UITestCase):
 xCellsDlg = self.xUITest.getTopFocusWindow()
 
 # select the numbers tab page
-xCellsDlg.executeAction("SELECT", mkPropertyValues({"POS": "0"}))
+select_pos(xCellsDlg, "0")
 
 xDecimalPlaces = xCellsDlg.getChild("leadzerosed")
 xDecimalPlaces.executeAction("UP", tuple())
@@ -41,7 +41,7 @@ class SpinFieldTest(UITestCase):
 xCellsDlg = self.xUITest.getTopFocusWindow()
 
 # select the numbers tab page
-xCellsDlg.executeAction("SELECT", mkPropertyValues({"POS": "0"}))
+select_pos(xCellsDlg, "0")
 
 xDecimalPlaces = xCellsDlg.getChild("leadzerosed")
 xDecimalPlaces.executeAction("UP", tuple())
diff --git a/uitest/demo_ui/tabcontrol.py b/uitest/demo_ui/tabcontrol.py
index 79a2948..2dbe3ef 100644
--- a/uitest/demo_ui/tabcontrol.py
+++ b/uitest/demo_ui/tabcontrol.py
@@ -8,6 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.uihelper.calc import enter_text_to_cell
+from 

[Libreoffice-commits] core.git: uitest/calc_tests uitest/demo_ui uitest/manual_tests uitest/math_tests uitest/uitest uitest/writer_tests

2016-12-24 Thread Markus Mohrhard
 uitest/calc_tests/create_chart.py  |   20 +++-
 uitest/calc_tests/create_range_name.py |   12 
 uitest/calc_tests/edit_chart.py|   20 +++-
 uitest/demo_ui/edit.py |5 ++---
 uitest/demo_ui/spinfield.py|4 ++--
 uitest/manual_tests/calc.py|4 ++--
 uitest/math_tests/start.py |8 
 uitest/uitest/uihelper/calc.py |3 ++-
 uitest/uitest/uihelper/common.py   |5 -
 uitest/writer_tests/start.py   |7 +++
 10 files changed, 37 insertions(+), 51 deletions(-)

New commits:
commit 57e785e1cf52e422ac60cb259a2f53b696d3c4cc
Author: Markus Mohrhard 
Date:   Thu Dec 22 03:38:34 2016 +0100

uitest: add a helper method for typing text

Change-Id: If450e3f0ff1e2a8f33db05e9512a13e5771115a8
Reviewed-on: https://gerrit.libreoffice.org/32406
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/create_chart.py 
b/uitest/calc_tests/create_chart.py
index c43be5f..d98eeff 100644
--- a/uitest/calc_tests/create_chart.py
+++ b/uitest/calc_tests/create_chart.py
@@ -8,29 +8,23 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
+from uitest.uihelper.calc import enter_text_to_cell
 
 import time
 import unittest
 
 class CalcChartUIDemo(UITestCase):
 
-def add_content_to_cell(self, gridwin, cell, content):
-selectProps = mkPropertyValues({"CELL": cell})
-gridwin.executeAction("SELECT", selectProps)
-
-contentProps = mkPropertyValues({"TEXT": content})
-gridwin.executeAction("TYPE", contentProps)
-
 def fill_spreadsheet(self):
 xCalcDoc = self.xUITest.getTopFocusWindow()
 xGridWindow = xCalcDoc.getChild("grid_window")
 
-self.add_content_to_cell(xGridWindow, "A1", "col1")
-self.add_content_to_cell(xGridWindow, "B1", "col2")
-self.add_content_to_cell(xGridWindow, "C1", "col3")
-self.add_content_to_cell(xGridWindow, "A2", "1")
-self.add_content_to_cell(xGridWindow, "B2", "3")
-self.add_content_to_cell(xGridWindow, "C2", "5")
+enter_text_to_cell(xGridWindow, "A1", "col1")
+enter_text_to_cell(xGridWindow, "B1", "col2")
+enter_text_to_cell(xGridWindow, "C1", "col3")
+enter_text_to_cell(xGridWindow, "A2", "1")
+enter_text_to_cell(xGridWindow, "B2", "3")
+enter_text_to_cell(xGridWindow, "C2", "5")
 
 xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:C2"}))
 
diff --git a/uitest/calc_tests/create_range_name.py 
b/uitest/calc_tests/create_range_name.py
index ee398ab..5f3b8c3 100644
--- a/uitest/calc_tests/create_range_name.py
+++ b/uitest/calc_tests/create_range_name.py
@@ -8,6 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
+from uitest.uihelper.common import type_text
 
 class CreateRangeNameTest(UITestCase):
 
@@ -19,11 +20,9 @@ class CreateRangeNameTest(UITestCase):
 
 xAddNameDlg = self.xUITest.getTopFocusWindow()
 
-props = {"TEXT": "simpleRangeName"}
-actionProps = mkPropertyValues(props)
-
 xEdit = xAddNameDlg.getChild("edit")
-xEdit.executeAction("TYPE", actionProps)
+type_text(xEdit, "simpleRangeName")
+
 xAddBtn = xAddNameDlg.getChild("add")
 xAddBtn.executeAction("CLICK", tuple())
 
@@ -37,11 +36,8 @@ class CreateRangeNameTest(UITestCase):
 
 xAddNameDlg = self.xUITest.getTopFocusWindow()
 
-props = {"TEXT": "simpleRangeName"}
-actionProps = mkPropertyValues(props)
-
 xEdit = xAddNameDlg.getChild("edit")
-xEdit.executeAction("TYPE", actionProps)
+type_text(xEdit, "simpleRangeName")
 
 xScope = xAddNameDlg.getChild("scope")
 props = {"POS": "1"}
diff --git a/uitest/calc_tests/edit_chart.py b/uitest/calc_tests/edit_chart.py
index c5d85c0..a8aa36e 100644
--- a/uitest/calc_tests/edit_chart.py
+++ b/uitest/calc_tests/edit_chart.py
@@ -8,28 +8,22 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
+from uitest.uihelper.calc import enter_text_to_cell
 
 import unittest
 
 class CalcChartEditUIDemo(UITestCase):
 
-def add_content_to_cell(self, gridwin, cell, content):
-selectProps = mkPropertyValues({"CELL": cell})
-gridwin.executeAction("SELECT", selectProps)
-
-contentProps = mkPropertyValues({"TEXT": content})
-gridwin.executeAction("TYPE", contentProps)
-
 def fill_spreadsheet(self):
 xCalcDoc = self.xUITest.getTopFocusWindow()
 xGridWindow = xCalcDoc.getChild("grid_window")
 
-self.add_content_to_cell(xGridWindow, "A1", "col1")
-self.add_content_to_cell(xGridWindow, "B1", "col2")
-

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

2016-12-19 Thread Markus Mohrhard
 uitest/calc_tests/create_chart.py |3 +++
 uitest/calc_tests/edit_chart.py   |3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ef16c96a51809f97d66e7e22595388e54e974cf1
Author: Markus Mohrhard 
Date:   Wed Dec 14 07:13:08 2016 +0100

uitest: disable tests that deadlock with mutex problems

This seems to be a race condition that is not really related to the UI
testing. It should happen any time with out-of-process UNO.

Change-Id: I86e42fc6c3848c4522e6f4e5db72e92917e19286
Reviewed-on: https://gerrit.libreoffice.org/31995
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/create_chart.py 
b/uitest/calc_tests/create_chart.py
index 6ad7b81..c43be5f 100644
--- a/uitest/calc_tests/create_chart.py
+++ b/uitest/calc_tests/create_chart.py
@@ -10,6 +10,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.framework import UITestCase
 
 import time
+import unittest
 
 class CalcChartUIDemo(UITestCase):
 
@@ -108,6 +109,7 @@ class CalcChartUIDemo(UITestCase):
 
 self.ui_test.close_doc()
 
+@unittest.skip("linux deadlock")
 def test_activate_chart(self):
 
 self.ui_test.create_doc_in_start_center("calc")
@@ -133,6 +135,7 @@ class CalcChartUIDemo(UITestCase):
 
 self.ui_test.close_doc()
 
+@unittest.skip("linux deadlock")
 def select_chart_element(self):
 
 self.ui_test.create_doc_in_start_center("calc")
diff --git a/uitest/calc_tests/edit_chart.py b/uitest/calc_tests/edit_chart.py
index 9ed5255..c5d85c0 100644
--- a/uitest/calc_tests/edit_chart.py
+++ b/uitest/calc_tests/edit_chart.py
@@ -9,7 +9,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
 
-import time
+import unittest
 
 class CalcChartEditUIDemo(UITestCase):
 
@@ -33,6 +33,7 @@ class CalcChartEditUIDemo(UITestCase):
 
 xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:C2"}))
 
+@unittest.skip("deadlock in the chart/embbedobj code")
 def test_select_secondary_axis(self):
 
 self.ui_test.create_doc_in_start_center("calc")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-10-11 Thread Markus Mohrhard
 uitest/calc_tests/tdf96453.py |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 70ce443e7b767fceef4a22b07ab371f02f7252e5
Author: Markus Mohrhard 
Date:   Tue Oct 11 17:15:20 2016 +0200

forgot to actually remove the problematic import

Change-Id: Iac96719a36269dec173af4c9d6d7e88d67b5c24d

diff --git a/uitest/calc_tests/tdf96453.py b/uitest/calc_tests/tdf96453.py
index fb8e404..9092d43 100644
--- a/uitest/calc_tests/tdf96453.py
+++ b/uitest/calc_tests/tdf96453.py
@@ -8,7 +8,6 @@
 from uitest.framework import UITestCase
 
 import os
-import pathlib
 
 from uitest.uihelper.common import get_state_as_dict
 from uitest.path import get_srcdir_url
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-29 Thread Markus Mohrhard
 uitest/calc_tests/data/tdf96453.ods |binary
 uitest/calc_tests/tdf96453.py   |   37 
 2 files changed, 37 insertions(+)

New commits:
commit 56239a62557c413665b05b6f9692c48a455d4825
Author: Markus Mohrhard 
Date:   Wed Sep 28 04:27:06 2016 +0200

add test for tdf#96453 part 1

This is the first part in the UI testing tutorial. The commit adds the 
skeleton for a
UI test. Currently the test only opens the conditional format manager
dialog and closes the dialog again.

Change-Id: Iff1d662d0aa675efad6b9682bf86a246c7a5a8d3
Reviewed-on: https://gerrit.libreoffice.org/29373
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/uitest/calc_tests/data/tdf96453.ods 
b/uitest/calc_tests/data/tdf96453.ods
new file mode 100644
index 000..89114f6
Binary files /dev/null and b/uitest/calc_tests/data/tdf96453.ods differ
diff --git a/uitest/calc_tests/tdf96453.py b/uitest/calc_tests/tdf96453.py
new file mode 100644
index 000..478a7a1
--- /dev/null
+++ b/uitest/calc_tests/tdf96453.py
@@ -0,0 +1,37 @@
+# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-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
+import pathlib
+
+def get_data_dir():
+current_dir = os.path.dirname(os.path.realpath(__file__))
+return os.path.join(current_dir, "data")
+
+def get_url_for_data_file(file_name):
+path = os.path.join(get_data_dir(), file_name)
+return pathlib.Path(path).as_uri()
+
+class ConditionalFormatDlgTest(UITestCase):
+
+def test_simple_open_manager(self):
+
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf96453.ods"))
+print(dir(calc_doc))
+
+
self.ui_test.execute_dialog_through_command(".uno:ConditionalFormatManagerDialog")
+
+xCondFormatMgr = self.xUITest.getTopFocusWindow()
+
+xCancelBtn = xCondFormatMgr.getChild("cancel")
+xCancelBtn.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