forked from qt-creator/qt-creator
SquishTests: Fix welcome page test
Fix path used for the new MinGW Qt. Correctly clean up examples - newer Qt versions use cmake instead of qmake. 'Example' seems to have been removed from the title of the example docs. Change-Id: I6751d9b26a24bf0e53d79a8d4203c8f11bb2e026 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -32,7 +32,10 @@ class Targets:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def isOnlineInstaller(target):
|
def isOnlineInstaller(target):
|
||||||
return target == Targets.DESKTOP_6_2_4
|
onlineInstallerTargets = [Targets.DESKTOP_6_2_4]
|
||||||
|
if os.getenv("SYSTEST_NEW_SETTINGS") == "1":
|
||||||
|
onlineInstallerTargets.append(Targets.DESKTOP_6_7_3_GCC)
|
||||||
|
return target in onlineInstallerTargets
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def availableTargetClasses(ignoreValidity=False):
|
def availableTargetClasses(ignoreValidity=False):
|
||||||
|
@@ -38,8 +38,9 @@ def openExample(examplesLineEdit, input, exampleRegex, exampleName, waitForChild
|
|||||||
mouseClick(waitForObjectItem(listView, str(example.text)))
|
mouseClick(waitForObjectItem(listView, str(example.text)))
|
||||||
handlePackagingMessageBoxes()
|
handlePackagingMessageBoxes()
|
||||||
helpWidget = waitForObject(":Help Widget_Help::Internal::HelpWidget")
|
helpWidget = waitForObject(":Help Widget_Help::Internal::HelpWidget")
|
||||||
test.verify(waitFor('exampleName in str(helpWidget.windowTitle)', 5000),
|
if not test.verify(waitFor('exampleName in str(helpWidget.windowTitle)', 5000),
|
||||||
"Verifying: The example application is opened inside Help.")
|
"Verifying: The example application is opened inside Help."):
|
||||||
|
test.log("%s vs %s" % (str(helpWidget.windowTitle), exampleName))
|
||||||
sendEvent("QCloseEvent", helpWidget)
|
sendEvent("QCloseEvent", helpWidget)
|
||||||
# assume the correct kit is selected, hit Configure Project
|
# assume the correct kit is selected, hit Configure Project
|
||||||
clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton"))
|
clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton"))
|
||||||
@@ -80,8 +81,10 @@ def main():
|
|||||||
example = findExampleOrTutorial(listView, ".*", True)
|
example = findExampleOrTutorial(listView, ".*", True)
|
||||||
test.verify(example is None, "Verifying: No example is shown.")
|
test.verify(example is None, "Verifying: No example is shown.")
|
||||||
|
|
||||||
proFiles = [os.path.join(p, "opengl", "2dpainting", "2dpainting.pro")
|
proFiles = []
|
||||||
for p in QtPath.getPaths(QtPath.EXAMPLES)]
|
for p in QtPath.getPaths(QtPath.EXAMPLES):
|
||||||
|
proFiles.append(os.path.join(p, "opengl", "2dpainting", "2dpainting.pro"))
|
||||||
|
proFiles.append(os.path.join(p, "opengl", "2dpainting", "CMakeLists.txt"))
|
||||||
cleanUpUserFiles(proFiles)
|
cleanUpUserFiles(proFiles)
|
||||||
|
|
||||||
example = openExample(examplesLineEdit, "2d painting", "2D Painting.*", "2D Painting Example")
|
example = openExample(examplesLineEdit, "2d painting", "2D Painting.*", "2D Painting Example")
|
||||||
@@ -97,12 +100,16 @@ def main():
|
|||||||
|
|
||||||
# go to "Welcome" page and choose another example
|
# go to "Welcome" page and choose another example
|
||||||
switchViewTo(ViewConstants.WELCOME)
|
switchViewTo(ViewConstants.WELCOME)
|
||||||
proFiles = [os.path.join(p, "widgets", "itemviews", "addressbook", "addressbook.pro")
|
|
||||||
for p in QtPath.getPaths(QtPath.EXAMPLES)]
|
proFiles = []
|
||||||
|
for p in QtPath.getPaths(QtPath.EXAMPLES):
|
||||||
|
proFiles.append(os.path.join(p, "widgets", "itemviews", "addressbook", "addressbook.pro"))
|
||||||
|
proFiles.append(os.path.join(p, "widgets", "itemviews", "addressbook", "CMakeLists.txt"))
|
||||||
|
|
||||||
cleanUpUserFiles(proFiles)
|
cleanUpUserFiles(proFiles)
|
||||||
examplesLineEdit = waitForObject(search %(expect[1][0], expect[1][1]))
|
examplesLineEdit = waitForObject(search %(expect[1][0], expect[1][1]))
|
||||||
example = openExample(examplesLineEdit, "address book", "(0000 )?Address Book.*",
|
example = openExample(examplesLineEdit, "address book", "(0000 )?Address Book.*",
|
||||||
"Address Book Example", 3)
|
"Address Book ", 3)
|
||||||
if example is not None:
|
if example is not None:
|
||||||
# close second example application
|
# close second example application
|
||||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||||
|
Reference in New Issue
Block a user