summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-04-25 09:25:41 +0200
committerCaolán McNamara <caolanm@redhat.com>2019-04-25 12:31:46 +0200
commit6ff2fd1f986da64e43398e9c66393bb44b29be63 (patch)
tree874410f96a7485aaf14c1f3a1d55443b0f1cfe00 /sw
parente43f2dddc29f2ed2c6ebed104ea69b19a88b168e (diff)
Blind fix for flaky print preview test
I faced the same problem in https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/commit/?id=f631db9e5e83706ed2678fb4db737700dd623a1b Change-Id: I1adcc418e0efa7e77e1dda5b9dccd7c55cb5267f Reviewed-on: https://gerrit.libreoffice.org/71280 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/uitest/writer_tests5/tdf117039.py3
-rw-r--r--sw/qa/uitest/writer_tests5/tdf118540.py3
-rw-r--r--sw/qa/uitest/writer_tests5/tdf121591.py3
3 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests5/tdf117039.py b/sw/qa/uitest/writer_tests5/tdf117039.py
index f2750b35c2a8..9045f71c9f9c 100644
--- a/sw/qa/uitest/writer_tests5/tdf117039.py
+++ b/sw/qa/uitest/writer_tests5/tdf117039.py
@@ -24,6 +24,9 @@ class tdf117039(UITestCase):
document = self.ui_test.get_component()
self.xUITest.executeCommand(".uno:PrintPreview") #open print preview
self.xUITest.executeCommand(".uno:ClosePreview") # close print preview
+
+ self.xUITest.getTopFocusWindow() #Get focus after closing preview
+
#verify
self.assertEqual(document.Text.String[0:22], "Test digital signature")
self.ui_test.close_doc()
diff --git a/sw/qa/uitest/writer_tests5/tdf118540.py b/sw/qa/uitest/writer_tests5/tdf118540.py
index 0e00ad7ec0f3..a7b403d3b750 100644
--- a/sw/qa/uitest/writer_tests5/tdf118540.py
+++ b/sw/qa/uitest/writer_tests5/tdf118540.py
@@ -29,6 +29,9 @@ class tdf118540(UITestCase):
xOkBtn = xDialog.getChild("ok")
xOkBtn.executeAction("CLICK", tuple())
self.xUITest.executeCommand(".uno:ClosePreview") # close print preview
+
+ self.xUITest.getTopFocusWindow() #Get focus after closing preview
+
#verify
self.assertEqual(document.Text.String[0:4], "Test")
self.ui_test.close_doc()
diff --git a/sw/qa/uitest/writer_tests5/tdf121591.py b/sw/qa/uitest/writer_tests5/tdf121591.py
index 04a42eec2ac9..ad61a14eb247 100644
--- a/sw/qa/uitest/writer_tests5/tdf121591.py
+++ b/sw/qa/uitest/writer_tests5/tdf121591.py
@@ -28,6 +28,9 @@ class tdf121591(UITestCase):
#open and close print preview
self.xUITest.executeCommand(".uno:PrintPreview") #open print preview
self.xUITest.executeCommand(".uno:ClosePreview") # close print preview
+
+ self.xUITest.getTopFocusWindow() #Get focus after closing preview
+
#verify nr. of frames
self.assertEqual(document.TextFrames.getCount(), 1)