forked from qt-creator/qt-creator
SquishTests: Update tst_HELP06
The documentation page "Building and Running an Example" is not listed in "Contents" anymore. Change-Id: I7fdc01707f63d924bf215f398b7c710e62ec41f7 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -36,10 +36,11 @@ def main():
|
|||||||
test.warning("It takes more than two seconds to expand the help content tree.")
|
test.warning("It takes more than two seconds to expand the help content tree.")
|
||||||
gettingStartedQModelIndex = getQModelIndexStr("text='Getting Started'", manualQModelIndex)
|
gettingStartedQModelIndex = getQModelIndexStr("text='Getting Started'", manualQModelIndex)
|
||||||
doubleClick(gettingStartedQModelIndex, 5, 5, 0, Qt.LeftButton)
|
doubleClick(gettingStartedQModelIndex, 5, 5, 0, Qt.LeftButton)
|
||||||
mouseClick(waitForObject(getQModelIndexStr("text='Building and Running an Example'",
|
pageTitle = "Configuring Qt Creator"
|
||||||
|
mouseClick(waitForObject(getQModelIndexStr("text='%s'" % pageTitle,
|
||||||
gettingStartedQModelIndex)))
|
gettingStartedQModelIndex)))
|
||||||
helpSelector = waitForObject(":Qt Creator_HelpSelector_QComboBox")
|
helpSelector = waitForObject(":Qt Creator_HelpSelector_QComboBox")
|
||||||
pageOpened = "str(helpSelector.currentText).startswith('Building and Running an Example')"
|
pageOpened = "str(helpSelector.currentText).startswith('%s')" % pageTitle
|
||||||
if not waitFor(pageOpened, 10000):
|
if not waitFor(pageOpened, 10000):
|
||||||
test.fatal("Help page is not opened after ten seconds. Giving up.")
|
test.fatal("Help page is not opened after ten seconds. Giving up.")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
@@ -74,7 +75,7 @@ def main():
|
|||||||
sampleQModelIndex = getQModelIndexStr("text='Sample'", ":Qt Creator_Bookmarks_TreeView")
|
sampleQModelIndex = getQModelIndexStr("text='Sample'", ":Qt Creator_Bookmarks_TreeView")
|
||||||
folder1QModelIndex = getQModelIndexStr("text='Folder 1'", sampleQModelIndex)
|
folder1QModelIndex = getQModelIndexStr("text='Folder 1'", sampleQModelIndex)
|
||||||
folder2QModelIndex = getQModelIndexStr("text='Folder 2'", folder1QModelIndex)
|
folder2QModelIndex = getQModelIndexStr("text='Folder 2'", folder1QModelIndex)
|
||||||
bldRunQModelIndex = getQModelIndexStr("text?='%s'" % textForQtVersion("Building and Running an Example*"),
|
configQModelIndex = getQModelIndexStr("text?='%s'" % textForQtVersion("%s*" % pageTitle),
|
||||||
folder2QModelIndex)
|
folder2QModelIndex)
|
||||||
newFolderQModelIndex = getQModelIndexStr("text='New Folder'", sampleQModelIndex)
|
newFolderQModelIndex = getQModelIndexStr("text='New Folder'", sampleQModelIndex)
|
||||||
manualQModelIndex = getQModelIndexStr("text='%s'" % textForQtVersion("Qt Creator Manual"),
|
manualQModelIndex = getQModelIndexStr("text='%s'" % textForQtVersion("Qt Creator Manual"),
|
||||||
@@ -82,16 +83,16 @@ def main():
|
|||||||
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
|
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
|
||||||
checkIfObjectExists(folder1QModelIndex, verboseOnFail = True) and
|
checkIfObjectExists(folder1QModelIndex, verboseOnFail = True) and
|
||||||
checkIfObjectExists(folder2QModelIndex, verboseOnFail = True) and
|
checkIfObjectExists(folder2QModelIndex, verboseOnFail = True) and
|
||||||
checkIfObjectExists(bldRunQModelIndex, verboseOnFail = True) and
|
checkIfObjectExists(configQModelIndex, verboseOnFail = True) and
|
||||||
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
|
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
|
||||||
"Verifying if all folders and bookmarks are present")
|
"Verifying if all folders and bookmarks are present")
|
||||||
mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView"), 5, 5, 0, Qt.LeftButton)
|
mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView"), 5, 5, 0, Qt.LeftButton)
|
||||||
for _ in range(6):
|
for _ in range(6):
|
||||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
|
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
|
||||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Return>")
|
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Return>")
|
||||||
test.verify(textForQtVersion("Building and Running an Example") in getHelpTitle(),
|
test.verify(textForQtVersion(pageTitle) in getHelpTitle(),
|
||||||
"Verifying if first bookmark is opened")
|
"Verifying if first bookmark is opened")
|
||||||
mouseClick(waitForObject(bldRunQModelIndex))
|
mouseClick(waitForObject(configQModelIndex))
|
||||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Down>")
|
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Down>")
|
||||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
|
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Right>")
|
||||||
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Down>")
|
type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "<Down>")
|
||||||
@@ -114,7 +115,7 @@ def main():
|
|||||||
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
|
test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and
|
||||||
checkIfObjectExists(folder1QModelIndex, shouldExist = False, verboseOnFail = True) and
|
checkIfObjectExists(folder1QModelIndex, shouldExist = False, verboseOnFail = True) and
|
||||||
checkIfObjectExists(folder2QModelIndex, shouldExist = False, verboseOnFail = True) and
|
checkIfObjectExists(folder2QModelIndex, shouldExist = False, verboseOnFail = True) and
|
||||||
checkIfObjectExists(bldRunQModelIndex, shouldExist = False, verboseOnFail = True) and
|
checkIfObjectExists(configQModelIndex, shouldExist = False, verboseOnFail = True) and
|
||||||
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
|
checkIfObjectExists(manualQModelIndex, verboseOnFail = True),
|
||||||
"Verifying if folder 1 and folder 2 deleted including their bookmark")
|
"Verifying if folder 1 and folder 2 deleted including their bookmark")
|
||||||
# exit
|
# exit
|
||||||
|
Reference in New Issue
Block a user