summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@digia.com>2014-07-24 13:53:12 +0200
committerChristian Stenger <christian.stenger@digia.com>2014-08-19 07:34:47 +0200
commitad239a766c33e8a3f7b4b788ba16cd408bb6871e (patch)
tree76aa0835490e3933c1551fe8986b41f5b750cae6 /tests
parent742db5115cd58e9f00b6f4a1323dbb5f416d6319 (diff)
downloadqt-creator-ad239a766c33e8a3f7b4b788ba16cd408bb6871e.tar.gz
Squish: Revive WELP04 for Squish 5.1.1+
Change-Id: If357eca07661df58484ea12d22a881d3d6564523 Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/objects.map3
-rw-r--r--tests/system/suite_WELP/tst_WELP04/test.py69
2 files changed, 36 insertions, 36 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map
index e2861281ba..3e52c4ff08 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -124,14 +124,12 @@
:Path.Utils_BaseValidatingLineEdit {container=':qt_tabwidget_stackedwidget_QWidget' name='LineEdit' type='Utils::FancyLineEdit' visible='1'}
:QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'}
:QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'}
-:QWebPage {type='QWebPage' unnamed='1'}
:QmlJSTools::Internal::QmlConsoleEdit {columnIndex='0' container=':DebugModeWidget_QmlJSTools::Internal::QmlConsoleView' rowIndex='0' type='QmlJSTools::Internal::QmlConsoleEdit' unnamed='1' visible='1'}
:Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Analyzer Toolbar_QDockWidget {name='Analyzer Toolbar' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Analyzer Toolbar'}
:Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:Qt Creator.Go to Help Mode_QToolButton {text='Go to Help Mode' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
:Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'}
:Qt Creator.Project.Menu.Folder_QMenu {name='Project.Menu.Folder' type='QMenu' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
@@ -166,7 +164,6 @@
:Qt Creator_Issues_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_ProFileEditorWidget {type='QmakeProjectManager::Internal::ProFileEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_PythonEditor::EditorWidget {type='PythonEditor::Internal::EditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:Qt Creator_QDeclarativeView {type='QDeclarativeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView {type='QmlJSEditor::Internal::QmlJSOutlineTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
diff --git a/tests/system/suite_WELP/tst_WELP04/test.py b/tests/system/suite_WELP/tst_WELP04/test.py
index 753283e867..8cb4cd7b36 100644
--- a/tests/system/suite_WELP/tst_WELP04/test.py
+++ b/tests/system/suite_WELP/tst_WELP04/test.py
@@ -31,47 +31,50 @@ source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
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
# open Qt Creator
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 "Tutorials" topic
- mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False,
+ getStarted = getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False,
+ "text='Get Started Now' id='gettingStartedButton'")
+ if not test.verify(checkIfObjectExists(getStarted),
+ "Verifying: Qt Creator displays Welcome Page with Get Started Now button."):
+ test.fatal("Something's wrong here - leaving test.")
+ invokeMenuItem("File", "Exit")
+ return
+ # select "Tutorials"
+ mouseClick(waitForObject(getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False,
"text='Tutorials'")), 5, 5, 0, Qt.LeftButton)
- mouseClick(waitForObject(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
- "text='Search in Tutorials...'")), 5, 5, 0, Qt.LeftButton)
- searchTutsAndExmpl = getQmlItem("TextInput", ":Qt Creator_QDeclarativeView", False)
- replaceEditorContent(waitForObject(searchTutsAndExmpl), "qwerty")
- test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
+ searchTut = getQmlItem("TextField", ":WelcomePage.scrollView_ScrollView", False,
+ "placeholderText='Search in Tutorials...' id='lineEdit'")
+ mouseClick(waitForObject(searchTut), 5, 5, 0, Qt.LeftButton)
+ replaceEditorContent(waitForObject(searchTut), "qwerty")
+ test.verify(checkIfObjectExists(getQmlItem("Text", ":WelcomePage.scrollView_ScrollView", False,
"text='Tutorials'")) and
- checkIfObjectExists("{clip='true' container=':Qt Creator_QDeclarativeView' "
- "enabled='true' id='captionItem' type='Text' unnamed='1' "
- "visible='true'}", False),
+ checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView",
+ False, "id='delegate' radius='0' caption~='.*'"),
+ False),
"Verifying: 'Tutorials' topic is opened and nothing is shown.")
- replaceEditorContent(waitForObject(searchTutsAndExmpl),
- "building and running an example application")
- bldRunExmpl = getQmlItem("Text", ":Qt Creator_QDeclarativeView", True,
- "text='Building and Running an Example Application'")
- test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Text and Video tutorials are shown.")
+ replaceEditorContent(waitForObject(searchTut), "building and running an example application")
+ bldRunExmpl = getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView", False,
+ "caption='Building and Running an Example Application' "
+ "id='delegate' radius='0'")
+ test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Expected Text tutorial is shown.")
# select a text tutorial
mouseClick(waitForObject(bldRunExmpl), 5, 5, 0, Qt.LeftButton)
- test.verify(checkIfObjectExists(":Qt Creator.Go to Help Mode_QToolButton") and
- checkIfObjectExists(":DebugModeWidget.Debugger Toolbar_QDockWidget", False) and
- checkIfObjectExists(":Qt Creator.Analyzer Toolbar_QDockWidget", False),
- "Verifying: The tutorial is opened and located to the right part. "
- "The view is in 'Edit' mode.")
- # go to "Welcome" page -> "Tutorials" topic again and check the video tutorial link
- switchViewTo(ViewConstants.WELCOME)
- replaceEditorContent(waitForObject(searchTutsAndExmpl), "meet qt quick")
- test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", True,
- "text='Meet Qt Quick'")),
- "Verifying: Link to the video tutorial exists.")
+ test.verify("Building and Running an Example" in
+ str(waitForObject(":Help Widget_Help::Internal::HelpWidget").windowTitle),
+ "Verifying: The tutorial is opened inside Help.")
+ # close help widget again to avoid focus issues
+ sendEvent("QCloseEvent", waitForObject(":Help Widget_Help::Internal::HelpWidget"))
+ # check a demonstration video link
+ replaceEditorContent(waitForObject(searchTut), "embedded linux")
+ test.verify(checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView",
+ False, "id='delegate' radius='0' caption="
+ "'Developing Embedded Linux Applications with Qt'")),
+ "Verifying: Link to the expected demonstration video exists.")
# exit Qt Creator
invokeMenuItem("File", "Exit")