sw/qa/uitest/writer_tests4/tdf113284.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit a38a97ff07a4d088bad18a08012973a3344301be Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon May 25 23:56:43 2020 +0200 Commit: Xisco FaulĂ <xiscofa...@libreoffice.org> CommitDate: Tue May 26 15:06:55 2020 +0200 uitest: replace sleep with processEventsToIdle Change-Id: I48798e98718cae11b9ef7902cb48fe2d8ab9c2b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94812 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ <xiscofa...@libreoffice.org> diff --git a/sw/qa/uitest/writer_tests4/tdf113284.py b/sw/qa/uitest/writer_tests4/tdf113284.py index 83494b2a79b1..4a4750b00349 100644 --- a/sw/qa/uitest/writer_tests4/tdf113284.py +++ b/sw/qa/uitest/writer_tests4/tdf113284.py @@ -8,8 +8,6 @@ from libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import get_state_as_dict import org.libreoffice.unotest import pathlib -import time -from uitest.debug import sleep def get_url_for_data_file(file_name): return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() @@ -22,7 +20,9 @@ class tdf113284(UITestCase): xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") - sleep(2) #we need this sleep,because without this is pagecount counted without index. Load index takes time probably. + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.processEventsToIdle() + xPageCount = document.CurrentController.PageCount self.ui_test.execute_dialog_through_command(".uno:GotoPage") xDialog = self.xUITest.getTopFocusWindow() @@ -30,7 +30,7 @@ class tdf113284(UITestCase): xPageText.executeAction("TYPE", mkPropertyValues({"TEXT":str(xPageCount)})) # goto last page xOkBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOkBtn) - xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.processEventsToIdle() self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], str(xPageCount)) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits