summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2017-03-01 14:12:24 +0100
committerRobert Loehning <robert.loehning@qt.io>2017-03-01 13:23:58 +0000
commit33162e324802e9e35c07612ffe17219102a97ce2 (patch)
treec2ee98baca4a0662bb7dfc2329baa02c55ce6318
parent2ce4bbc45888caca22df434239cee126977e4c1d (diff)
downloadqt-creator-33162e324802e9e35c07612ffe17219102a97ce2.tar.gz
Squish: Add error handling to tst_HELP06
Change-Id: I448391f10d78b528ff321ef8974ee1c94bcbdc84 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rwxr-xr-xtests/system/suite_HELP/tst_HELP06/test.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/system/suite_HELP/tst_HELP06/test.py b/tests/system/suite_HELP/tst_HELP06/test.py
index ba9941a289..610ebc23fd 100755
--- a/tests/system/suite_HELP/tst_HELP06/test.py
+++ b/tests/system/suite_HELP/tst_HELP06/test.py
@@ -53,11 +53,18 @@ def main():
switchViewTo(ViewConstants.HELP)
manualQModelIndex = getQModelIndexStr("text?='Qt Creator Manual *'",
":Qt Creator_QHelpContentWidget")
- doubleClick(waitForObject(manualQModelIndex), 5, 5, 0, Qt.LeftButton)
+ manualQMIObj = waitForObject(manualQModelIndex)
+ doubleClick(manualQMIObj, 5, 5, 0, Qt.LeftButton)
+ if not waitFor("not manualQMIObj.collapsed", 2000):
+ test.warning("It takes more than two seconds to expand the help content tree.")
mouseClick(waitForObject(getQModelIndexStr("text='Building and Running an Example'",
manualQModelIndex)), 5, 5, 0, Qt.LeftButton)
helpSelector = waitForObject(":Qt Creator_HelpSelector_QComboBox")
- waitFor("str(helpSelector.currentText).startswith('Building and Running an Example')", 10000)
+ pageOpened = "str(helpSelector.currentText).startswith('Building and Running an Example')"
+ if not waitFor(pageOpened, 10000):
+ test.fatal("Help page is not opened after ten seconds. Giving up.")
+ invokeMenuItem("File", "Exit")
+ return
# open bookmarks window
clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton"))
clickButton(waitForObject(":Add Bookmark.ExpandBookmarksList_QToolButton"))