summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-02-08 12:29:17 +0100
committerLászló Németh <nemeth@numbertext.org>2021-02-09 21:00:30 +0100
commit32e4d0907fa6d1fcd82b0762c3f02f4c1ee1dd94 (patch)
tree0880d17c3fbe28e50b94dbd6217befdd6725c4dc /sw
parent1e56cce16bbe07c6e8e900dd4c4d41b1fcd54614 (diff)
tdf#139301 line dash interoperability: fix asynchron UI test
to avoid false alarms during slow testing. Also the test doesn't open the same file n times for testing the n line dash styles now. The problem reported by Stephan Bergmann. See also commit 8cc78b527bf2b7dcaaff73d8f0770f3d324ac839 ("Avoid test_tdf139301 hanging upon failure") and commit commit 183c06fc02a50fb117bb6162e4d6e56cdd34fad1 ("tdf#139301 fix OOXML-compatible preset dash styles"). Change-Id: I4b072f334a59abda373ab3a92f27afafda981145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110574 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/uitest/writer_tests7/tdf139301.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/sw/qa/uitest/writer_tests7/tdf139301.py b/sw/qa/uitest/writer_tests7/tdf139301.py
index caca09fa9281..db48b4d9a5f6 100644
--- a/sw/qa/uitest/writer_tests7/tdf139301.py
+++ b/sw/qa/uitest/writer_tests7/tdf139301.py
@@ -11,15 +11,16 @@ import time
class tdf139301(UITestCase):
def test_tdf139301(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf127166_prstDash_Word97.docx"))
+
styles = ('Long Dash', 'Long Dash Dot', 'Long Dot', 'Double Dash', 'Double Dash Dot', 'Double Dash Dot Dot', 'Dash', 'Dash Dot', 'Dash Dot Dot', 'Dot')
- for i in range(len(styles)):
- writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf127166_prstDash_Word97.docx"))
- xWriterDoc = self.xUITest.getTopFocusWindow()
- xWriterEdit = xWriterDoc.getChild("writer_edit")
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
- for i in range(i+1):
- self.xUITest.executeCommand(".uno:JumpToNextFrame")
+ for i in range(len(styles)):
+ # select next line shape
+ writer_doc.getCurrentController().select(writer_doc.getDrawPage()[i])
# wait for available line style setting
self.ui_test.wait_until_child_is_available(xWriterEdit, 'metricfield')
@@ -34,15 +35,16 @@ class tdf139301(UITestCase):
xLineStyle = xFormatLineDlg.getChild("LB_LINE_STYLE")
time.sleep(1)
- # preset line style
+ # check preset line style
style = get_state_as_dict(xLineStyle)['SelectEntryText']
xOKBtn = xFormatLineDlg.getChild("ok")
self.ui_test.close_dialog_through_button(xOKBtn)
- self.ui_test.close_doc()
-
self.assertEqual(style, styles[i])
+ self.ui_test.close_doc()
+
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: