aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2023-03-20 16:04:45 +0100
committerRobert Löhning <robert.loehning@qt.io>2023-03-20 16:07:58 +0000
commitcb31c6c0b45a73a524866c2095ddf11498c1c76a (patch)
tree12cfd9809a0313793b614f4a8cc5166e35ef7219
parente35ca21221505c76ddd9dc2fc012656e58be68ea (diff)
Squish: Handle delayed initialization of Qt VS Tools
When opening the "Qt VS Tools" menu very quickly, it might still show a dummy entry and won't update. In this situation close and open the menu until it shows proper content. Change-Id: I3aaab5d297c3fea545b04adb902b3190cc978ce4 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r--Tests/system/shared/globalnames.py1
-rw-r--r--Tests/system/shared/utils.py9
2 files changed, 8 insertions, 2 deletions
diff --git a/Tests/system/shared/globalnames.py b/Tests/system/shared/globalnames.py
index a5dd8784..e2cebb95 100644
--- a/Tests/system/shared/globalnames.py
+++ b/Tests/system/shared/globalnames.py
@@ -17,3 +17,4 @@ extensions_MenuItem = {"container": microsoft_Visual_Studio_MenuBar, "text": "Ex
msvs_Skip_this_for_now_Button = {"container": microsoft_Visual_Studio_Window, "text": "Skip this for now.", "type": "Button"}
msvs_Start_Visual_Studio_Button = {"container": microsoft_Visual_Studio_Window, "text": "Start Visual Studio", "type": "Button"}
msvs_Not_now_maybe_later_Label = {"container": microsoft_Visual_Studio_Window, "text": "Not now, maybe later.", "type": "Label"}
+Initializing_MenuItem = {"text": RegularExpression(".*Initializing...$"), "type": "MenuItem"}
diff --git a/Tests/system/shared/utils.py b/Tests/system/shared/utils.py
index 079407a4..aa7bb555 100644
--- a/Tests/system/shared/utils.py
+++ b/Tests/system/shared/utils.py
@@ -39,8 +39,13 @@ def startAppGetVersion(waitForInitialDialogs=False):
def openVsToolsMenu(version):
- mouseClick(waitForObject(globalnames.extensions_MenuItem))
- mouseClick(waitForObject(globalnames.pART_Popup_Qt_VS_Tools_MenuItem, 5000))
+ while True:
+ mouseClick(waitForObject(globalnames.extensions_MenuItem))
+ mouseClick(waitForObject(globalnames.pART_Popup_Qt_VS_Tools_MenuItem, 5000))
+ if not object.exists(globalnames.Initializing_MenuItem):
+ break
+ mouseClick(waitForObject(globalnames.extensions_MenuItem)) # close menu
+ snooze(4)
def closeMainWindow():