summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-04-27 15:22:50 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-04-27 23:43:59 +0200
commitdbf907f6ccbe83ba9e9982a7b6c8fc21b6dbdb37 (patch)
treeaad58cbb79505cf4b92fedf78e9ed2505d4e9cf4
parentbb07fb341f9d9398a3723df2a5ccf3a025a7d361 (diff)
UITest_impress_tests: fix sporadic failures
Change-Id: I6825eccedd7a069ef743efb8d1265d9c9729a59a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133513 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sd/qa/uitest/impress_tests/tdf82616.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/sd/qa/uitest/impress_tests/tdf82616.py b/sd/qa/uitest/impress_tests/tdf82616.py
index b198618a9167..7f6b1db826f8 100644
--- a/sd/qa/uitest/impress_tests/tdf82616.py
+++ b/sd/qa/uitest/impress_tests/tdf82616.py
@@ -25,17 +25,19 @@ class Tdf82616(UITestCase):
xImpressDoc = self.xUITest.getTopFocusWindow()
- self.assertEqual(1400, document.DrawPages[0].getByIndex(0).Position.X)
- self.assertEqual(628, document.DrawPages[0].getByIndex(0).Position.Y)
- self.assertEqual(1400, document.DrawPages[0].getByIndex(1).Position.X)
- self.assertEqual(3685, document.DrawPages[0].getByIndex(1).Position.Y)
-
self.assertIsNone(document.CurrentSelection)
xEditWin = xImpressDoc.getChild("impress_win")
xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+ with self.ui_test.execute_dialog_through_command(".uno:Size") as xDialog:
+ self.assertEqual('25.2', get_state_as_dict(xDialog.getChild('MTR_FLD_WIDTH'))['Value'])
+ self.assertEqual('9.13', get_state_as_dict(xDialog.getChild('MTR_FLD_HEIGHT'))['Value'])
+ self.assertEqual('1.4', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_X'))['Value'])
+ self.assertEqual('3.69', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_Y'))['Value'])
+ self.assertEqual('0', get_state_as_dict(xDialog.getChild('NF_ANGLE'))['Value'])
+
xEditWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "PosSizePropertyPanel"}))
xHorizontalPos = xImpressDoc.getChild("horizontalpos")
@@ -49,10 +51,12 @@ class Tdf82616(UITestCase):
xDrawinglayerObject = xEditWin.getChild("Unnamed Drawinglayer object 1")
xDrawinglayerObject.executeAction("MOVE", mkPropertyValues({"X": "-5000", "Y":"-10000"}))
- self.assertEqual(1400, document.DrawPages[0].getByIndex(0).Position.X)
- self.assertEqual(628, document.DrawPages[0].getByIndex(0).Position.Y)
- self.assertEqual(-3600, document.DrawPages[0].getByIndex(1).Position.X)
- self.assertEqual(-6315, document.DrawPages[0].getByIndex(1).Position.Y)
+ with self.ui_test.execute_dialog_through_command(".uno:Size") as xDialog:
+ self.assertEqual('25.2', get_state_as_dict(xDialog.getChild('MTR_FLD_WIDTH'))['Value'])
+ self.assertEqual('9.13', get_state_as_dict(xDialog.getChild('MTR_FLD_HEIGHT'))['Value'])
+ self.assertEqual('-3.6', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_X'))['Value'])
+ self.assertEqual('-6.32', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_Y'))['Value'])
+ self.assertEqual('0', get_state_as_dict(xDialog.getChild('NF_ANGLE'))['Value'])
# Without the fix in place, this test would have failed with
# AssertionError: '-3.6' != '0'