diff options
author | Robert Loehning <robert.loehning@digia.com> | 2014-07-22 14:11:12 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@digia.com> | 2014-07-22 15:03:27 +0200 |
commit | 95d22fc9720aa88b9f7e235ac4fff8e1c8bcf16e (patch) | |
tree | 86f0e16d94169e4ca5bffa617a1d7ae245654803 | |
parent | d83aa937802defcc5cc685abd6d811ac80d5c4a2 (diff) | |
download | qt-creator-95d22fc9720aa88b9f7e235ac4fff8e1c8bcf16e.tar.gz |
Squish: Revive testing of Welcome mode
This partly reverts commit a1274c93c8794eeb56f47d5ea6323377ac7c6975.
Change-Id: I1ba8586ae51a42a2239ee4ae5c8ead2ac880ecfa
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
-rw-r--r-- | tests/system/objects.map | 4 | ||||
-rw-r--r-- | tests/system/suite_general/tst_session_handling/test.py | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map index 34b207c379..8bb268b6fd 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -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'} diff --git a/tests/system/suite_general/tst_session_handling/test.py b/tests/system/suite_general/tst_session_handling/test.py index acbe6864e3..e5ef8cf410 100644 --- a/tests/system/suite_general/tst_session_handling/test.py +++ b/tests/system/suite_general/tst_session_handling/test.py @@ -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) |