forked from qt-creator/qt-creator
Squish: Update suite_QMLS
Project template was changed in
b18e084fc0
Change-Id: I89bf518756cd7d7859ffc6e9a56f1aed2e7e435f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -116,23 +116,23 @@ def main():
|
||||
if not startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp"):
|
||||
return
|
||||
# test "color: " suggestion usage with Enter key
|
||||
if not testSuggestionsAuto("Text {", "col", "color:", "<Return>"):
|
||||
if not testSuggestionsAuto("TextEdit {", "col", "color:", "<Return>"):
|
||||
saveAndExit()
|
||||
return
|
||||
# test "color: " suggestion usage with Tab key
|
||||
if not testSuggestionsAuto("Text {", "col", "color:", "<Tab>"):
|
||||
if not testSuggestionsAuto("TextEdit {", "col", "color:", "<Tab>"):
|
||||
saveAndExit()
|
||||
return
|
||||
# test "textChanged: " suggestion - automatic insert, because only one suggestion available
|
||||
shortcutToSuggestions = "<Ctrl+Space>"
|
||||
if platform.system() == "Darwin":
|
||||
shortcutToSuggestions = "<Meta+Space>"
|
||||
if not testSuggestionsAuto("Text {","textChan", "textChanged:", shortcutToSuggestions):
|
||||
if not testSuggestionsAuto("TextEdit {","baseu", "baseUrl:", shortcutToSuggestions):
|
||||
saveAndExit()
|
||||
return
|
||||
# change settings to manual insertion of suggestions
|
||||
changeAutocompleteToManual()
|
||||
# test manual suggestions
|
||||
testSuggestionsManual("Text {", "col", "color:")
|
||||
testSuggestionsManual("TextEdit {", "col", "color:")
|
||||
# exit qt creator
|
||||
saveAndExit()
|
||||
|
@@ -27,7 +27,7 @@ source("../shared/qmls.py")
|
||||
source("../../shared/suites_qtta.py")
|
||||
|
||||
def main():
|
||||
editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Text {")
|
||||
editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "TextEdit {")
|
||||
if not editorArea:
|
||||
return
|
||||
# write code with error (C should be lower case)
|
||||
|
@@ -27,7 +27,7 @@ source("../shared/qmls.py")
|
||||
|
||||
def main():
|
||||
projectDir = tempDir()
|
||||
editorArea = startQtCreatorWithNewAppAtQMLEditor(projectDir, "SampleApp", "Text {")
|
||||
editorArea = startQtCreatorWithNewAppAtQMLEditor(projectDir, "SampleApp", "TextEdit {")
|
||||
if not editorArea:
|
||||
return
|
||||
for i in range(5):
|
||||
@@ -45,9 +45,9 @@ def main():
|
||||
# verify if refactoring is done correctly
|
||||
waitFor("'MyComponent' in str(editorArea.plainText)", 2000)
|
||||
codeText = str(editorArea.plainText)
|
||||
patternCodeToAdd = "MyComponent\s+\{\s*\}"
|
||||
patternCodeToMove = "Text\s+\{.*\}"
|
||||
# there should be empty MyComponent item instead of Text item
|
||||
patternCodeToAdd = "MyComponent\s+\{\s*id: textEdit\s*\}"
|
||||
patternCodeToMove = "TextEdit\s+\{.*\}"
|
||||
# there should be empty MyComponent item instead of TextEdit item
|
||||
if re.search(patternCodeToAdd, codeText, re.DOTALL) and not re.search(patternCodeToMove, codeText, re.DOTALL):
|
||||
test.passes("Refactoring was properly applied in source file")
|
||||
else:
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../shared/qmls.py")
|
||||
|
||||
def main():
|
||||
editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Text {")
|
||||
editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "TextEdit {")
|
||||
if not editorArea:
|
||||
return
|
||||
homeKey = "<Home>"
|
||||
|
Reference in New Issue
Block a user