aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@digia.com>2014-07-23 16:39:13 +0200
committerChristian Stenger <christian.stenger@digia.com>2014-08-01 12:11:48 +0200
commit5a06e6f903b7608a15b413d100219f18200f1e0a (patch)
treefcfe0abf27521e1d60214fde172231f1ab57cdb4 /tests
parent0cfab4ca43838eb98ffec9412da3a04995c3a958 (diff)
Squish: Revive WELP02 for Squish 5.1.1+
Change-Id: I432494320cbbd4f19e0386a19183d0b9476054ed Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/objects.map4
-rw-r--r--tests/system/suite_WELP/tst_WELP02/test.py70
2 files changed, 40 insertions, 34 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map
index 8bb268b6fd..37429e2a03 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -55,7 +55,7 @@
:Compiler:_QLabel {container=':qt_tabwidget_stackedwidget_QWidget' text='Compiler:' type='QLabel' unnamed='1' visible='1'}
:Core__Internal__GeneralSettings.User Interface_QGroupBox {container=':qt_tabwidget_stackedwidget.Core__Internal__GeneralSettings_QWidget' name='interfaceBox' title='User Interface' type='QGroupBox' visible='1'}
:CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox {container=':qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget' name='groupBox' title='Behavior' type='QGroupBox' visible='1'}
-:CreateProject_QStyleItem {clip='false' container=':Qt Creator_QDeclarativeView' enabled='true' text='Create Project' type='LinkedText' unnamed='1' visible='true'}
+:CreateProject_QStyleItem {clip='false' container=':WelcomePage.scrollView_ScrollView' enabled='true' text='New Project' type='Button' unnamed='1' visible='true'}
:DebugModeWidget.Breakpoints_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.Break' type='QDockWidget' visible='1' windowTitle='Breakpoints'}
:DebugModeWidget.Debugger Log_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.Output' type='QDockWidget' visible='1' windowTitle='Debugger Log'}
:DebugModeWidget.Debugger Toolbar_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger Toolbar' type='QDockWidget' visible='1' windowTitle='Debugger Toolbar'}
@@ -115,7 +115,7 @@
:Open File.File name:_QLabel {name='fileNameLabel' text='File name:' type='QLabel' visible='1' window=':Open File_QFileDialog'}
:Open File_QFileDialog {name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}
:OpenDocuments_Widget {type='Core::Internal::OpenEditorsWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Open Documents'}
-:OpenProject_QStyleItem {clip='false' container=':Qt Creator_QDeclarativeView' enabled='true' text='Open Project' type='LinkedText' unnamed='1' visible='true'}
+:OpenProject_QStyleItem {clip='false' container=':WelcomePage.scrollView_ScrollView' enabled='true' text='Open Project' type='Button' unnamed='1' visible='true'}
:Options.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:Options.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'}
:Options.qt_tabwidget_stackedwidget_QStackedWidget {name='qt_tabwidget_stackedwidget' type='QStackedWidget' visible='1' window=':Options_Core::Internal::SettingsDialog'}
diff --git a/tests/system/suite_WELP/tst_WELP02/test.py b/tests/system/suite_WELP/tst_WELP02/test.py
index 2eb82568e9..e04fdb3163 100644
--- a/tests/system/suite_WELP/tst_WELP02/test.py
+++ b/tests/system/suite_WELP/tst_WELP02/test.py
@@ -30,9 +30,16 @@
source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
+def checkTypeAndProperties(typePropertiesDetails):
+ for (qType, props, detail) in typePropertiesDetails:
+ test.verify(checkIfObjectExists(getQmlItem(qType, ":WelcomePage.scrollView_ScrollView",
+ False, props)),
+ "Verifying: Qt Creator displays %s." % detail)
+
def main():
- test.log("Welcome mode is not scriptable at the moment")
- return
+ if isQt4Build or not canTestEmbeddedQtQuick():
+ test.log("Welcome mode is not available or not scriptable with this Squish version")
+ return
# prepare example project
sourceExample = os.path.join(sdkPath, "Examples", "4.7", "declarative", "animation", "basics",
"property-animation")
@@ -42,47 +49,46 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
- if not test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
- "text='Getting Started'")),
- "Verifying: Qt Creator displays Welcome Page with Getting Started."):
- mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
- "text='Getting Started'")), 5, 5, 0, Qt.LeftButton)
- # select "Develop" topic
- mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
- "text='Develop'")), 5, 5, 0, Qt.LeftButton)
- sessionsText = getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, "text='Sessions'")
- recentProjText = getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
- "text='Recent Projects'")
- test.verify(checkIfObjectExists(sessionsText) and checkIfObjectExists(recentProjText),
- "Verifying: 'Develop' with 'Recently used sessions' and "
- "'Recently used Projects' is being opened.")
- # select "Create Project" and try to create a new project.
- # create Qt Quick application from "Welcome" page -> "Develop" tab
+
+ typePropDet = (("Button", "text='Get Started Now' id='gettingStartedButton'",
+ "Get Started Now button"),
+ ("Text", "text='Sessions' id='sessionsTitle'", "Sessions section"),
+ ("Text", "text='default' id='text'", "default session listed"),
+ ("Text", "text='Recent Projects' id='recentProjectsTitle'", "Projects section"),
+ )
+ checkTypeAndProperties(typePropDet)
+
+ # select "Create Project" and try to create a new project
createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True)
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
" text~='SampleApp( \(.*\))?' type='QModelIndex'}"),
"Verifying: The project is opened in 'Edit' mode after configuring.")
- # go to "Welcome page" -> "Develop" topic again.
+ # go to "Welcome page" again and verify updated information
switchViewTo(ViewConstants.WELCOME)
- test.verify(checkIfObjectExists(sessionsText) and checkIfObjectExists(recentProjText),
- "Verifying: 'Develop' with 'Sessions' and 'Recent Projects' is opened.")
- # select "Open project" and select any project.
- # copy example project to temp directory
+ typePropDet = (("Text", "text='Sessions' id='sessionsTitle'", "Sessions section"),
+ ("Text", "text='default (current session)' id='text'",
+ "default session as current listed"),
+ ("Text", "text='Recent Projects' id='recentProjectsTitle'", "Projects section"),
+ ("LinkedText", "text='SampleApp' id='projectNameText'",
+ "current project listed in projects section")
+ )
+ checkTypeAndProperties(typePropDet)
+
+ # select "Open project" and select a project
examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro")
- # open example project from "Welcome" page -> "Develop" tab
openQmakeProject(examplePath, fromWelcome = True)
progressBarWait(30000)
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
" text~='propertyanimation( \(.*\))?' type='QModelIndex'}"),
"Verifying: The project is opened in 'Edit' mode after configuring.")
- # go to "Welcome page" -> "Develop" again and check if there is an information about
- # recent projects in "Recent Projects".
+ # go to "Welcome page" again and check if there is an information about recent projects
switchViewTo(ViewConstants.WELCOME)
- test.verify(checkIfObjectExists(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
- "text='propertyanimation'")) and
- checkIfObjectExists(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
- "text='SampleApp'")),
- "Verifying: 'Develop' is opened and the recently created and "
- "opened project can be seen in 'Recent Projects'.")
+ test.verify(checkIfObjectExists(getQmlItem("LinkedText", ":WelcomePage.scrollView_ScrollView",
+ False,
+ "text='propertyanimation' id='projectNameText'")) and
+ checkIfObjectExists(getQmlItem("LinkedText", ":WelcomePage.scrollView_ScrollView",
+ False, "text='SampleApp' id='projectNameText'")),
+ "Verifying: 'Welcome page' displays information about recently created and "
+ "opened projects.")
# exit Qt Creator
invokeMenuItem("File", "Exit")