Commit 95d22fc9 authored by Robert Loehning's avatar Robert Loehning

Squish: Revive testing of Welcome mode

This partly reverts commit a1274c93.

Change-Id: I1ba8586ae51a42a2239ee4ae5c8ead2ac880ecfa
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent d83aa937
......@@ -141,6 +141,8 @@
:Qt Creator.Replace All_QToolButton {name='replaceAllButton' text='Replace All' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Replace_QToolButton {name='replaceButton' text='Replace' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.WelcomePageStyledBar_QWindowContainer {aboveWidget=':Qt Creator.WelcomePageStyledBar_Utils::StyledBar' type='QWindowContainer' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.WelcomePageStyledBar_Utils::StyledBar {name='WelcomePageStyledBar' type='Utils::StyledBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.replaceEdit_Utils::FilterLineEdit {name='replaceEdit' type='Utils::FancyLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.splitter_QSplitter {name='splitter' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
......@@ -204,6 +206,8 @@
:Session Manager_ProjectExplorer::Internal::SessionDialog {name='ProjectExplorer__Internal__SessionDialog' type='ProjectExplorer::Internal::SessionDialog' visible='1' windowTitle='Session Manager'}
:Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'}
:User Interface.languageBox_QComboBox {container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'}
:WelcomePage.scrollView_ScrollView {container=':WelcomePageStyledBar.WelcomePage_QQuickView' id='scrollView' type='ScrollView' unnamed='1' visible='true'}
:WelcomePageStyledBar.WelcomePage_QQuickView {container=':Qt Creator.WelcomePageStyledBar_QWindowContainer' name='WelcomePage' type='QQuickView' visible='true'}
:Widget Box_qdesigner_internal::WidgetBoxTreeWidget {container=':*Qt Creator.Widget Box_QDockWidget' type='qdesigner_internal::WidgetBoxTreeWidget' unnamed='1' visible='1'}
:Working Copy.checkoutDirectoryLineEdit_QLineEdit {container=':Git Repository Clone.Working Copy_QGroupBox' name='checkoutDirectoryLineEdit' type='QLineEdit' visible='1'}
:Working Copy_Utils::BaseValidatingLineEdit {container=':Git Repository Clone.Working Copy_QGroupBox' type='Utils::FancyLineEdit' unnamed='1' visible='1'}
......
......@@ -29,6 +29,10 @@
source("../../shared/qtcreator.py")
def canTestQtQuick():
return (squishinfo.major * 0x10000 + squishinfo.minor * 0x100
+ squishinfo.patch) > 0x050100
def main():
projects = prepareTestExamples()
if not projects:
......@@ -41,6 +45,8 @@ def main():
mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow")
test.verify(waitFor("sessionName in str(mainWindow.windowTitle)", 2000),
"Verifying window title contains created session name.")
if not isQt4Build and canTestQtQuick():
checkWelcomePage(sessionName, True)
for project in projects:
openQmakeProject(project, Targets.DESKTOP_480_GCC)
progressBarWait(20000)
......@@ -52,6 +58,9 @@ def main():
switchSession("default")
test.verify(waitFor("'Qt Creator' == str(mainWindow.windowTitle)", 2000),
"Verifying window title is set to default.")
if not isQt4Build and canTestQtQuick():
checkWelcomePage(sessionName, False)
switchViewTo(ViewConstants.EDIT)
checkNavigator(1, "Verifying that no more project is opened.")
checkOpenDocuments(0, "Verifying whether all files have been closed.")
switchSession(sessionName)
......@@ -106,17 +115,16 @@ def createAndSwitchToSession(toSession):
def checkWelcomePage(sessionName, isCurrent=False):
switchViewTo(ViewConstants.WELCOME)
mouseClick(waitForObject("{clip='false' container=':Qt Creator_QDeclarativeView' enabled='true'"
" text='Develop' type='LinkedText' unnamed='1' visible='true'}"),
5, 5, 0, Qt.LeftButton)
waitForObject("{clip='false' container=':Qt Creator_QDeclarativeView' enabled='true' "
mouseClick(waitForObject("{container=':WelcomePage.scrollView_ScrollView' text='Projects' "
"type='Button' unnamed='1' visible='true'}"), 5, 5, Qt.LeftButton)
waitForObject("{container=':WelcomePage.scrollView_ScrollView' id='sessionsTitle' "
"text='Sessions' type='Text' unnamed='1' visible='true'}")
if isCurrent:
sessions = ["default", "%s (current session)" % sessionName]
else:
sessions = ["default (current session)", sessionName]
for sessionName in sessions:
test.verify(object.exists("{clip='false' container=':Qt Creator_QDeclarativeView' "
test.verify(object.exists("{container=':WelcomePage.scrollView_ScrollView' "
"enabled='true' type='LinkedText' "
"unnamed='1' visible='true' text='%s'}" % sessionName),
"Verifying session '%s' exists." % sessionName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment