Squish: Revive testing of Welcome mode

This partly reverts commit a1274c93c8.

Change-Id: I1ba8586ae51a42a2239ee4ae5c8ead2ac880ecfa
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2014-07-22 14:11:12 +02:00
parent d83aa93780
commit 95d22fc972
2 changed files with 17 additions and 5 deletions

View File

@@ -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 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.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.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.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.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'} :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'} :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'} :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'} :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'} :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.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'} :Working Copy_Utils::BaseValidatingLineEdit {container=':Git Repository Clone.Working Copy_QGroupBox' type='Utils::FancyLineEdit' unnamed='1' visible='1'}

View File

@@ -29,6 +29,10 @@
source("../../shared/qtcreator.py") source("../../shared/qtcreator.py")
def canTestQtQuick():
return (squishinfo.major * 0x10000 + squishinfo.minor * 0x100
+ squishinfo.patch) > 0x050100
def main(): def main():
projects = prepareTestExamples() projects = prepareTestExamples()
if not projects: if not projects:
@@ -41,6 +45,8 @@ def main():
mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow") mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow")
test.verify(waitFor("sessionName in str(mainWindow.windowTitle)", 2000), test.verify(waitFor("sessionName in str(mainWindow.windowTitle)", 2000),
"Verifying window title contains created session name.") "Verifying window title contains created session name.")
if not isQt4Build and canTestQtQuick():
checkWelcomePage(sessionName, True)
for project in projects: for project in projects:
openQmakeProject(project, Targets.DESKTOP_480_GCC) openQmakeProject(project, Targets.DESKTOP_480_GCC)
progressBarWait(20000) progressBarWait(20000)
@@ -52,6 +58,9 @@ def main():
switchSession("default") switchSession("default")
test.verify(waitFor("'Qt Creator' == str(mainWindow.windowTitle)", 2000), test.verify(waitFor("'Qt Creator' == str(mainWindow.windowTitle)", 2000),
"Verifying window title is set to default.") "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.") checkNavigator(1, "Verifying that no more project is opened.")
checkOpenDocuments(0, "Verifying whether all files have been closed.") checkOpenDocuments(0, "Verifying whether all files have been closed.")
switchSession(sessionName) switchSession(sessionName)
@@ -106,17 +115,16 @@ def createAndSwitchToSession(toSession):
def checkWelcomePage(sessionName, isCurrent=False): def checkWelcomePage(sessionName, isCurrent=False):
switchViewTo(ViewConstants.WELCOME) switchViewTo(ViewConstants.WELCOME)
mouseClick(waitForObject("{clip='false' container=':Qt Creator_QDeclarativeView' enabled='true'" mouseClick(waitForObject("{container=':WelcomePage.scrollView_ScrollView' text='Projects' "
" text='Develop' type='LinkedText' unnamed='1' visible='true'}"), "type='Button' unnamed='1' visible='true'}"), 5, 5, Qt.LeftButton)
5, 5, 0, Qt.LeftButton) waitForObject("{container=':WelcomePage.scrollView_ScrollView' id='sessionsTitle' "
waitForObject("{clip='false' container=':Qt Creator_QDeclarativeView' enabled='true' "
"text='Sessions' type='Text' unnamed='1' visible='true'}") "text='Sessions' type='Text' unnamed='1' visible='true'}")
if isCurrent: if isCurrent:
sessions = ["default", "%s (current session)" % sessionName] sessions = ["default", "%s (current session)" % sessionName]
else: else:
sessions = ["default (current session)", sessionName] sessions = ["default (current session)", sessionName]
for sessionName in sessions: 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' " "enabled='true' type='LinkedText' "
"unnamed='1' visible='true' text='%s'}" % sessionName), "unnamed='1' visible='true' text='%s'}" % sessionName),
"Verifying session '%s' exists." % sessionName) "Verifying session '%s' exists." % sessionName)