From 533f03f2487bf648537b5995042aa44e91e7093f Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 8 Jul 2024 09:12:27 +0200 Subject: [PATCH] SquishTests: Adapt to doc changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If67606f85b45a9c787cf8cef7fc42721f0be8eaa Reviewed-by: Robert Löhning --- tests/system/suite_HELP/tst_HELP02/test.py | 4 ++-- tests/system/suite_HELP/tst_HELP06/test.py | 13 ++++++------- tests/system/suite_WELP/tst_WELP01/test.py | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/system/suite_HELP/tst_HELP02/test.py b/tests/system/suite_HELP/tst_HELP02/test.py index b6246e4f05e..66ac3c0ea7b 100644 --- a/tests/system/suite_HELP/tst_HELP02/test.py +++ b/tests/system/suite_HELP/tst_HELP02/test.py @@ -37,7 +37,7 @@ def getQtCreatorVersionFromFile(): def checkQtCreatorHelpVersion(expectedVersion): def rightStart(x): - return x.startswith('Qt Creator Manual') + return x.startswith('Qt Creator Documentation') switchViewTo(ViewConstants.HELP) try: @@ -45,7 +45,7 @@ def checkQtCreatorHelpVersion(expectedVersion): waitFor("any(map(rightStart, dumpItems(helpContentWidget.model())))", 10000) items = dumpItems(helpContentWidget.model()) test.compare(next(iter(filter(rightStart, items))), - 'Qt Creator Manual %s' % expectedVersion, + 'Qt Creator Documentation %s' % expectedVersion, 'Verifying whether manual uses expected version.') except: t, v = sys.exc_info()[:2] diff --git a/tests/system/suite_HELP/tst_HELP06/test.py b/tests/system/suite_HELP/tst_HELP06/test.py index 0cdcbb653af..1c32e467d23 100644 --- a/tests/system/suite_HELP/tst_HELP06/test.py +++ b/tests/system/suite_HELP/tst_HELP06/test.py @@ -17,7 +17,7 @@ def invokeContextMenuItemOnBookmarkFolder(view, item, menuItem): "window=':Add Bookmark_BookmarkDialog'}", menuItem)) def textForQtVersion(text): - suffix = "Qt Creator Manual" + suffix = "Qt Creator Documentation" if text != suffix: text += " | " + suffix return text @@ -28,15 +28,14 @@ def main(): return # goto help mode and click on topic switchViewTo(ViewConstants.HELP) - manualQModelIndex = getQModelIndexStr("text?='Qt Creator Manual *'", + manualQModelIndex = getQModelIndexStr("text?='Qt Creator Documentation *'", ":Qt Creator_QHelpContentWidget") 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.") - devQModelIndex = getQModelIndexStr("text='Developing with Qt Creator'", manualQModelIndex) - doubleClick(devQModelIndex) - gettingStartedQModelIndex = getQModelIndexStr("text='Getting Started'", devQModelIndex) + + gettingStartedQModelIndex = getQModelIndexStr("text='Getting Started'", manualQModelIndex) doubleClick(gettingStartedQModelIndex) pageTitle = "Configuring Qt Creator" mouseClick(waitForObject(getQModelIndexStr("text='%s'" % pageTitle, @@ -80,7 +79,7 @@ def main(): configQModelIndex = getQModelIndexStr("text?='%s'" % textForQtVersion("%s*" % pageTitle), folder2QModelIndex) newFolderQModelIndex = getQModelIndexStr("text='New Folder'", sampleQModelIndex) - manualQModelIndex = getQModelIndexStr("text='%s'" % textForQtVersion("Qt Creator Manual"), + manualQModelIndex = getQModelIndexStr("text='%s'" % textForQtVersion("Qt Creator Documentation"), newFolderQModelIndex) test.verify(checkIfObjectExists(sampleQModelIndex, verboseOnFail = True) and checkIfObjectExists(folder1QModelIndex, verboseOnFail = True) and @@ -99,7 +98,7 @@ def main(): type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") type(waitForObject(":Qt Creator_Bookmarks_TreeView"), "") - test.verify(textForQtVersion("Qt Creator Manual") in getHelpTitle(), + test.verify(textForQtVersion("Qt Creator Documentation") in getHelpTitle(), "Verifying if second bookmark is opened") # delete previously created directory clickButton(waitForObject(":Qt Creator.Add Bookmark_QToolButton")) diff --git a/tests/system/suite_WELP/tst_WELP01/test.py b/tests/system/suite_WELP/tst_WELP01/test.py index 8385c33fa96..89ee6dbd1e3 100644 --- a/tests/system/suite_WELP/tst_WELP01/test.py +++ b/tests/system/suite_WELP/tst_WELP01/test.py @@ -75,7 +75,7 @@ def main(): wsButton = getWelcomeScreenSideBarButton(getStarted) if test.verify(object.exists(wsButton), "Verifying: Qt Creator displays Welcome Page with '%s' button." % getStarted): - if clickItemVerifyHelpCombo(wsButton, "Getting Started | Qt Creator Manual", + if clickItemVerifyHelpCombo(wsButton, "Getting Started \| Qt Creator Documentation", "Verifying: Help with Creator Documentation is being opened."): textUrls = {'Online Community':'https://forum.qt.io', @@ -92,7 +92,7 @@ def main(): wsButton = getWelcomeScreenSideBarButton(getStarted) if object.exists(wsButton): mouseClick(wsButton) - qcManualQModelIndexStr = getQModelIndexStr("text~='Qt Creator Manual [0-9.]+'", + qcManualQModelIndexStr = getQModelIndexStr("text~='Qt Creator Documentation [0-9.]+'", ":Qt Creator_QHelpContentWidget") if str(waitForObject(":Qt Creator_HelpSelector_QComboBox").currentText) == "(Untitled)": mouseClick(qcManualQModelIndexStr)