Kaydet (Commit) 134effd2 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Xisco Faulí

uitest: test page orientation

Change-Id: I265730664cf7dfb1d4a105023ae1e3b4c1fca4f5
Reviewed-on: https://gerrit.libreoffice.org/38838Reviewed-by: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst d628e193
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# #
from uitest.framework import UITestCase from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos from uitest.uihelper.common import select_pos, get_state_as_dict
from com.sun.star.uno import RuntimeException from com.sun.star.uno import RuntimeException
from com.sun.star.awt.GradientStyle import LINEAR from com.sun.star.awt.GradientStyle import LINEAR
from com.sun.star.drawing.HatchStyle import SINGLE from com.sun.star.drawing.HatchStyle import SINGLE
...@@ -14,8 +14,6 @@ from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE ...@@ -14,8 +14,6 @@ from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE
from libreoffice.uno.propertyvalue import mkPropertyValues from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
class WriterPageDialog(UITestCase): class WriterPageDialog(UITestCase):
def launch_dialog_and_select_tab(self, tab): def launch_dialog_and_select_tab(self, tab):
...@@ -149,7 +147,7 @@ class WriterPageDialog(UITestCase): ...@@ -149,7 +147,7 @@ class WriterPageDialog(UITestCase):
self.ui_test.close_doc() self.ui_test.close_doc()
def test_page_tab(self): def test_paper_format(self):
lPaperFormat = ["A6", "A5", "A4", "A3", "B6 (ISO)", "B5 (ISO)", "B4 (ISO)", "Letter", lPaperFormat = ["A6", "A5", "A4", "A3", "B6 (ISO)", "B5 (ISO)", "B4 (ISO)", "Letter",
"Legal", "Long Bond", "Tabloid", "B6 (JIS)", "B5 (JIS)", "B4 (JIS)", "16 Kai", "Legal", "Long Bond", "Tabloid", "B6 (JIS)", "B5 (JIS)", "B4 (JIS)", "16 Kai",
...@@ -173,4 +171,33 @@ class WriterPageDialog(UITestCase): ...@@ -173,4 +171,33 @@ class WriterPageDialog(UITestCase):
self.ui_test.close_doc() self.ui_test.close_doc()
def test_orientation(self):
self.ui_test.create_doc_in_start_center("writer")
document = self.ui_test.get_component()
self.assertEqual(
document.StyleFamilies.PageStyles.Standard.IsLandscape, False)
xDialog = self.launch_dialog_and_select_tab(1)
self.click_button(xDialog, 'radiobuttonLandscape')
self.click_button(xDialog, 'ok')
self.assertEqual(
document.StyleFamilies.PageStyles.Standard.IsLandscape, True)
xDialog = self.launch_dialog_and_select_tab(1)
self.click_button(xDialog, 'radiobuttonPortrait')
self.click_button(xDialog, 'ok')
self.assertEqual(
document.StyleFamilies.PageStyles.Standard.IsLandscape, False)
self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: # vim: set shiftwidth=4 softtabstop=4 expandtab:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment