From c6936d9e807b2b2177a52ed92d918a3aa2204af7 Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@nokia.com>
Date: Tue, 6 Dec 2011 19:50:03 +0100
Subject: [PATCH] Squish: Speeding up switching modes by replacing snooze

Change-Id: Ia13a98e7ae27f4c4643d8efd9a7c25b53fad4dd3
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
---
 tests/system/shared/project_explorer.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py
index d479d63a7f8..21350642ec5 100644
--- a/tests/system/shared/project_explorer.py
+++ b/tests/system/shared/project_explorer.py
@@ -7,8 +7,11 @@ def switchViewTo(view):
     tabBar = waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' "
                            "window=':Qt Creator_Core::Internal::MainWindow'}")
     mouseMove(tabBar, 10, 10 + 52 * view)
-    snooze(2)
-    text = str(QToolTip.text())
+    if waitFor("QToolTip.isVisible()", 10000):
+        text = str(QToolTip.text())
+    else:
+        test.warning("Waiting for ToolTip timed out.")
+        text = ""
     pattern = ViewConstants.getToolTipForViewTab(view)
     if re.match(pattern, unicode(text), re.UNICODE):
        test.passes("ToolTip verified")
-- 
GitLab