forked from qt-creator/qt-creator
Squish: Use global objects.map from inside CCOM
Change-Id: Icc22f595f6c5c9472755e1134b7663dde7bccb86 Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
This commit is contained in:
@@ -40,14 +40,18 @@
|
||||
:QML Debugging_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='QML Debugging'}
|
||||
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
|
||||
:Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
||||
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.ReRun_QToolButton {toolTip='Re-run this run-configuration' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton {occurrence='3' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_CloseButton {type='CloseButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' visible='1' windowTitle?='*Qt Creator'}
|
||||
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::Internal::CPPEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_Issues_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_SystemSettings.Details_Utils::DetailsButton {occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
|
@@ -67,10 +67,8 @@ def checkLastBuild(expectedToFail=False):
|
||||
else:
|
||||
test.fail("Errors: %s | Warnings: %s" % (errors, warnings))
|
||||
# additional stuff - could be removed... or improved :)
|
||||
ensureChecked("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' "
|
||||
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
list=waitForObject("{type='QListView' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}", 20000)
|
||||
ensureChecked(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton")
|
||||
list=waitForObject(":Qt Creator.Issues_QListView", 20000)
|
||||
model = list.model()
|
||||
test.log("Rows inside issues: %d" % model.rowCount())
|
||||
if gotErrors and createTasksFileOnError:
|
||||
@@ -79,10 +77,8 @@ def checkLastBuild(expectedToFail=False):
|
||||
|
||||
# helper function to check the compilation when build wasn't successful
|
||||
def checkCompile():
|
||||
ensureChecked("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='4'}")
|
||||
output = waitForObject("{type='Core::OutputWindow' unnamed='1' visible='1' windowTitle='Compile Output'"
|
||||
" window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
ensureChecked(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton")
|
||||
output = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow", 20000)
|
||||
waitFor("len(str(output.plainText))>0",5000)
|
||||
success = str(output.plainText).endswith("exited normally.")
|
||||
if success:
|
||||
|
@@ -180,8 +180,7 @@ def __startDebugger__(config):
|
||||
|
||||
def __stopDebugger__():
|
||||
clickButton(waitForObject(":Debugger Toolbar.Exit Debugger_QToolButton"))
|
||||
ensureChecked("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}")
|
||||
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
|
||||
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
|
||||
waitFor("'Debugging has finished' in str(output.plainText)", 20000)
|
||||
return __logDebugResult__()
|
||||
|
@@ -213,8 +213,7 @@ def getEditorForFileSuffix(curFile):
|
||||
editor = waitForObject("{type='CppEditor::Internal::CPPEditorWidget' unnamed='1' "
|
||||
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
elif suffix in qmlEditorSuffixes:
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' "
|
||||
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
|
||||
elif suffix in proEditorSuffixes:
|
||||
editor = waitForObject("{type='Qt4ProjectManager::Internal::ProFileEditorWidget' unnamed='1' "
|
||||
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
|
@@ -194,8 +194,7 @@ def invokeMenuItem(menu, item, subItem = None):
|
||||
|
||||
def logApplicationOutput():
|
||||
# make sure application output is shown
|
||||
ensureChecked("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}")
|
||||
ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton")
|
||||
try:
|
||||
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
|
||||
test.log("Application Output:\n%s" % output.plainText)
|
||||
|
@@ -1,12 +0,0 @@
|
||||
:*Qt Creator.DoubleTabWidget_ProjectExplorer::Internal::DoubleTabWidget {name='ProjectExplorer__Internal__DoubleTabWidget' type='ProjectExplorer::Internal::DoubleTabWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='DoubleTabWidget'}
|
||||
:Compile Output - Qt Creator_Core::Internal::OutputPaneToggleButton {occurrence='4' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Issues - Qt Creator_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'}
|
||||
:Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'}
|
||||
:Qt Creator.QtCreator.MenuBar_QMenuBar {name='QtCreator.MenuBar' type='QMenuBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator.scrollArea_QScrollArea {name='scrollArea' type='QScrollArea' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_Core::Internal::MainWindow {type='Core::Internal::MainWindow' unnamed='1' visible='1' windowTitle?='*Qt Creator'}
|
||||
:Qt Creator_QmlJSEditor::QmlJSTextEditorWidget {type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
|
||||
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
|
||||
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
|
@@ -1,10 +1,12 @@
|
||||
AUT=qtcreator
|
||||
CLASS=
|
||||
CLASSPATH=
|
||||
CWD=
|
||||
ENVVARS=envvars
|
||||
HOOK_SUB_PROCESSES=false
|
||||
IMPLICITAUTSTART=0
|
||||
LANGUAGE=Python
|
||||
OBJECTMAP=../objects.map
|
||||
TEST_CASES=tst_CCOM01 tst_CCOM02
|
||||
VERSION=2
|
||||
WRAPPERS=Qt
|
||||
|
@@ -24,7 +24,7 @@ def main():
|
||||
invokeMenuItem("Build", "Build All")
|
||||
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
|
||||
# verify build successful
|
||||
ensureChecked(waitForObject(":Compile Output - Qt Creator_Core::Internal::OutputPaneToggleButton"))
|
||||
ensureChecked(waitForObject(":Qt Creator_CompileOutput_Core::Internal::OutputPaneToggleButton"))
|
||||
compileOutput = waitForObject(":Qt Creator.Compile Output_Core::OutputWindow")
|
||||
if not test.verify(str(compileOutput.plainText).endswith("exited normally."),
|
||||
"Verifying building of existing complex qt application."):
|
||||
|
@@ -21,7 +21,7 @@ def main():
|
||||
# save all to invoke qml parsing
|
||||
invokeMenuItem("File", "Save All")
|
||||
# open issues list view
|
||||
ensureChecked(waitForObject(":Issues - Qt Creator_Core::Internal::OutputPaneToggleButton"))
|
||||
ensureChecked(waitForObject(":Qt Creator_Issues_Core::Internal::OutputPaneToggleButton"))
|
||||
issuesView = waitForObject(":Qt Creator.Issues_QListView")
|
||||
# verify that error is properly reported
|
||||
test.verify(checkSyntaxError(issuesView, ["Syntax error"], True),
|
||||
|
@@ -15,8 +15,7 @@ def main():
|
||||
# wait for parsing to complete
|
||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
|
||||
"sourceFilesRefreshed(QStringList)")
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' "
|
||||
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
|
||||
if placeCursorToLine(editor, "MouseArea.*", True):
|
||||
type(editor, '<Up>')
|
||||
type(editor, '<Return>')
|
||||
|
@@ -34,8 +34,7 @@ def testRenameId():
|
||||
model = navTree.model()
|
||||
files = ["Core.ContextMenu\\.qml", "Core.GridMenu\\.qml", "Core.ListMenu\\.qml", "focus\\.qml"]
|
||||
originalTexts = {}
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
# 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,8 +44,7 @@ def testRenameId():
|
||||
doubleClickFile(navTree, file)
|
||||
# wait until editor content switched to the double-clicked file
|
||||
while formerTxt==editor.plainText:
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
# store content for next round
|
||||
formerTxt = editor.plainText
|
||||
originalTexts.setdefault(file, "%s" % formerTxt)
|
||||
@@ -72,8 +70,7 @@ def testRenameId():
|
||||
doubleClickFile(navTree, file)
|
||||
# wait until editor content switched to double-clicked file
|
||||
while formerTxt==editor.plainText:
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
# store content for next round
|
||||
formerTxt = editor.plainText
|
||||
originalText = originalTexts.get(file).replace("mainView", "renamedView")
|
||||
@@ -83,8 +80,7 @@ def testRenameId():
|
||||
def __invokeFindUsage__(treeView, filename, line, additionalKeyPresses, expectedCount):
|
||||
global searchFinished
|
||||
doubleClickFile(treeView, filename)
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
if not placeCursorToLine(editor, line, True):
|
||||
test.fatal("File seems to have changed... Canceling current test")
|
||||
return
|
||||
@@ -113,8 +109,7 @@ def testHovering():
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
test.log("Testing hovering elements")
|
||||
doubleClickFile(navTree, "focus\\.qml")
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
lines=["FocusScope\s*\{", "Rectangle\s*\{"]
|
||||
if platform.system() == "Darwin":
|
||||
home = "<Ctrl+Left>"
|
||||
@@ -132,8 +127,7 @@ def testHovering():
|
||||
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
|
||||
test.log("Testing hovering properties")
|
||||
doubleClickFile(navTree, "focus\\.qml")
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
lines = ['focus:\s*true', 'color:\s*"black"', 'states:\s*State\s*\{', 'transitions:\s*Transition\s*\{']
|
||||
expectedTypes = ["TextTip", "TextTip", "TextTip", "TextTip"]
|
||||
expectedValues = [
|
||||
@@ -153,16 +147,14 @@ def testHovering():
|
||||
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
|
||||
test.log("Testing hovering expressions")
|
||||
doubleClickFile(navTree, "focus\\.qml")
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
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("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
lines=['Rectangle\s*\{.*color:\s*"#D1DBBD"', 'NumberAnimation\s*\{\s*.*Easing.OutQuint\s*\}']
|
||||
additionalKeyPresses = ["<Left>", "<Left>", "<Left>", "<Left>"]
|
||||
expectedTypes = ["ColorTip", "TextTip"]
|
||||
|
@@ -23,8 +23,7 @@ def prepareQmlFile():
|
||||
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("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget", 20000)
|
||||
for i in range(3):
|
||||
content = "%s" % editor.plainText
|
||||
start = content.find("Text {")
|
||||
@@ -53,11 +52,10 @@ def handleTextChanged(object):
|
||||
|
||||
def testReIndent():
|
||||
global originalText,textHasChanged
|
||||
installLazySignalHandler("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1'}",
|
||||
installLazySignalHandler(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget",
|
||||
"textChanged()", "handleTextChanged")
|
||||
textHasChanged = False
|
||||
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
|
||||
type(editor, "<Ctrl+A>")
|
||||
test.log("calling re-indent")
|
||||
starttime = datetime.utcnow()
|
||||
|
Reference in New Issue
Block a user