summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/navigator
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-10-26 11:40:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-10-26 16:10:29 +0200
commit0446f73d27a0c43de1a2d5e07c9510a287be6af2 (patch)
treece2ff16f0809c5e3aec25c1d177e45156d784b31 /sw/qa/uitest/navigator
parent455a1775ccef305cfb96cc5f67c8ee47b7f3a2ae (diff)
tdf#153519 use new IdleTask::waitUntilIdleDispatched
to wait until the Idle inside sw/ has done populating the navigator tree. Which required (*) moving the code down from test/ to vcl/ to avoid circular dependency issues. (*) adding a call SolarMutexGuard before Application::Yield inside IdleTask::waitUntilIdleDispatched (*) exposing the function to python by adding a method to the XToolkitExperimental UNO API Change-Id: Iee418f7a0beb1f5b53addb7fe25823d61720eb3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/uitest/navigator')
-rw-r--r--sw/qa/uitest/navigator/movechapterupdown.py7
-rw-r--r--sw/qa/uitest/navigator/tdf134960.py7
-rw-r--r--sw/qa/uitest/navigator/tdf137274.py7
-rw-r--r--sw/qa/uitest/navigator/tdf144672.py7
-rw-r--r--sw/qa/uitest/navigator/tdf151051.py7
-rw-r--r--sw/qa/uitest/navigator/tdf154212.py7
6 files changed, 42 insertions, 0 deletions
diff --git a/sw/qa/uitest/navigator/movechapterupdown.py b/sw/qa/uitest/navigator/movechapterupdown.py
index 6bcda9b3d4bb..0b4c7ef5f540 100644
--- a/sw/qa/uitest/navigator/movechapterupdown.py
+++ b/sw/qa/uitest/navigator/movechapterupdown.py
@@ -25,6 +25,13 @@ class movechapterupdown(UITestCase):
# wait until the navigator panel is available
xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+ # See the `m_aUpdateTimer.SetTimeout(200)` (to "avoid flickering of buttons")
+ # in the SwChildWinWrapper ctor in sw/source/uibase/fldui/fldwrap.cxx, where that
+ # m_aUpdateTimer is started by SwChildWinWrapper::ReInitDlg triggered from the
+ # xInsert click above.
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.waitUntilAllIdlesDispatched()
+
# Given the document chapter structure:
# 1. One H1
# 1.1. one_A (H2)
diff --git a/sw/qa/uitest/navigator/tdf134960.py b/sw/qa/uitest/navigator/tdf134960.py
index 8388b63e40f9..d60cc677bcd8 100644
--- a/sw/qa/uitest/navigator/tdf134960.py
+++ b/sw/qa/uitest/navigator/tdf134960.py
@@ -27,6 +27,13 @@ class tdf134960_hyperlinks(UITestCase):
# wait until the navigator panel is available
xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+ # See the `m_aUpdateTimer.SetTimeout(200)` (to "avoid flickering of buttons")
+ # in the SwChildWinWrapper ctor in sw/source/uibase/fldui/fldwrap.cxx, where that
+ # m_aUpdateTimer is started by SwChildWinWrapper::ReInitDlg triggered from the
+ # xInsert click above.
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.waitUntilAllIdlesDispatched()
+
xContentTree = xNavigatorPanel.getChild("contenttree")
xHyperlinks = self.get_item(xContentTree, 'Hyperlinks')
self.assertEqual('Hyperlinks', get_state_as_dict(xHyperlinks)['Text'])
diff --git a/sw/qa/uitest/navigator/tdf137274.py b/sw/qa/uitest/navigator/tdf137274.py
index 5273ddcb2f91..711e8133431a 100644
--- a/sw/qa/uitest/navigator/tdf137274.py
+++ b/sw/qa/uitest/navigator/tdf137274.py
@@ -42,6 +42,13 @@ class tdf137274(UITestCase):
# wait until the navigator panel is available
xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+ # See the `m_aUpdateTimer.SetTimeout(200)` (to "avoid flickering of buttons")
+ # in the SwChildWinWrapper ctor in sw/source/uibase/fldui/fldwrap.cxx, where that
+ # m_aUpdateTimer is started by SwChildWinWrapper::ReInitDlg triggered from the
+ # xInsert click above.
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.waitUntilAllIdlesDispatched()
+
xContentTree = xNavigatorPanel.getChild("contenttree")
xComments = self.get_item(xContentTree, 'Comments')
self.assertEqual('Comments', get_state_as_dict(xComments)['Text'])
diff --git a/sw/qa/uitest/navigator/tdf144672.py b/sw/qa/uitest/navigator/tdf144672.py
index 4bded66dcb08..edbafb616bd7 100644
--- a/sw/qa/uitest/navigator/tdf144672.py
+++ b/sw/qa/uitest/navigator/tdf144672.py
@@ -32,6 +32,13 @@ class tdf144672(UITestCase):
# wait until the navigator panel is available
xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+ # See the `m_aUpdateTimer.SetTimeout(200)` (to "avoid flickering of buttons")
+ # in the SwChildWinWrapper ctor in sw/source/uibase/fldui/fldwrap.cxx, where that
+ # m_aUpdateTimer is started by SwChildWinWrapper::ReInitDlg triggered from the
+ # xInsert click above.
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.waitUntilAllIdlesDispatched()
+
xContentTree = xNavigatorPanel.getChild("contenttree")
xReferences = self.get_item(xContentTree, 'References')
diff --git a/sw/qa/uitest/navigator/tdf151051.py b/sw/qa/uitest/navigator/tdf151051.py
index 1778cc94fe68..03889c7f49fb 100644
--- a/sw/qa/uitest/navigator/tdf151051.py
+++ b/sw/qa/uitest/navigator/tdf151051.py
@@ -25,6 +25,13 @@ class tdf151051(UITestCase):
# wait until the navigator panel is available
xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+ # See the `m_aUpdateTimer.SetTimeout(200)` (to "avoid flickering of buttons")
+ # in the SwChildWinWrapper ctor in sw/source/uibase/fldui/fldwrap.cxx, where that
+ # m_aUpdateTimer is started by SwChildWinWrapper::ReInitDlg triggered from the
+ # xInsert click above.
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.waitUntilAllIdlesDispatched()
+
xContentTree = xNavigatorPanel.getChild("contenttree")
xHeadings = xContentTree.getChild('0')
diff --git a/sw/qa/uitest/navigator/tdf154212.py b/sw/qa/uitest/navigator/tdf154212.py
index 2637780e2f4e..00a39a73b980 100644
--- a/sw/qa/uitest/navigator/tdf154212.py
+++ b/sw/qa/uitest/navigator/tdf154212.py
@@ -25,6 +25,13 @@ class tdf154212(UITestCase):
# wait until the navigator panel is available
xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+ # See the `m_aUpdateTimer.SetTimeout(200)` (to "avoid flickering of buttons")
+ # in the SwChildWinWrapper ctor in sw/source/uibase/fldui/fldwrap.cxx, where that
+ # m_aUpdateTimer is started by SwChildWinWrapper::ReInitDlg triggered from the
+ # xInsert click above.
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.waitUntilAllIdlesDispatched()
+
xNavigatorPanelContentTree = xNavigatorPanel.getChild("contenttree")
xNavigatorPanelContentTreeHeadings = xNavigatorPanelContentTree.getChild('0')