[Libreoffice-commits] core.git: sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 25 12:43:35 UTC 2020
sw/qa/uitest/writer_tests7/tdf132169.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 39df467cd67ca7798e814d6c57f8bfd6791fc0ef
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon May 25 11:35:59 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon May 25 14:42:52 2020 +0200
uitest: rework test that fails at times
sometimes it fails with
self.assertEqual(get_state_as_dict(xLineMetric)["Text"], "5.0 pt")
AssertionError: '8.8 pt' != '5.0 pt'
- 8.8 pt
+ 5.0 pt
Change-Id: I5287d5ebbd92ef82bd384f609b92fbcfeef7fd44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94778
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sw/qa/uitest/writer_tests7/tdf132169.py b/sw/qa/uitest/writer_tests7/tdf132169.py
index e96cf7250a91..9c884e4051a9 100644
--- a/sw/qa/uitest/writer_tests7/tdf132169.py
+++ b/sw/qa/uitest/writer_tests7/tdf132169.py
@@ -6,7 +6,7 @@
#
from uitest.framework import UITestCase
from uitest.path import get_srcdir_url
-from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import get_state_as_dict, type_text
from libreoffice.uno.propertyvalue import mkPropertyValues
def get_url_for_data_file(file_name):
@@ -42,11 +42,18 @@ class tdf132169(UITestCase):
xLineMetric = xWriterEdit.getChild('metricfield')
self.assertEqual(get_state_as_dict(xLineMetric)["Text"], "0.0 pt")
- props = {"VALUE": "5.0"}
- actionProps = mkPropertyValues(props)
- xLineMetric.executeAction("VALUE", actionProps)
+ #Check changing value from dialog also works
+ self.ui_test.execute_dialog_through_command(".uno:FormatLine")
+ xFormatLineDlg = self.xUITest.getTopFocusWindow()
+ xWidth = xFormatLineDlg.getChild('MTR_FLD_LINE_WIDTH')
+ type_text(xWidth, "4.0")
+ xOKBtn = xFormatLineDlg.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+ self.ui_test.wait_until_property_is_updated(xLineMetric, "Text", "4.0 pt")
+ self.assertEqual(get_state_as_dict(xLineMetric)["Text"], "4.0 pt")
- self.assertEqual(get_state_as_dict(xLineMetric)["Text"], "5.0 pt")
+ xLineMetric.executeAction("UP", tuple())
document = self.ui_test.get_component()
drawPage = document.getDrawPages().getByIndex(0)
More information about the Libreoffice-commits
mailing list