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

Xisco Fauli anistenis at gmail.com
Thu Jun 15 18:01:55 UTC 2017


 uitest/writer_tests/pageDialog.py |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

New commits:
commit 0254e70f99e6d0e96ef3e6cd7da173bcad7c933d
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Thu Jun 15 17:53:37 2017 +0200

    uitest: Test text direction
    
    Change-Id: I66943e432eadedaf4a1bc362861ea8be67b076c3
    Reviewed-on: https://gerrit.libreoffice.org/38839
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/uitest/writer_tests/pageDialog.py b/uitest/writer_tests/pageDialog.py
index 0845778d54a7..84284f61dd45 100644
--- a/uitest/writer_tests/pageDialog.py
+++ b/uitest/writer_tests/pageDialog.py
@@ -200,4 +200,30 @@ class WriterPageDialog(UITestCase):
 
         self.ui_test.close_doc()
 
+    def test_text_direction(self):
+
+        lTextDirection = ['Left-to-right (horizontal)', 'Right-to-left (horizontal)',
+            'Right-to-left (vertical)', 'Left-to-right (vertical)']
+
+        self.ui_test.create_doc_in_start_center("writer")
+
+        document = self.ui_test.get_component()
+
+        for i in range(4):
+            with self.subTest(i=i):
+                xDialog = self.launch_dialog_and_select_tab(1)
+
+                xTextDirectionList = xDialog.getChild("comboTextFlowBox")
+                select_pos(xTextDirectionList, str(i))
+
+                self.assertEqual(
+                    get_state_as_dict(xTextDirectionList)["SelectEntryText"], lTextDirection[i])
+
+                self.click_button(xDialog, 'ok')
+
+                self.assertEqual(
+                    document.StyleFamilies.PageStyles.Standard.WritingMode, i)
+
+        self.ui_test.close_doc()
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


More information about the Libreoffice-commits mailing list