From 34b94d8cd2da2f06020d54319545493c0abfe3f1 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 22 Mar 2022 14:00:36 +0100 Subject: Squish: Update Welcome page test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I447addcba50e932886a8ed5e730a1eab663a2224 Reviewed-by: Robert Löhning --- tests/system/shared/welcome.py | 8 ++++---- tests/system/suite_WELP/tst_WELP01/test.py | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/system/shared/welcome.py b/tests/system/shared/welcome.py index cb11074b87..b69a28b5da 100644 --- a/tests/system/shared/welcome.py +++ b/tests/system/shared/welcome.py @@ -46,10 +46,10 @@ def getWelcomeScreenSideBarButton(buttonLabel, isUrlButton = False): "unnamed='1'}") return __getWelcomeScreenButtonHelper__(buttonLabel, sideBar, isUrlButton) -def getWelcomeScreenMainButton(buttonLabel): - stackedWidget = waitForObject(":Qt Creator.WelcomeScreenStackedWidget") - currentStackWidget = stackedWidget.currentWidget() - return __getWelcomeScreenButtonHelper__(buttonLabel, currentStackWidget) +def getWelcomeScreenBottomButton(buttonLabel): + bottomArea = waitForObject("{type='Welcome::Internal::BottomArea' unnamed='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}") + return __getWelcomeScreenButtonHelper__(buttonLabel, bottomArea, False) def getWelcomeTreeView(treeViewLabel): try: diff --git a/tests/system/suite_WELP/tst_WELP01/test.py b/tests/system/suite_WELP/tst_WELP01/test.py index c3b7c22089..1d8eb312c2 100755 --- a/tests/system/suite_WELP/tst_WELP01/test.py +++ b/tests/system/suite_WELP/tst_WELP01/test.py @@ -25,7 +25,7 @@ source("../../shared/qtcreator.py") -getStarted = 'Get Started Now' +getStarted = 'Get Started' def clickItemVerifyHelpCombo(button, expectedHelpComboRegex, testDetails): global getStarted @@ -41,7 +41,7 @@ def clickItemVerifyHelpCombo(button, expectedHelpComboRegex, testDetails): "Verifying: '%s' button is being displayed." % getStarted) def buttonActive(button): # colors of the default theme for active button on Welcome page - (activeRed, activeGreen, activeBlue) = (64, 65, 66) + (activeRed, activeGreen, activeBlue) = (69, 206, 85) # QPalette::Window (used background color of Welcome page buttons) enumQPaletteWindow = 10 color = button.palette.color(enumQPaletteWindow) @@ -92,8 +92,8 @@ def main(): # select Projects and roughly check this switchToSubMode('Projects') - for button in ['New', 'Open']: - wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton(button) + for button in ['Create Project...', 'Open Project...']: + wsButtonFrame, wsButtonLabel = getWelcomeScreenSideBarButton(button) if test.verify(all((wsButtonFrame, wsButtonLabel)), "Verified whether '%s' button is shown." % button): test.verify(not buttonActive(wsButtonFrame), @@ -111,7 +111,7 @@ def main(): 'User Guide':'qthelp://org.qt-project.qtcreator/doc/index.html' } for text, url in textUrls.items(): - button, label = getWelcomeScreenSideBarButton(text, True) + button, label = getWelcomeScreenBottomButton(text) if test.verify(all((button, label)), "Verifying whether link button (%s) exists." % text): test.compare(str(button.toolTip), url, "Verifying URL for %s" % text) @@ -135,7 +135,7 @@ def main(): switchToSubMode('Examples') test.verify(waitForButtonsState(False, True, False), "Buttons' states have changed.") - expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'", + expect = (("QListView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'", "examples list"), ("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"), ("QComboBox", "currentText~='.*Qt.*'", "Qt version combo box")) @@ -149,7 +149,7 @@ def main(): # select Tutorials and roughly check them switchToSubMode('Tutorials') test.verify(waitForButtonsState(False, False, True), "Buttons' states have changed.") - expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'", + expect = (("QListView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'", "tutorials list"), ("QLineEdit", "placeholderText='Search in Tutorials...'", "tutorials search line edit")) -- cgit v1.2.3