sd/qa/uitest/impress_tests/tdf82616.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
New commits: commit dbf907f6ccbe83ba9e9982a7b6c8fc21b6dbdb37 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Apr 27 15:22:50 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Apr 27 23:43:59 2022 +0200 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 <xiscofa...@libreoffice.org> 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'