uitest: Test text direction

Change-Id: I66943e432eadedaf4a1bc362861ea8be67b076c3
Reviewed-on: https://gerrit.libreoffice.org/38839
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli 2017-06-15 17:53:37 +02:00 committed by Xisco Faulí
parent 134effd249
commit 0254e70f99

View File

@ -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: