summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2017-06-15 17:32:58 +0200
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2017-06-15 20:01:15 +0200
commit134effd2494132495d0adb5453b8ddd9f803704e (patch)
tree6bb409d63d5f2b4f31eb44df5baa9fe0370f6297 /uitest
parentandroid: Bump NDK version to 15 in configure.ac (diff)
downloadcore-134effd2494132495d0adb5453b8ddd9f803704e.tar.gz
core-134effd2494132495d0adb5453b8ddd9f803704e.zip
uitest: test page orientation
Change-Id: I265730664cf7dfb1d4a105023ae1e3b4c1fca4f5 Reviewed-on: https://gerrit.libreoffice.org/38838 Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/writer_tests/pageDialog.py35
1 files changed, 31 insertions, 4 deletions
diff --git a/uitest/writer_tests/pageDialog.py b/uitest/writer_tests/pageDialog.py
index 88145e7a1b23..0845778d54a7 100644
--- a/uitest/writer_tests/pageDialog.py
+++ b/uitest/writer_tests/pageDialog.py
@@ -5,7 +5,7 @@
#
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.awt.GradientStyle import LINEAR
from com.sun.star.drawing.HatchStyle import SINGLE
@@ -14,8 +14,6 @@ from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_state_as_dict
-
class WriterPageDialog(UITestCase):
def launch_dialog_and_select_tab(self, tab):
@@ -149,7 +147,7 @@ class WriterPageDialog(UITestCase):
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",
"Legal", "Long Bond", "Tabloid", "B6 (JIS)", "B5 (JIS)", "B4 (JIS)", "16 Kai",
@@ -173,4 +171,33 @@ class WriterPageDialog(UITestCase):
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: