[Libreoffice-commits] core.git: uitest/writer_tests
Xisco Fauli
anistenis at gmail.com
Thu Jun 15 09:45:42 UTC 2017
uitest/writer_tests/pageDialog.py | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
New commits:
commit 3459f778012d376e746be442167e2b85de18d6cc
Author: Xisco Fauli <anistenis at gmail.com>
Date: Wed Jun 14 14:46:12 2017 +0200
uitest: Using dimensions in assert isn't a good idea...
... as they're normally not equal across platforms and machines
At least, check the paper format we choose
Change-Id: I7f1047157f3b6135c2a037b9cc783889d17d3072
Reviewed-on: https://gerrit.libreoffice.org/38785
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 3f608cee97af..88145e7a1b23 100644
--- a/uitest/writer_tests/pageDialog.py
+++ b/uitest/writer_tests/pageDialog.py
@@ -14,7 +14,7 @@ from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE
from libreoffice.uno.propertyvalue import mkPropertyValues
-import unittest
+from uitest.uihelper.common import get_state_as_dict
class WriterPageDialog(UITestCase):
@@ -149,34 +149,27 @@ class WriterPageDialog(UITestCase):
self.ui_test.close_doc()
- @unittest.skip("Currently broken")
def test_page_tab(self):
- size_list = [[10500,14801], [14801,21001], [21001,29700], [29700,42000],
- [12501,17600], [17600,25000], [25000,35301], [21590,27940],
- [21590,35560], [21590,33020], [27940,43180], [12801,18200],
- [18200,25700], [25700,36400], [18399,26000], [13000,18399],
- [14000,20301], [14000,20301], [11000,21999], [11400,16200],
- [11400,22901], [16200,22901], [22901,32401], [9208,16510],
- [9843,19050], [9843,22543], [10478,24130], [11430,26353]]
+ lPaperFormat = ["A6", "A5", "A4", "A3", "B6 (ISO)", "B5 (ISO)", "B4 (ISO)", "Letter",
+ "Legal", "Long Bond", "Tabloid", "B6 (JIS)", "B5 (JIS)", "B4 (JIS)", "16 Kai",
+ "32 Kai", "Big 32 Kai", "User", "DL Envelope", "C6 Envelope", "C6/5 Envelope",
+ "C5 Envelope", "C4 Envelope", "#6¾ Envelope", "#7¾ (Monarch) Envelope",
+ "#9 Envelope", "#10 Envelope", "#11 Envelope", "#12 Envelope", "Japanese Postcard"]
self.ui_test.create_doc_in_start_center("writer")
- for i in range(28):
+ for i in range(30):
with self.subTest(i=i):
xDialog = self.launch_dialog_and_select_tab(1)
xFormatList = xDialog.getChild("comboPageFormat")
select_pos(xFormatList, str(i))
- self.click_button(xDialog, 'ok')
-
- document = self.ui_test.get_component()
-
self.assertEqual(
- document.StyleFamilies.PageStyles.Standard.Width, size_list[i][0])
- self.assertEqual(
- document.StyleFamilies.PageStyles.Standard.Height, size_list[i][1])
+ get_state_as_dict(xFormatList)["SelectEntryText"], lPaperFormat[i])
+
+ self.click_button(xDialog, 'ok')
self.ui_test.close_doc()
More information about the Libreoffice-commits
mailing list