summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-02-21 15:41:47 +0100
committerRobert Loehning <robert.loehning@qt.io>2020-02-24 10:50:34 +0000
commit7eda08f60091eb4369013215c6dca364c66d5948 (patch)
treea5a3ba01904e21490950af20ce60ef5064212c34 /tests
parente525dea898485f5bf46a4068214130b155da5e5e (diff)
downloadqt-creator-7eda08f60091eb4369013215c6dca364c66d5948.tar.gz
Squish: Directly click mode selector
The tooltip doesn't show up on Windows anymore unless you manually move the mouse. The positioning has proven to be stable, so we don't need to double-check using the tooltip anymore. Change-Id: I92400d1fa273d4fb6a011cdf00c3b127c06764d5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/classes.py21
-rw-r--r--tests/system/shared/project_explorer.py13
2 files changed, 0 insertions, 34 deletions
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index c4be96bed8..90bbe4d796 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -85,27 +85,6 @@ class ViewConstants:
# always adjust the following to the highest value of the available ViewConstants when adding new
LAST_AVAILABLE = HELP
- # this function returns a regex of the tooltip of the FancyTabBar elements
- # this is needed because the keyboard shortcut is OS specific
- # if the provided argument does not match any of the ViewConstants it returns None
- @staticmethod
- def getToolTipForViewTab(viewTab):
- if viewTab == ViewConstants.WELCOME:
- toolTip = ur'Switch to <b>Welcome</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
- elif viewTab == ViewConstants.EDIT:
- toolTip = ur'Switch to <b>Edit</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
- elif viewTab == ViewConstants.DESIGN:
- toolTip = ur'Switch to <b>Design</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
- elif viewTab == ViewConstants.DEBUG:
- toolTip = ur'Switch to <b>Debug</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
- elif viewTab == ViewConstants.PROJECTS:
- toolTip = ur'Switch to <b>Projects</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
- elif viewTab == ViewConstants.HELP:
- toolTip = ur'Switch to <b>Help</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
- else:
- return None
- return toolTip % (viewTab + 1)
-
class LibType:
SHARED = 0
STATIC = 1
diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py
index 3a0d51428d..587574ff0a 100644
--- a/tests/system/shared/project_explorer.py
+++ b/tests/system/shared/project_explorer.py
@@ -30,19 +30,6 @@ def switchViewTo(view):
waitFor("not QToolTip.isVisible()", 15000)
if view < ViewConstants.FIRST_AVAILABLE or view > ViewConstants.LAST_AVAILABLE:
return
- tabBar = waitForObject("{name='ModeSelector' type='Core::Internal::FancyTabBar' visible='1' "
- "window=':Qt Creator_Core::Internal::MainWindow'}")
- mouseMove(tabBar, 20, 20 + 52 * view)
- 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")
- else:
- test.warning("ToolTip does not match", "Expected pattern: %s\nGot: %s" % (pattern, text))
mouseClick(waitForObject("{name='ModeSelector' type='Core::Internal::FancyTabBar' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"), 20, 20 + 52 * view, 0, Qt.LeftButton)