summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2016-08-19 12:56:03 +0200
committerChristian Stenger <christian.stenger@qt.io>2016-09-05 06:46:25 +0000
commitb252733e631b3f01940221ae3cb6095367c0dfc5 (patch)
treed4f3fbacbe5568320d473ed2d069548fb643cdfd /tests
parent309be8277da3a9248b882786f1a6b759bb3839fa (diff)
downloadqt-creator-b252733e631b3f01940221ae3cb6095367c0dfc5.tar.gz
Squish: Use examples and docs from Qt 5 in suite_WELP
Change-Id: Iddfa426e9c6133bd1f12ec8e119816c2d38ba55a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/suite_WELP/tst_WELP02/test.py10
-rw-r--r--tests/system/suite_WELP/tst_WELP03/test.py21
2 files changed, 10 insertions, 21 deletions
diff --git a/tests/system/suite_WELP/tst_WELP02/test.py b/tests/system/suite_WELP/tst_WELP02/test.py
index 17aacc6497..a4ec0dc516 100644
--- a/tests/system/suite_WELP/tst_WELP02/test.py
+++ b/tests/system/suite_WELP/tst_WELP02/test.py
@@ -38,8 +38,8 @@ def main():
test.log("Welcome mode is not scriptable with this Squish version")
return
# prepare example project
- sourceExample = os.path.join(sdkPath, "Examples", "4.7", "declarative", "animation", "basics",
- "property-animation")
+ sourceExample = os.path.join(Qt5Path.examplesPath(Targets.DESKTOP_561_DEFAULT),
+ "quick", "animation")
if not neededFilePresent(sourceExample):
return
# open Qt Creator
@@ -72,16 +72,16 @@ def main():
checkTypeAndProperties(typePropDet)
# select "Open project" and select a project
- examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro")
+ examplePath = os.path.join(prepareTemplate(sourceExample), "animation.pro")
openQmakeProject(examplePath, fromWelcome = True)
progressBarWait(30000)
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
- " text~='propertyanimation( \(.*\))?' type='QModelIndex'}"),
+ " text~='animation( \(.*\))?' type='QModelIndex'}"),
"Verifying: The project is opened in 'Edit' mode after configuring.")
# go to "Welcome page" again and check if there is an information about recent projects
switchViewTo(ViewConstants.WELCOME)
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False,
- "text='propertyanimation'")) and
+ "text='animation'")) and
checkIfObjectExists(getQmlItem("Text", welcomePage, False,
"text='SampleApp'")),
"Verifying: 'Welcome page' displays information about recently created and "
diff --git a/tests/system/suite_WELP/tst_WELP03/test.py b/tests/system/suite_WELP/tst_WELP03/test.py
index 724397cb9a..0eda18220f 100644
--- a/tests/system/suite_WELP/tst_WELP03/test.py
+++ b/tests/system/suite_WELP/tst_WELP03/test.py
@@ -44,13 +44,12 @@ def main():
if not canTestEmbeddedQtQuick():
test.log("Welcome mode is not scriptable with this Squish version")
return
- global sdkPath
welcomePage = ":Qt Creator.WelcomePage_QQuickWidget"
# open Qt Creator
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
- qchs = [os.path.join(sdkPath, "Documentation", "qt.qch")]
+ qchs = []
for p in Qt5Path.getPaths(Qt5Path.DOCS):
qchs.extend([os.path.join(p, "qtopengl.qch"), os.path.join(p, "qtwidgets.qch")])
addHelpDocumentation(qchs)
@@ -67,13 +66,8 @@ def main():
5, 5, 0, Qt.LeftButton)
test.verify(checkIfObjectExists(getQmlItem("Text", welcomePage, False, "text='Examples'")),
"Verifying: 'Examples' topic is opened and the examples are shown.")
- basePath = "opengl/2dpainting/2dpainting.pro"
- qt4Exmpl = os.path.join(sdkPath, "Examples", "4.7", basePath)
- qt5Exmpls = []
- for p in Qt5Path.getPaths(Qt5Path.EXAMPLES):
- qt5Exmpls.append(os.path.join(p, basePath))
- proFiles = [qt4Exmpl]
- proFiles.extend(qt5Exmpls)
+ proFiles = map(lambda p: os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"),
+ Qt5Path.getPaths(Qt5Path.EXAMPLES))
cleanUpUserFiles(proFiles)
for p in proFiles:
removePackagingDirectory(os.path.dirname(p))
@@ -115,13 +109,8 @@ def main():
# go to "Welcome" page and choose another example
switchViewTo(ViewConstants.WELCOME)
- basePath = "itemviews/addressbook/addressbook.pro"
- qt4Exmpl = os.path.join(sdkPath, "Examples", "4.7", basePath)
- qt5Exmpls = []
- for p in Qt5Path.getPaths(Qt5Path.EXAMPLES):
- qt5Exmpls.append(os.path.join(p, "widgets", basePath))
- proFiles = [qt4Exmpl]
- proFiles.extend(qt5Exmpls)
+ proFiles = map(lambda p: os.path.join(p, "widgets", "itemviews", "addressbook", "addressbook.pro"),
+ Qt5Path.getPaths(Qt5Path.EXAMPLES))
cleanUpUserFiles(proFiles)
for p in proFiles:
removePackagingDirectory(os.path.dirname(p))