diff options
author | Robert Loehning <robert.loehning@qt.io> | 2019-10-31 17:40:16 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2019-11-05 05:42:53 +0000 |
commit | cf3772ca77e4687ee0d7d183a17f6cc9cea28dbc (patch) | |
tree | c062091c91bbfa5debd1881c31ba41b6980c5a5f /tests/system/shared | |
parent | 096147d96de2a3a8825602123c1107d14407942f (diff) |
Squish: Update testing ProjectWelcomePage
Used by tst_session_handling and tst_WELP02.
Change-Id: I28bdececac39719372834c373f82ac9e99beb613
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests/system/shared')
-rw-r--r-- | tests/system/shared/project.py | 8 | ||||
-rw-r--r-- | tests/system/shared/welcome.py | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 193ef324af..4ad7889cb7 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -31,9 +31,9 @@ def openQbsProject(projectPath): def openQmakeProject(projectPath, targets=Targets.desktopTargetClasses(), fromWelcome=False): cleanUpUserFiles(projectPath) if fromWelcome: - wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton('Open Project') + wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton('Open') if not all((wsButtonFrame, wsButtonLabel)): - test.fatal("Could not find 'Open Project' button on Welcome Page.") + test.fatal("Could not find 'Open' button on Welcome Page.") return [] mouseClick(wsButtonLabel) else: @@ -79,9 +79,9 @@ def openCmakeProject(projectPath, buildDir): # this list can be used in __chooseTargets__() def __createProjectOrFileSelectType__(category, template, fromWelcome = False, isProject=True): if fromWelcome: - wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton("New Project") + wsButtonFrame, wsButtonLabel = getWelcomeScreenMainButton("New") if not all((wsButtonFrame, wsButtonLabel)): - test.fatal("Could not find 'New Project' button on Welcome Page") + test.fatal("Could not find 'New' button on Welcome Page") return [] mouseClick(wsButtonLabel) else: diff --git a/tests/system/shared/welcome.py b/tests/system/shared/welcome.py index f6338a91fa..86f773e275 100644 --- a/tests/system/shared/welcome.py +++ b/tests/system/shared/welcome.py @@ -46,16 +46,14 @@ def getWelcomeScreenSideBarButton(buttonLabel, isUrlButton = False): return __getWelcomeScreenButtonHelper__(buttonLabel, sideBar, isUrlButton) def getWelcomeScreenMainButton(buttonLabel): - stackedWidget = waitForObject("{type='QStackedWidget' name='WelcomeScreenStackedWidget' " - "window=':Qt Creator_Core::Internal::MainWindow'}") + stackedWidget = waitForObject(":Qt Creator.WelcomeScreenStackedWidget") currentStackWidget = stackedWidget.currentWidget() return __getWelcomeScreenButtonHelper__(buttonLabel, currentStackWidget) def getWelcomeTreeView(treeViewLabel): try: - return waitForObject("{aboveWidget={text='%s' type='QLabel' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'} " - "type='QTreeView' unnamed='1' visible='1'}" % treeViewLabel) + return waitForObjectExists("{container=':Qt Creator.WelcomeScreenStackedWidget' " + "name='%s' type='QTreeView' visible='1'}" % treeViewLabel) except: return None |