summaryrefslogtreecommitdiff
path: root/tests/system/suite_QMLS/tst_QMLS04/test.py
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@digia.com>2014-03-24 10:30:52 +0100
committerChristian Stenger <christian.stenger@digia.com>2014-03-25 12:58:04 +0100
commit13468fc1b84438850f0ce9c463bbd8dbed5dc14f (patch)
treea7d5e12c85a98d4b1dc5ecd9a4f299fb09566464 /tests/system/suite_QMLS/tst_QMLS04/test.py
parenta9b53d5085389c650b541ed67d86893c85bcd3bc (diff)
downloadqt-creator-13468fc1b84438850f0ce9c463bbd8dbed5dc14f.tar.gz
Squish: Add workaround for tst_QMLS04
Additionally added user-defined exception to JIRA class for usage inside workaround functions. Change-Id: I1f6c6c269dd93e00f69741af36c4de3324693da9 Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Diffstat (limited to 'tests/system/suite_QMLS/tst_QMLS04/test.py')
-rw-r--r--tests/system/suite_QMLS/tst_QMLS04/test.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/system/suite_QMLS/tst_QMLS04/test.py b/tests/system/suite_QMLS/tst_QMLS04/test.py
index 305c1e9568..123da338d8 100644
--- a/tests/system/suite_QMLS/tst_QMLS04/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS04/test.py
@@ -56,8 +56,8 @@ def main():
test.passes("Refactoring was properly applied in source file")
else:
test.fail("Refactoring of Text to MyComponent failed in source file. Content of editor:\n%s" % codeText)
- myCompTE = "SampleApp.QML.qml.MyComponent\\.qml"
- appeared = False
+ myCompTE = "SampleApp.Resources.qml\\.qrc./.qml/MyComponent\\.qml"
+ filePath = os.path.join(projectDir, "SampleApp", "qml", "MyComponent.qml")
# there should be new QML file generated with name "MyComponent.qml"
try:
waitForObjectItem(":Qt Creator_Utils::NavigationTreeView", myCompTE, 3000)
@@ -65,10 +65,15 @@ def main():
try:
waitForObjectItem(":Qt Creator_Utils::NavigationTreeView", addBranchWildcardToRoot(myCompTE), 1000)
except:
- test.fail("Refactoring failed - file MyComponent.qml was not generated properly in project explorer")
- #save and exit
- invokeMenuItem("File", "Save All")
- invokeMenuItem("File", "Exit")
+ test.xverify(False, "Refactoring failed - file MyComponent.qml was not generated "
+ "properly in project explorer (QTCREATORBUG-11548")
+ try:
+ JIRA.performWorkaroundForBug(11548, JIRA.Bug.CREATOR, projectDir, "SampleApp", filePath)
+ except JIRA.JiraException:
+ #save and exit
+ invokeMenuItem("File", "Save All")
+ invokeMenuItem("File", "Exit")
+ return
test.passes("Refactoring - file MyComponent.qml was generated properly in project explorer")
# open MyComponent.qml file for verification
if not openDocument(myCompTE):
@@ -86,7 +91,6 @@ def main():
#save and exit
invokeMenuItem("File", "Save All")
# check if new file was created in file system
- test.verify(os.path.exists(projectDir + "/SampleApp/qml/MyComponent.qml"),
+ test.verify(os.path.exists(filePath),
"Verifying if MyComponent.qml exists in file system after save")
invokeMenuItem("File", "Exit")
-