diff options
author | Christian Stenger <christian.stenger@qt.io> | 2020-07-22 09:56:25 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2020-07-22 10:24:11 +0000 |
commit | e17ebc7a6e8daec172c6c508379b2ae3d5e2c557 (patch) | |
tree | 23d321d83fa91e20609c9e8942853b2aa93f3479 /tests | |
parent | aee2094c332f099a44a8f22041551d0aefb459b9 (diff) |
Squish: Stabilize menuVisibleAtEditor() even more
If the machine fails to correctly initialize the desktop
environment we end up with a rather small resolution which
in turn makes the condition useless.
Change-Id: Idcea7f4e2a5dd265442b5c9d98bf42ed7f01c8af
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/shared/editor_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index 52430e7021..db59353883 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -73,8 +73,10 @@ def menuVisibleAtEditor(editor, menuInList): menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500) topLeft = menu.mapToGlobal(QPoint(0, 0)) bottomLeft = menu.mapToGlobal(QPoint(0, menu.height)) + center = menu.mapToGlobal(QPoint(menu.width / 2, menu.height / 2)) success = menu.visible and (widgetContainsPoint(editor, topLeft) - or widgetContainsPoint(editor, bottomLeft)) + or widgetContainsPoint(editor, bottomLeft) + or widgetContainsPoint(editor, center)) if success: menuInList[0] = menu return success |