From 506c0685a3b78d3ea3c7eceeec48303e071c41b4 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 8 Sep 2015 12:10:48 +0200 Subject: Squish: Avoid menu problems with Squish 6.0.0 Change-Id: I43219d36f07e2b5636f84f891f94220148f4dd7f Reviewed-by: Christian Stenger --- tests/system/shared/editor_utils.py | 1 + tests/system/shared/utils.py | 1 + tests/system/suite_tools/tst_designer_goto_slot/test.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index 4ba01b058a..2a442d4214 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -345,6 +345,7 @@ def validateSearchResult(expectedCount): # this function invokes context menu and command from it def invokeContextMenuItem(editorArea, command1, command2 = None): ctxtMenu = openContextMenuOnTextCursorPosition(editorArea) + snooze(1) if platform.system() == 'Darwin': activateItem(ctxtMenu, command1) else: diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 1cd77662b9..0f2fbef8bc 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -211,6 +211,7 @@ def invokeMenuItem(menu, item, *subItems): nativeType("") return menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu) + snooze(1) waitFor("menuObject.visible", 1000) activateItem(menuObject) itemObject = waitForObjectItem(objectMap.realName(menuObject), item) diff --git a/tests/system/suite_tools/tst_designer_goto_slot/test.py b/tests/system/suite_tools/tst_designer_goto_slot/test.py index c9ec705c63..e685c31333 100644 --- a/tests/system/suite_tools/tst_designer_goto_slot/test.py +++ b/tests/system/suite_tools/tst_designer_goto_slot/test.py @@ -48,6 +48,7 @@ def main(): for con in connections: selectFromLocator("mainwindow.ui") openContextMenu(waitForObject(con[0]), 5, 5, 0) + snooze(1) # hack for Squish 5/Qt5.2 problems of handling menus on Mac - remove asap if platform.system() == 'Darwin': waitFor("macHackActivateContextMenuItem('Go to slot...', con[0])", 6000) -- cgit v1.2.1