Commit 68e38b89 authored by Robert Loehning's avatar Robert Loehning

Squish: Update suite_QMLS

Project template was changed in
b18e084f

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