summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-11-08 22:10:23 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2019-11-08 21:16:22 +0100
commitb392d126335be68e0b601df39bfb840c4080d606 (patch)
tree46f819379448298e1ed2a507e5bfb9ff6a238a45 /uitest
parent7eca2c49baad96e1183de6a96a322f4c22f2f8f5 (diff)
Add UI Test for tdf#128004
Change-Id: Id2b95d21799f8fa4b55a304afda739219fee06ff Reviewed-on: https://gerrit.libreoffice.org/82323 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/writer_tests/customizeDialog.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/uitest/writer_tests/customizeDialog.py b/uitest/writer_tests/customizeDialog.py
index 8b61613a2e31..9d2311eb46a6 100644
--- a/uitest/writer_tests/customizeDialog.py
+++ b/uitest/writer_tests/customizeDialog.py
@@ -4,10 +4,12 @@
# 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/.
+import time
+
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
-import time
+from uitest.uihelper.common import select_pos
from uitest.debug import sleep
class ConfigureDialog(UITestCase):
@@ -56,4 +58,28 @@ class ConfigureDialog(UITestCase):
self.ui_test.close_doc()
+ def test_category_listbox(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ self.ui_test.execute_dialog_through_command(".uno:ConfigureDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xFunc = xDialog.getChild("functions")
+ xCategory = xDialog.getChild("commandcategorylist")
+
+ initialEntryCount = get_state_as_dict(xFunc)["Children"]
+ self.assertTrue(initialEntryCount is not 0)
+
+ select_pos(xCategory, "1")
+ filteredEntryCount = get_state_as_dict(xFunc)["Children"]
+ self.assertTrue(filteredEntryCount < initialEntryCount)
+
+ select_pos(xCategory, "0")
+ finalEntryCount = get_state_as_dict(xFunc)["Children"]
+ self.assertEqual(initialEntryCount, finalEntryCount)
+
+ xcancBtn = xDialog.getChild("cancel") #button Cancel
+ xcancBtn.executeAction("CLICK", tuple()) #click the button
+
+ self.ui_test.close_doc()
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: