sd/qa/uitest/impress_tests2/tdf148620.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 51d2e734099e5c5c56393ef9f08007a7df441794
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Aug 24 08:48:52 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Aug 24 10:52:18 2022 +0200

    try and make test_Tdf148620 more reliable
    
    Change-Id: I11ec949cb82ebaaa225afbbc154f574fc56c0d62
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138753
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/qa/uitest/impress_tests2/tdf148620.py 
b/sd/qa/uitest/impress_tests2/tdf148620.py
index a703d722d8dd..f52284fbaf2c 100644
--- a/sd/qa/uitest/impress_tests2/tdf148620.py
+++ b/sd/qa/uitest/impress_tests2/tdf148620.py
@@ -40,38 +40,50 @@ class Tdf148620(UITestCase):
 
             self.assertEqual("One\nTwo\nThree\nFour\nFive\nsix", 
document.DrawPages[0].getByIndex(1).String)
 
+            xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+
             xArgs = mkPropertyValues({"KeyModifier": 0})
             self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nThree\nFour\nsix\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nThree\nsix\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nsix\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nsix\nTwo\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineUp", xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("six\nOne\nTwo\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+            xToolkit.processEventsToIdle()
 
             # Without the fix in place, this test would have failed with
             # AssertionError: 'One\nsix\nTwo\nThree\nFour\nFive' != 
'One\nTwo\nsix\nThree\nFour\nFive'
             self.assertEqual("One\nsix\nTwo\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nsix\nThree\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nThree\nsix\nFour\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nThree\nFour\nsix\nFive", 
document.DrawPages[0].getByIndex(1).String)
 
             self.xUITest.executeCommandWithParameters(".uno:OutlineDown", 
xArgs)
+            xToolkit.processEventsToIdle()
             self.assertEqual("One\nTwo\nThree\nFour\nFive\nsix", 
document.DrawPages[0].getByIndex(1).String)
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:

Reply via email to