Commit 77313fd9 authored by Robert Loehning's avatar Robert Loehning

Squish: Removed pointless explicit timeouts

Change-Id: I21e41fc8d1c26186afe0d18613c764abd065227e
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent fb61be5e
......@@ -68,7 +68,7 @@ def checkLastBuild(expectedToFail=False):
test.fail("Errors: %s | Warnings: %s" % (errors, warnings))
# additional stuff - could be removed... or improved :)
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")
list=waitForObject(":Qt Creator.Issues_QListView", 20000)
list=waitForObject(":Qt Creator.Issues_QListView")
model = list.model()
test.log("Rows inside issues: %d" % model.rowCount())
if gotErrors and createTasksFileOnError:
......@@ -78,7 +78,7 @@ def checkLastBuild(expectedToFail=False):
# helper function to check the compilation when build wasn't successful
def checkCompile():
ensureChecked(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow", 20000)
output = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
waitFor("len(str(output.plainText))>0",5000)
success = str(output.plainText).endswith("exited normally.")
if success:
......@@ -141,7 +141,7 @@ def iterateBuildConfigs(kitCount, filter = ""):
configs = []
for currentKit in range(kitCount):
switchToBuildOrRunSettingsFor(kitCount, currentKit, ProjectSettings.BUILD)
model = waitForObject(":scrollArea.Edit build configuration:_QComboBox", 20000).model()
model = waitForObject(":scrollArea.Edit build configuration:_QComboBox").model()
prog = re.compile(filter)
# for each row in the model, write its data to a list
configNames = dumpItems(model)
......
......@@ -19,7 +19,7 @@ def handleDebuggerWarnings(config):
pass # No warning. Fine.
else:
if "Release" in config and not platform.system() in ("Darwin", "Microsoft", "Windows"):
message = waitForObject("{container=':Qt Creator.DebugModeWidget_QSplitter' name='qt_msgbox_label' type='QLabel' visible='1'}", 20000)
message = waitForObject("{container=':Qt Creator.DebugModeWidget_QSplitter' name='qt_msgbox_label' type='QLabel' visible='1'}")
messageText = str(message.text)
test.verify(messageText.startswith('This does not seem to be a "Debug" build.\nSetting breakpoints by file name and line number may fail.'),
"Got warning: %s" % messageText)
......@@ -27,7 +27,7 @@ def handleDebuggerWarnings(config):
def takeDebuggerLog():
invokeMenuItem("Window", "Views", "Debugger Log")
debuggerLogWindow = waitForObject("{container=':DebugModeWidget.Debugger Log_QDockWidget' type='Debugger::Internal::CombinedPane' unnamed='1' visible='1'}", 20000)
debuggerLogWindow = waitForObject("{container=':DebugModeWidget.Debugger Log_QDockWidget' type='Debugger::Internal::CombinedPane' unnamed='1' visible='1'}")
debuggerLog = str(debuggerLogWindow.plainText)
mouseClick(debuggerLogWindow, 5, 5, 0, Qt.LeftButton)
activateItem(waitForObjectItem(openContextMenuOnTextCursorPosition(debuggerLogWindow),
......@@ -58,7 +58,7 @@ def setBreakpointsForCurrentProject(filesAndLines):
test.fatal("This function only takes a non-empty list/tuple holding dicts.")
return False
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
"window=':Qt Creator_Core::Internal::MainWindow'}")
for current in filesAndLines:
for curFile,curLine in current.iteritems():
fName = __doubleClickFile__(navTree, curFile)
......@@ -180,7 +180,7 @@ def __startDebugger__(config):
def __stopDebugger__():
clickButton(waitForObject(":Debugger Toolbar.Exit Debugger_QToolButton"))
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}")
waitFor("'Debugging has finished' in str(output.plainText)", 20000)
return __logDebugResult__()
......
......@@ -31,7 +31,7 @@ def openQmakeProject(projectPath, targets = QtQuickConstants.Targets.DESKTOP_474
pass
__chooseTargets__(targets)
configureButton = waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'"
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
"window=':Qt Creator_Core::Internal::MainWindow'}")
clickButton(configureButton)
def openCmakeProject(projectPath, buildDir):
......@@ -39,7 +39,7 @@ def openCmakeProject(projectPath, buildDir):
selectFromFileDialog(projectPath)
replaceEditorContent("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'"
"window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}", buildDir)
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
clickButton(waitForObject(":CMake Wizard.Next_QPushButton"))
generatorCombo = waitForObject(":Generator:_QComboBox")
mkspec = __getMkspecFromQmake__("qmake")
test.log("Using mkspec '%s'" % mkspec)
......@@ -56,7 +56,7 @@ def openCmakeProject(projectPath, buildDir):
else:
generatorCombo.setCurrentIndex(index)
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton", 20000))
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton"))
try:
clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
except LookupError:
......@@ -77,22 +77,22 @@ def __createProjectOrFileSelectType__(category, template, fromWelcome = False, i
mouseClick(waitForObject(":CreateProject_QStyleItem"), 5, 5, 0, Qt.LeftButton)
else:
invokeMenuItem("File", "New File or Project...")
categoriesView = waitForObject("{type='QTreeView' name='templateCategoryView'}", 20000)
categoriesView = waitForObject("{type='QTreeView' name='templateCategoryView'}")
if isProject:
clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton)
else:
clickItem(categoriesView, "Files and Classes." + category, 5, 5, 0, Qt.LeftButton)
templatesView = waitForObject("{name='templatesView' type='QListView'}", 20000)
templatesView = waitForObject("{name='templatesView' type='QListView'}")
clickItem(templatesView, template, 5, 5, 0, Qt.LeftButton)
text = waitForObject("{type='QTextBrowser' name='templateDescription' visible='1'}").plainText
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}"))
return __getSupportedPlatforms__(str(text))[0]
def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
directoryEdit = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
directoryEdit = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}")
replaceEditorContent(directoryEdit, path)
projectNameEdit = waitForObject("{name='nameLineEdit' visible='1' "
"type='Utils::ProjectNameValidatingLineEdit'}", 20000)
"type='Utils::ProjectNameValidatingLineEdit'}")
if projectName == None:
projectName = projectNameEdit.text
else:
......@@ -128,7 +128,7 @@ def __createProjectHandleLastPage__(expectedFiles = None):
test.verify(index > lastIndex, "'" + filename + "' found at index " + str(index))
lastIndex = index
selectFromCombo(":addToVersionControlComboBox_QComboBox", "<None>")
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000))
clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}"))
def __verifyFileCreation__(path, expectedFiles):
for filename in expectedFiles:
......@@ -208,13 +208,13 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N
% qtQuickVersion, fromWelcome)
projectName = __createProjectSetNameAndPath__(workingDir, projectName)
if templateFile:
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}")
type(baseLineEd, templateFile)
nextButton = waitForObject(":Next_QPushButton", 20000)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
__chooseTargets__(targets, available)
snooze(1)
nextButton = waitForObject(":Next_QPushButton", 20000)
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
__createProjectHandleLastPage__()
return projectName
......@@ -236,10 +236,10 @@ def createNewQmlExtension(workingDir):
nextButton = waitForObject(":Next_QPushButton")
clickButton(nextButton)
nameLineEd = waitForObject("{buddy={type='QLabel' text='Object Class-name:' unnamed='1' visible='1'} "
"type='QLineEdit' unnamed='1' visible='1'}", 20000)
"type='QLineEdit' unnamed='1' visible='1'}")
replaceEditorContent(nameLineEd, "TestItem")
uriLineEd = waitForObject("{buddy={type='QLabel' text='URI:' unnamed='1' visible='1'} "
"type='QLineEdit' unnamed='1' visible='1'}", 20000)
"type='QLineEdit' unnamed='1' visible='1'}")
replaceEditorContent(uriLineEd, "org.qt-project.test.qmlcomponents")
clickButton(nextButton)
__createProjectHandleLastPage__()
......@@ -247,7 +247,7 @@ def createNewQmlExtension(workingDir):
# parameter components can only be one of the Constants defined in QtQuickConstants.Components
def __chooseComponents__(components=QtQuickConstants.Components.BUILTIN):
rbComponentToChoose = waitForObject("{type='QRadioButton' text='%s' visible='1'}"
% QtQuickConstants.getStringForComponents(components), 20000)
% QtQuickConstants.getStringForComponents(components))
if rbComponentToChoose.checked:
test.passes("Selected QRadioButton is '%s'" % QtQuickConstants.getStringForComponents(components))
else:
......@@ -298,7 +298,7 @@ def runAndCloseApp(withHookInto=False, executable=None, port=None, function=None
overrideInstallLazySignalHandler()
installLazySignalHandler("{type='ProjectExplorer::ApplicationLaucher'}", "processStarted()", "__handleProcessStarted__")
installLazySignalHandler("{type='ProjectExplorer::ApplicationLaucher'}", "processExited(int)", "__handleProcessExited__")
runButton = waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}", 20000)
runButton = waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}")
clickButton(runButton)
if sType != SubprocessType.QT_QUICK_UI:
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)", 300000)
......@@ -358,7 +358,7 @@ def __closeSubprocessByPushingStop__(sType):
def __closeSubprocessByHookingInto__(executable, port, function, sType, userDefType):
global processExited
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}")
if port == None:
test.warning("I need a port number or attaching might fail.")
else:
......
......@@ -41,7 +41,7 @@ def prepareBuildSettings(targetCount, currentTarget, setReleaseBuild=True, disab
else:
chooseThis = "Debug"
editBuildCfg = waitForObject("{leftWidget={text='Edit build configuration:' type='QLabel' "
"unnamed='1' visible='1'} unnamed='1' type='QComboBox' visible='1'}", 20000)
"unnamed='1' visible='1'} unnamed='1' type='QComboBox' visible='1'}")
selectFromCombo(editBuildCfg, chooseThis)
ensureChecked("{name='shadowBuildCheckBox' type='QCheckBox' visible='1'}", not disableShadowBuild)
# get back to the current target
......
......@@ -18,7 +18,7 @@ def deleteDirIfExists(path):
shutil.rmtree(path, True)
def verifyChecked(objectName):
object = waitForObject(objectName, 20000)
object = waitForObject(objectName)
test.compare(object.checked, True)
return object
......@@ -70,7 +70,7 @@ def selectFromLocator(filter, itemName = None):
if itemName == None:
itemName = filter
itemName = itemName.replace(".", "\\.").replace("_", "\\_")
locator = waitForObject(":*Qt Creator_Utils::FilterLineEdit", 20000)
locator = waitForObject(":*Qt Creator_Utils::FilterLineEdit")
mouseClick(locator, 5, 5, 0, Qt.LeftButton)
replaceEditorContent(locator, filter)
# clicking the wanted item
......@@ -196,7 +196,7 @@ def logApplicationOutput():
# make sure application output is shown
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
try:
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}")
test.log("Application Output:\n%s" % output.plainText)
return str(output.plainText)
except:
......
......@@ -31,7 +31,7 @@ def main():
# Rely on code completion for closing bracket
invokeMenuItem("File", "Save All")
selectFromLocator(project + ".pro")
proEditor = waitForObject(":Qt Creator_ProFileEditorWidget", 20000)
proEditor = waitForObject(":Qt Creator_ProFileEditorWidget")
test.verify("CONFIG += console" in str(proEditor.plainText), "Verifying that program is configured with console")
setRunInTerminal(1, 0, False)
......@@ -44,11 +44,11 @@ def main():
test.log("Running application")
runControlFinished = False
clickButton(waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}", 20000))
clickButton(waitForObject("{type='Core::Internal::FancyToolButton' text='Run' visible='1'}"))
waitFor("runControlFinished==True", 20000)
if not runControlFinished:
test.warning("Waiting for runControlFinished timed out")
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}", 20000).plainText)
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output")
......@@ -78,7 +78,7 @@ def main():
else:
test.fatal("Debugger log did not behave as expected. Please check manually.")
switchViewTo(ViewConstants.EDIT)
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}", 20000).plainText)
appOutput = str(waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1'}").plainText)
if not "MSVC" in config:
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
......
......@@ -31,11 +31,11 @@ def testRenameId():
global searchFinished
test.log("Testing rename of id")
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
"window=':Qt Creator_Core::Internal::MainWindow'}")
model = navTree.model()
files = ["Core.ContextMenu\\.qml", "Core.GridMenu\\.qml", "Core.ListMenu\\.qml", "focus\\.qml"]
originalTexts = {}
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
# temporarily store editor content for synchronizing purpose
# usage of formerTxt is done because I couldn't get waitForSignal() to work
# it always stored a different object into the signalObjects map as it looked up afterwards
......@@ -45,7 +45,7 @@ def testRenameId():
doubleClickFile(navTree, file)
# wait until editor content switched to the double-clicked file
while formerTxt==editor.plainText:
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
# store content for next round
formerTxt = editor.plainText
originalTexts.setdefault(file, "%s" % formerTxt)
......@@ -71,7 +71,7 @@ def testRenameId():
doubleClickFile(navTree, file)
# wait until editor content switched to double-clicked file
while formerTxt==editor.plainText:
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
# store content for next round
formerTxt = editor.plainText
originalText = originalTexts.get(file).replace("mainView", "renamedView")
......@@ -81,7 +81,7 @@ def testRenameId():
def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expectedCount):
global searchFinished
doubleClickFile(treeView, filename)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
if not placeCursorToLine(editor, line, True):
test.fatal("File seems to have changed... Canceling current test")
return
......@@ -95,7 +95,7 @@ def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expected
def testFindUsages():
test.log("Testing find usage of an ID")
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
"window=':Qt Creator_Core::Internal::MainWindow'}")
__invokeFindUsage__(navTree, "focus\\.qml", "FocusScope\s*\{", ["<Down>"], 6)
test.log("Testing find usage of a property")
clickButton(waitForObject(":*Qt Creator.Clear_QToolButton"))
......@@ -106,10 +106,10 @@ def testFindUsages():
def testHovering():
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
"window=':Qt Creator_Core::Internal::MainWindow'}")
test.log("Testing hovering elements")
doubleClickFile(navTree, "focus\\.qml")
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
lines=["FocusScope\s*\{", "Rectangle\s*\{"]
if platform.system() == "Darwin":
home = "<Ctrl+Left>"
......@@ -127,7 +127,7 @@ def testHovering():
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
test.log("Testing hovering properties")
doubleClickFile(navTree, "focus\\.qml")
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
lines = ['focus:\s*true', 'color:\s*"black"', 'states:\s*State\s*\{', 'transitions:\s*Transition\s*\{']
expectedTypes = ["TextTip", "TextTip", "TextTip", "TextTip"]
expectedValues = [
......@@ -147,14 +147,14 @@ def testHovering():
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
test.log("Testing hovering expressions")
doubleClickFile(navTree, "focus\\.qml")
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
lines=['color:\s*"black"', 'color:\s*"#3E606F"']
additionalKeyPresses = ["<Left>"]
expectedValues = ["black", "#3E606F"]
expectedTypes = ["ColorTip", "ColorTip"]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues)
doubleClickFile(navTree, "Core.ListMenu\\.qml")
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
lines=['Rectangle\s*\{.*color:\s*"#D1DBBD"', 'NumberAnimation\s*\{\s*.*Easing.OutQuint\s*\}']
additionalKeyPresses = ["<Left>", "<Left>", "<Left>", "<Left>"]
expectedTypes = ["ColorTip", "TextTip"]
......
......@@ -19,11 +19,11 @@ def main():
def prepareQmlFile():
# make sure the QML file is opened
navTree = waitForObject("{type='Utils::NavigationTreeView' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
"window=':Qt Creator_Core::Internal::MainWindow'}")
model = navTree.model()
waitForObjectItem(navTree, "untitled.QML.qml/untitled.main\\.qml")
doubleClickItem(navTree, "untitled.QML.qml/untitled.main\\.qml", 5, 5, 0, Qt.LeftButton)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
for i in range(3):
content = "%s" % editor.plainText
start = content.find("Text {")
......
......@@ -17,7 +17,7 @@ def main():
test.log("Collecting potential project types...")
availableProjectTypes = []
invokeMenuItem("File", "New File or Project...")
categoriesView = waitForObject(":New.templateCategoryView_QTreeView", 20000)
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
catModel = categoriesView.model()
projects = catModel.index(0, 0)
test.compare("Projects", str(projects.data()))
......@@ -29,7 +29,7 @@ def main():
if "Import" in category or "Non-Qt" in category:
continue
clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton)
templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}", 20000)
templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}")
# needed because categoriesView and templatesView using same model
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
template = template.replace(".", "\\.")
......@@ -37,21 +37,21 @@ def main():
if "Qt Quick UI" in template or "Plain C" in template:
continue
availableProjectTypes.append({category:template})
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}", 20000))
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))
for current in availableProjectTypes:
category = current.keys()[0]
template = current.values()[0]
invokeMenuItem("File", "New File or Project...")
categoriesView = waitForObject(":New.templateCategoryView_QTreeView", 20000)
categoriesView = waitForObject(":New.templateCategoryView_QTreeView")
clickItem(categoriesView, "Projects." + category, 5, 5, 0, Qt.LeftButton)
templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}", 20000)
templatesView = waitForObject("{name='templatesView' type='QListView' visible='1'}")
test.log("Verifying '%s' -> '%s'" % (category.replace("\\.", "."), template.replace("\\.", ".")))
textChanged = False
clickItem(templatesView, template, 5, 5, 0, Qt.LeftButton)
waitFor("textChanged", 2000)
text = waitForObject(":frame.templateDescription_QTextBrowser").plainText
displayedPlatforms, requiredVersion = __getSupportedPlatforms__(str(text), True)
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}", 20000))
clickButton(waitForObject("{text='Choose...' type='QPushButton' unnamed='1' visible='1'}"))
# don't check because project could exist
__createProjectSetNameAndPath__(os.path.expanduser("~"), 'untitled', False)
try:
......@@ -60,7 +60,7 @@ def main():
except LookupError:
try:
waitForObject("{text='Select Existing QML file' type='QLabel' visible='1'}", 1000)
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}", 20000)
baseLineEd = waitForObject("{type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'}")
type(baseLineEd, os.path.join(templateDir, qmlFile))
clickButton(waitForObject(":Next_QPushButton"))
except LookupError:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment