From 47355608dbbacc60bc0c60765ef54c427a8144cc Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 19 Feb 2018 13:50:49 +0100 Subject: [PATCH] Squish: Add workaround for opening qmlprojects Task-number: QTCREATORBUG-19717 Change-Id: I3e3b11785154d5c2c20b68ca0091510d1a77ae04 Reviewed-by: Christian Stenger --- tests/system/shared/workarounds.py | 11 ++++++++++- .../system/suite_debugger/tst_qml_js_console/test.py | 2 ++ tests/system/suite_debugger/tst_qml_locals/test.py | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py index cb1cc0ba845..7ab37d44731 100644 --- a/tests/system/shared/workarounds.py +++ b/tests/system/shared/workarounds.py @@ -255,9 +255,18 @@ class JIRA: # for later lookup which function to call for which bug # ALWAYS update this dict when adding a new function for a workaround! def __initBugDict__(self): - self.__bugs__= {} + self.__bugs__= { + 'QTCREATORBUG-19717':self._workaroundCreator19717_, + } # helper function - will be called if no workaround for the requested bug is deposited def _exitFatal_(self, bugType, number): test.fatal("No workaround found for bug %s-%d" % (bugType, number)) ############### functions that hold workarounds ################################# + + def _workaroundCreator19717_(self, *args): + targetname = Targets.getStringForTarget(Targets.DESKTOP_5_3_1_DEFAULT) + switchViewTo(ViewConstants.PROJECTS) + mouseClick(waitForObjectItem(":Projects.ProjectNavigationTreeView", + "Build & Run." + targetname.replace(".", "\\."))) + switchViewTo(ViewConstants.EDIT) diff --git a/tests/system/suite_debugger/tst_qml_js_console/test.py b/tests/system/suite_debugger/tst_qml_js_console/test.py index 7187fc9ceaa..7c324b6970b 100644 --- a/tests/system/suite_debugger/tst_qml_js_console/test.py +++ b/tests/system/suite_debugger/tst_qml_js_console/test.py @@ -124,6 +124,8 @@ def main(): if not startedWithoutPluginError(): return + JIRA.performWorkaroundForBug(19717) + # if Debug is enabled - 1 valid kit is assigned - real check for this is done in tst_qml_locals fancyDebugButton = waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton") if test.verify(waitFor('fancyDebugButton.enabled', 5000), "Start Debugging is enabled."): diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py index fb6d45c649c..54be9f918a7 100644 --- a/tests/system/suite_debugger/tst_qml_locals/test.py +++ b/tests/system/suite_debugger/tst_qml_locals/test.py @@ -43,6 +43,7 @@ def main(): startApplication('qtcreator' + SettingsPath + ' "%s"' % qmlProjFile) if not startedWithoutPluginError(): return + JIRA.performWorkaroundForBug(19717) waitFor('object.exists(":Qt Creator_Utils::NavigationTreeView")', 10000) fancyConfButton = findObject(":*Qt Creator_Core::Internal::FancyToolButton") fancyRunButton = findObject(":*Qt Creator.Run_Core::Internal::FancyToolButton")