[Libreoffice-commits] core.git: uitest/writer_tests
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 20:17:37 UTC 2019
uitest/writer_tests/customizeDialog.py | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
New commits:
commit b392d126335be68e0b601df39bfb840c4080d606
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Fri Nov 8 22:10:23 2019 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Fri Nov 8 21:16:22 2019 +0100
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 at collabora.com>
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:
More information about the Libreoffice-commits
mailing list