summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-06 13:52:58 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-02-07 09:33:40 +0000
commit7355c2ee8a9f0811d1cd3d37fc9dac2ad5f95774 (patch)
treea5fd1f08a00eac447ca2e6b8da00c75cfa947442 /sd
parentca57cee2ae5718378193a9c7050248c63b5fa47e (diff)
uitest: reset value when changing the measurement unit
Otherwise, changing it in one test might affect other tests Use @contextmanager decorator to change it back to default 'Inch' at the end of the test even if the test hits an assert Change-Id: I1e7b35019cd19b490aa619c0a866bb9f93820950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146583 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/uitest/impress_tests/tdf119246.py52
-rw-r--r--sd/qa/uitest/impress_tests/tdf134734.py3
-rw-r--r--sd/qa/uitest/impress_tests/tdf137729.py4
-rw-r--r--sd/qa/uitest/impress_tests/tdf152295.py65
-rw-r--r--sd/qa/uitest/impress_tests/textColumnsDialog.py53
-rw-r--r--sd/qa/uitest/impress_tests2/tdf139511.py34
-rw-r--r--sd/qa/uitest/impress_tests2/tdf82616.py66
7 files changed, 134 insertions, 143 deletions
diff --git a/sd/qa/uitest/impress_tests/tdf119246.py b/sd/qa/uitest/impress_tests/tdf119246.py
index 8ccd057d40c8..5461f714d9ff 100644
--- a/sd/qa/uitest/impress_tests/tdf119246.py
+++ b/sd/qa/uitest/impress_tests/tdf119246.py
@@ -18,31 +18,31 @@ class tdf119246(UITestCase):
def test_tdf119246(self):
with self.ui_test.load_file(get_url_for_data_file("tdf119246.odp")) as document:
- change_measurement_unit(self, "Centimeter")
-
- xImpressDoc = self.xUITest.getTopFocusWindow()
-
- self.assertIsNone(document.CurrentSelection)
-
- xEditWin = xImpressDoc.getChild("impress_win")
- xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"DimensionShape"}))
- self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
-
- with self.ui_test.execute_dialog_through_command(".uno:MeasureAttributes") as xDialog:
- xLineDist = xDialog.getChild('MTR_LINE_DIST')
- xGuideOvergang = xDialog.getChild('MTR_FLD_HELPLINE_OVERHANG')
- xGuideDist = xDialog.getChild('MTR_FLD_HELPLINE_DIST')
- xLeftDist = xDialog.getChild('MTR_FLD_HELPLINE1_LEN')
- xRightDist = xDialog.getChild('MTR_FLD_HELPLINE2_LEN')
- xDecimalPlace = xDialog.getChild('MTR_FLD_DECIMALPLACES')
-
- # Without the fix in place, this test would have failed with
- # AssertionError: '2.80 cm' != '1.00 cm'
- self.assertEqual("2.80 cm", get_state_as_dict(xLineDist)['Text'])
- self.assertEqual("0.20 cm", get_state_as_dict(xGuideOvergang)['Text'])
- self.assertEqual("0.50 cm", get_state_as_dict(xGuideDist)['Text'])
- self.assertEqual("4.00 cm", get_state_as_dict(xLeftDist)['Text'])
- self.assertEqual("-1.40 cm", get_state_as_dict(xRightDist)['Text'])
- self.assertEqual("2", get_state_as_dict(xDecimalPlace)['Text'])
+ with change_measurement_unit(self, "Centimeter"):
+
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+
+ self.assertIsNone(document.CurrentSelection)
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+ xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"DimensionShape"}))
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ with self.ui_test.execute_dialog_through_command(".uno:MeasureAttributes") as xDialog:
+ xLineDist = xDialog.getChild('MTR_LINE_DIST')
+ xGuideOvergang = xDialog.getChild('MTR_FLD_HELPLINE_OVERHANG')
+ xGuideDist = xDialog.getChild('MTR_FLD_HELPLINE_DIST')
+ xLeftDist = xDialog.getChild('MTR_FLD_HELPLINE1_LEN')
+ xRightDist = xDialog.getChild('MTR_FLD_HELPLINE2_LEN')
+ xDecimalPlace = xDialog.getChild('MTR_FLD_DECIMALPLACES')
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '2.80 cm' != '1.00 cm'
+ self.assertEqual("2.80 cm", get_state_as_dict(xLineDist)['Text'])
+ self.assertEqual("0.20 cm", get_state_as_dict(xGuideOvergang)['Text'])
+ self.assertEqual("0.50 cm", get_state_as_dict(xGuideDist)['Text'])
+ self.assertEqual("4.00 cm", get_state_as_dict(xLeftDist)['Text'])
+ self.assertEqual("-1.40 cm", get_state_as_dict(xRightDist)['Text'])
+ self.assertEqual("2", get_state_as_dict(xDecimalPlace)['Text'])
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests/tdf134734.py b/sd/qa/uitest/impress_tests/tdf134734.py
index 8320246272b7..07985e8f6b43 100644
--- a/sd/qa/uitest/impress_tests/tdf134734.py
+++ b/sd/qa/uitest/impress_tests/tdf134734.py
@@ -9,7 +9,6 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, select_pos
-from uitest.uihelper.common import change_measurement_unit
from com.sun.star.drawing.FillStyle import SOLID
@@ -20,8 +19,6 @@ class TestClass(UITestCase):
close = TemplateDialog.getChild("close")
self.ui_test.close_dialog_through_button(close)
- change_measurement_unit(self, "Inch")
-
# set margins and fill color
with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
xTabs = DrawPageDialog.getChild("tabcontrol")
diff --git a/sd/qa/uitest/impress_tests/tdf137729.py b/sd/qa/uitest/impress_tests/tdf137729.py
index fe742e0e1537..4362b056e156 100644
--- a/sd/qa/uitest/impress_tests/tdf137729.py
+++ b/sd/qa/uitest/impress_tests/tdf137729.py
@@ -10,8 +10,6 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import select_pos
from com.sun.star.drawing.HatchStyle import SINGLE
-from uitest.uihelper.common import change_measurement_unit
-
class tdf137729(UITestCase):
@@ -23,8 +21,6 @@ class tdf137729(UITestCase):
xCancelBtn = xTemplateDlg.getChild("close")
self.ui_test.close_dialog_through_button(xCancelBtn)
- change_measurement_unit(self, "Inch")
-
with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as xPageSetupDlg:
tabcontrol = xPageSetupDlg.getChild("tabcontrol")
diff --git a/sd/qa/uitest/impress_tests/tdf152295.py b/sd/qa/uitest/impress_tests/tdf152295.py
index e6994d09ee61..9c0b00719bb7 100644
--- a/sd/qa/uitest/impress_tests/tdf152295.py
+++ b/sd/qa/uitest/impress_tests/tdf152295.py
@@ -14,42 +14,41 @@ from uitest.uihelper.common import change_measurement_unit
class tdf152295(UITestCase):
def test_tdf152295(self):
with self.ui_test.create_doc_in_start_center("impress") as document:
- change_measurement_unit(self, "Centimeter")
TemplateDialog = self.xUITest.getTopFocusWindow()
close = TemplateDialog.getChild("close")
self.ui_test.close_dialog_through_button(close)
- with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
- xTabs = DrawPageDialog.getChild("tabcontrol")
- select_pos(xTabs, "1")
- btnbitmap = DrawPageDialog.getChild("btnbitmap")
- btnbitmap.executeAction("CLICK",tuple())
- width = DrawPageDialog.getChild("width")
- for _ in range(50):
- width.executeAction("UP",tuple())
- height = DrawPageDialog.getChild("height")
- for _ in range(50):
- height.executeAction("UP",tuple())
-
- with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
- xTabs = DrawPageDialog.getChild("tabcontrol")
- select_pos(xTabs, "1")
- btnbitmap = DrawPageDialog.getChild("btnbitmap")
- btnbitmap.executeAction("CLICK",tuple())
-
- with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
- xTabs = DrawPageDialog.getChild("tabcontrol")
- select_pos(xTabs, "1")
- btnbitmap = DrawPageDialog.getChild("btnbitmap")
- btnbitmap.executeAction("CLICK",tuple())
- width = DrawPageDialog.getChild("width")
- height = DrawPageDialog.getChild("height")
-
- # Without the fix in place, this test would have failed with
- # AssertionError: '6.00 cm' != '13.55 cm'
- # AssertionError: '6.00 cm' != '13.55 cm'
- self.assertEqual("6.00 cm", get_state_as_dict(width)['Text'])
- self.assertEqual("6.00 cm", get_state_as_dict(height)['Text'])
-
+ with change_measurement_unit(self, "Centimeter"):
+ with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+ btnbitmap = DrawPageDialog.getChild("btnbitmap")
+ btnbitmap.executeAction("CLICK",tuple())
+ width = DrawPageDialog.getChild("width")
+ for _ in range(50):
+ width.executeAction("UP",tuple())
+ height = DrawPageDialog.getChild("height")
+ for _ in range(50):
+ height.executeAction("UP",tuple())
+
+ with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+ btnbitmap = DrawPageDialog.getChild("btnbitmap")
+ btnbitmap.executeAction("CLICK",tuple())
+
+ with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog:
+ xTabs = DrawPageDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1")
+ btnbitmap = DrawPageDialog.getChild("btnbitmap")
+ btnbitmap.executeAction("CLICK",tuple())
+ width = DrawPageDialog.getChild("width")
+ height = DrawPageDialog.getChild("height")
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '6.00 cm' != '13.55 cm'
+ # AssertionError: '6.00 cm' != '13.55 cm'
+ self.assertEqual("6.00 cm", get_state_as_dict(width)['Text'])
+ self.assertEqual("6.00 cm", get_state_as_dict(height)['Text'])
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests/textColumnsDialog.py b/sd/qa/uitest/impress_tests/textColumnsDialog.py
index 2d13c6a9fb5d..98416f82172a 100644
--- a/sd/qa/uitest/impress_tests/textColumnsDialog.py
+++ b/sd/qa/uitest/impress_tests/textColumnsDialog.py
@@ -21,32 +21,31 @@ class textColumnsDialog(UITestCase):
xCancelBtn = xTemplateDlg.getChild("close")
self.ui_test.close_dialog_through_button(xCancelBtn)
- change_measurement_unit(self, 'Centimeter')
-
- xImpressDoc = self.xUITest.getTopFocusWindow()
-
- xEditWin = xImpressDoc.getChild("impress_win")
- xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
- self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
-
- # Test defaults and set some values
- with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as xDialog:
- xTabs = xDialog.getChild("tabcontrol")
- select_pos(xTabs, "2")
- colNumber = xDialog.getChild('FLD_COL_NUMBER')
- colSpacing = xDialog.getChild('MTR_FLD_COL_SPACING')
- self.assertEqual('1', get_state_as_dict(colNumber)['Text'])
- self.assertEqual('0.00 cm', get_state_as_dict(colSpacing)['Text'])
- colNumber.executeAction("SET", mkPropertyValues({"TEXT": "3"}))
- colSpacing.executeAction("SET", mkPropertyValues({"TEXT": "1.5"}))
-
- # Test that settings persist
- with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as xDialog:
- xTabs = xDialog.getChild("tabcontrol")
- select_pos(xTabs, "2")
- colNumber = xDialog.getChild('FLD_COL_NUMBER')
- colSpacing = xDialog.getChild('MTR_FLD_COL_SPACING')
- self.assertEqual('3', get_state_as_dict(colNumber)['Text'])
- self.assertEqual('1.50 cm', get_state_as_dict(colSpacing)['Text'])
+ with change_measurement_unit(self, 'Centimeter'):
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+ xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ # Test defaults and set some values
+ with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as xDialog:
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "2")
+ colNumber = xDialog.getChild('FLD_COL_NUMBER')
+ colSpacing = xDialog.getChild('MTR_FLD_COL_SPACING')
+ self.assertEqual('1', get_state_as_dict(colNumber)['Text'])
+ self.assertEqual('0.00 cm', get_state_as_dict(colSpacing)['Text'])
+ colNumber.executeAction("SET", mkPropertyValues({"TEXT": "3"}))
+ colSpacing.executeAction("SET", mkPropertyValues({"TEXT": "1.5"}))
+
+ # Test that settings persist
+ with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as xDialog:
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "2")
+ colNumber = xDialog.getChild('FLD_COL_NUMBER')
+ colSpacing = xDialog.getChild('MTR_FLD_COL_SPACING')
+ self.assertEqual('3', get_state_as_dict(colNumber)['Text'])
+ self.assertEqual('1.50 cm', get_state_as_dict(colSpacing)['Text'])
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf139511.py b/sd/qa/uitest/impress_tests2/tdf139511.py
index c20fbc84c666..80410d3dc5b5 100644
--- a/sd/qa/uitest/impress_tests2/tdf139511.py
+++ b/sd/qa/uitest/impress_tests2/tdf139511.py
@@ -19,33 +19,33 @@ class tdf139511(UITestCase):
xCancelBtn = xTemplateDlg.getChild("close")
self.ui_test.close_dialog_through_button(xCancelBtn)
- change_measurement_unit(self, "Centimeter")
+ with change_measurement_unit(self, "Centimeter"):
- self.xUITest.executeCommand(".uno:InsertTable?Columns:short=4&Rows:short=4")
+ self.xUITest.executeCommand(".uno:InsertTable?Columns:short=4&Rows:short=4")
- self.assertEqual(8036, document.DrawPages[0].getByIndex(2).BoundRect.Height)
- self.assertEqual(14136, document.DrawPages[0].getByIndex(2).BoundRect.Width)
+ self.assertEqual(8036, document.DrawPages[0].getByIndex(2).BoundRect.Height)
+ self.assertEqual(14136, document.DrawPages[0].getByIndex(2).BoundRect.Width)
- with self.ui_test.execute_dialog_through_command(".uno:TransformDialog") as xDialog:
+ with self.ui_test.execute_dialog_through_command(".uno:TransformDialog") as xDialog:
- xWidth = xDialog.getChild('MTR_FLD_WIDTH')
- xHeight = xDialog.getChild('MTR_FLD_HEIGHT')
+ xWidth = xDialog.getChild('MTR_FLD_WIDTH')
+ xHeight = xDialog.getChild('MTR_FLD_HEIGHT')
- xWidth.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
- xWidth.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"}))
- xWidth.executeAction("TYPE", mkPropertyValues({"TEXT": "10"}))
+ xWidth.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
+ xWidth.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"}))
+ xWidth.executeAction("TYPE", mkPropertyValues({"TEXT": "10"}))
- xHeight.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
- xHeight.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"}))
- xHeight.executeAction("TYPE", mkPropertyValues({"TEXT": "5"}))
+ xHeight.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
+ xHeight.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"}))
+ xHeight.executeAction("TYPE", mkPropertyValues({"TEXT": "5"}))
- # Without the fix in place, this test would have failed with
- # AssertionError: 5037 != 8036
- self.assertEqual(5037, document.DrawPages[0].getByIndex(2).BoundRect.Height)
- self.assertEqual(10037, document.DrawPages[0].getByIndex(2).BoundRect.Width)
+ # Without the fix in place, this test would have failed with
+ # AssertionError: 5037 != 8036
+ self.assertEqual(5037, document.DrawPages[0].getByIndex(2).BoundRect.Height)
+ self.assertEqual(10037, document.DrawPages[0].getByIndex(2).BoundRect.Width)
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf82616.py b/sd/qa/uitest/impress_tests2/tdf82616.py
index 7f6b1db826f8..134be9bb428f 100644
--- a/sd/qa/uitest/impress_tests2/tdf82616.py
+++ b/sd/qa/uitest/impress_tests2/tdf82616.py
@@ -21,50 +21,50 @@ class Tdf82616(UITestCase):
xCancelBtn = xTemplateDlg.getChild("close")
self.ui_test.close_dialog_through_button(xCancelBtn)
- change_measurement_unit(self, 'Centimeter')
+ with change_measurement_unit(self, 'Centimeter'):
- xImpressDoc = self.xUITest.getTopFocusWindow()
+ xImpressDoc = self.xUITest.getTopFocusWindow()
- self.assertIsNone(document.CurrentSelection)
+ 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())
+ 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'])
+ 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"}))
+ xEditWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "PosSizePropertyPanel"}))
- xHorizontalPos = xImpressDoc.getChild("horizontalpos")
- self.ui_test.wait_until_property_is_updated(xHorizontalPos, "Value", "1.4")
- self.assertEqual("1.4", get_state_as_dict(xHorizontalPos)['Value'])
+ xHorizontalPos = xImpressDoc.getChild("horizontalpos")
+ self.ui_test.wait_until_property_is_updated(xHorizontalPos, "Value", "1.4")
+ self.assertEqual("1.4", get_state_as_dict(xHorizontalPos)['Value'])
- xVerticalPos = xImpressDoc.getChild("verticalpos")
- self.ui_test.wait_until_property_is_updated(xVerticalPos, "Value", "3.69")
- self.assertEqual("3.69", get_state_as_dict(xVerticalPos)['Value'])
+ xVerticalPos = xImpressDoc.getChild("verticalpos")
+ self.ui_test.wait_until_property_is_updated(xVerticalPos, "Value", "3.69")
+ self.assertEqual("3.69", get_state_as_dict(xVerticalPos)['Value'])
- xDrawinglayerObject = xEditWin.getChild("Unnamed Drawinglayer object 1")
- xDrawinglayerObject.executeAction("MOVE", mkPropertyValues({"X": "-5000", "Y":"-10000"}))
+ xDrawinglayerObject = xEditWin.getChild("Unnamed Drawinglayer object 1")
+ xDrawinglayerObject.executeAction("MOVE", mkPropertyValues({"X": "-5000", "Y":"-10000"}))
- 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'])
+ 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'
- self.ui_test.wait_until_property_is_updated(xHorizontalPos, "Value", "-3.6")
- self.assertEqual("-3.6", get_state_as_dict(xHorizontalPos)['Value'])
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '-3.6' != '0'
+ self.ui_test.wait_until_property_is_updated(xHorizontalPos, "Value", "-3.6")
+ self.assertEqual("-3.6", get_state_as_dict(xHorizontalPos)['Value'])
- self.ui_test.wait_until_property_is_updated(xVerticalPos, "Value", "-6.32")
- self.assertEqual("-6.32", get_state_as_dict(xVerticalPos)['Value'])
+ self.ui_test.wait_until_property_is_updated(xVerticalPos, "Value", "-6.32")
+ self.assertEqual("-6.32", get_state_as_dict(xVerticalPos)['Value'])
# vim: set shiftwidth=4 softtabstop=4 expandtab: