2012-05-10 10:53:06 +02:00
|
|
|
source("../shared/qmls.py")
|
2012-04-03 14:49:47 +02:00
|
|
|
|
|
|
|
|
def main():
|
2012-05-10 10:53:06 +02:00
|
|
|
editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Text {")
|
|
|
|
|
if not editorArea:
|
2012-04-03 14:49:47 +02:00
|
|
|
return
|
|
|
|
|
# write code with error (C should be lower case)
|
|
|
|
|
testingCodeLine = 'Color : "blue"'
|
|
|
|
|
type(editorArea, "<Return>")
|
|
|
|
|
type(editorArea, testingCodeLine)
|
|
|
|
|
# invoke QML parsing
|
|
|
|
|
invokeMenuItem("Tools", "QML/JS", "Run Checks")
|
|
|
|
|
# verify that error properly reported
|
|
|
|
|
issuesView = waitForObject(":Qt Creator.Issues_QListView")
|
|
|
|
|
test.verify(checkSyntaxError(issuesView, ["invalid property name 'Color'"], True),
|
|
|
|
|
"Verifying if error is properly reported")
|
|
|
|
|
# repair error - go to written line
|
|
|
|
|
placeCursorToLine(editorArea, testingCodeLine)
|
2012-05-25 11:52:01 +02:00
|
|
|
for i in range(14):
|
|
|
|
|
type(editorArea, "<Left>")
|
|
|
|
|
type(editorArea, "<Shift+Right>")
|
2012-04-03 14:49:47 +02:00
|
|
|
type(editorArea, "c")
|
|
|
|
|
# invoke QML parsing
|
|
|
|
|
invokeMenuItem("Tools", "QML/JS", "Run Checks")
|
|
|
|
|
# verify that there is no error/errors cleared
|
|
|
|
|
issuesView = waitForObject(":Qt Creator.Issues_QListView")
|
|
|
|
|
issuesModel = issuesView.model()
|
|
|
|
|
# wait for issues
|
|
|
|
|
test.verify(waitFor("issuesModel.rowCount() == 0", 3000),
|
|
|
|
|
"Verifying if error was properly cleared after code fix")
|
|
|
|
|
#save and exit
|
|
|
|
|
invokeMenuItem("File", "Save All")
|
|
|
|
|
invokeMenuItem("File", "Exit")
|
|
|
|
|
|