From e3302afd09c5406c9a0a7efd66cea1c79bd644c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Wed, 20 Mar 2024 21:41:31 +0100 Subject: [PATCH] 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 Reviewed-by: --- tests/system/suite_HELP/tst_HELP06/test.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/system/suite_HELP/tst_HELP06/test.py b/tests/system/suite_HELP/tst_HELP06/test.py index ff6d02ce968..623498fc40b 100644 --- a/tests/system/suite_HELP/tst_HELP06/test.py +++ b/tests/system/suite_HELP/tst_HELP06/test.py @@ -36,10 +36,11 @@ def main(): test.warning("It takes more than two seconds to expand the help content tree.") gettingStartedQModelIndex = getQModelIndexStr("text='Getting Started'", manualQModelIndex) 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))) 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): test.fatal("Help page is not opened after ten seconds. Giving up.") invokeMenuItem("File", "Exit") @@ -74,7 +75,7 @@ def main(): sampleQModelIndex = getQModelIndexStr("text='Sample'", ":Qt Creator_Bookmarks_TreeView") folder1QModelIndex = getQModelIndexStr("text='Folder 1'", sampleQModelIndex) folder2QModelIndex = getQModelIndexStr("text='Folder 2'", folder1QModelIndex) - bldRunQModelIndex = getQModelIndexStr("text?='%s'" % textForQtVersion("Building and Running an Example*"), + configQModelIndex = getQModelIndexStr("text?='%s'" % textForQtVersion("%s*" % pageTitle), folder2QModelIndex) newFolderQModelIndex = getQModelIndexStr("text='New Folder'", sampleQModelIndex) manualQModelIndex = getQModelIndexStr("text='%s'" % textForQtVersion("Qt Creator Manual"), @@ -82,16 +83,16 @@ def main(): test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and checkIfObjectExists(folder1QModelIndex, verboseOnFail = True) and checkIfObjectExists(folder2QModelIndex, verboseOnFail = True) and - checkIfObjectExists(bldRunQModelIndex, verboseOnFail = True) and + checkIfObjectExists(configQModelIndex, verboseOnFail = True) and checkIfObjectExists(manualQModelIndex, verboseOnFail = True), "Verifying if all folders and bookmarks are present") mouseClick(waitForObject(":Qt Creator_Bookmarks_TreeView"), 5, 5, 0, Qt.LeftButton) for _ in range(6): type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") - test.verify(textForQtVersion("Building and Running an Example") in getHelpTitle(), + test.verify(textForQtVersion(pageTitle) in getHelpTitle(), "Verifying if first bookmark is opened") - mouseClick(waitForObject(bldRunQModelIndex)) + mouseClick(waitForObject(configQModelIndex)) type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") @@ -114,7 +115,7 @@ def main(): test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and checkIfObjectExists(folder1QModelIndex, 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), "Verifying if folder 1 and folder 2 deleted including their bookmark") # exit