diff options
author | Christian Stenger <christian.stenger@qt.io> | 2017-08-03 15:21:05 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2017-08-07 10:05:53 +0000 |
commit | d93af8c90f133354cffd65bfffc4d23f9e60a14c (patch) | |
tree | f12f6d4348a1f51465beed359076e3f4e38cc2a6 | |
parent | 3d25d2d96c49d2c9225aecf674f643ee34bd005b (diff) | |
download | qt-creator-d93af8c90f133354cffd65bfffc4d23f9e60a14c.tar.gz |
Squish: Add special menu handling for macOS
When sub menus are going to get triggered the mouse
interaction done by Squish might close the sub menu
with the mouse click - avoid this by explicitly
setting the mouse cursor onto the item before
clicking it.
Change-Id: Id2afe9823304caac1bd66a423fe4a0ee12993ddd
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
-rw-r--r-- | tests/system/shared/editor_utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index 32200de040..51b2fdf4d9 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -344,7 +344,10 @@ def validateSearchResult(expectedCount): def invokeContextMenuItem(editorArea, command1, command2 = None): ctxtMenu = openContextMenuOnTextCursorPosition(editorArea) snooze(1) - activateItem(waitForObjectItem(objectMap.realName(ctxtMenu), command1, 2000)) + item1 = waitForObjectItem(objectMap.realName(ctxtMenu), command1, 2000) + if command2 and platform.system() == 'Darwin': + mouseMove(item1) + activateItem(item1) if command2: activateItem(waitForObjectItem("{title='%s' type='QMenu' visible='1' window=%s}" % (command1, objectMap.realName(ctxtMenu)), command2, 2000)) |