Commit 742db511 authored by Robert Loehning's avatar Robert Loehning
Browse files

Squish: Use small letters in shortcuts



Following Squish documentation. Capital letters even caused
problems in nativeType().

Change-Id: I902984da40c7b57c1c40d35c2cd183e95481f1cf
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 996a999b
...@@ -115,7 +115,7 @@ def markText(editor, direction, typeCount=1): ...@@ -115,7 +115,7 @@ def markText(editor, direction, typeCount=1):
# works for all standard editors # works for all standard editors
def replaceEditorContent(editor, newcontent): def replaceEditorContent(editor, newcontent):
type(editor, "<Ctrl+A>") type(editor, "<Ctrl+a>")
type(editor, "<Delete>") type(editor, "<Delete>")
type(editor, newcontent) type(editor, newcontent)
......
...@@ -289,7 +289,7 @@ def addHelpDocumentation(which): ...@@ -289,7 +289,7 @@ def addHelpDocumentation(which):
if listWidget.count > 0: if listWidget.count > 0:
rect = listWidget.visualItemRect(listWidget.item(0)) rect = listWidget.visualItemRect(listWidget.item(0))
mouseClick(listWidget, rect.x+5, rect.y+5, 0, Qt.LeftButton) mouseClick(listWidget, rect.x+5, rect.y+5, 0, Qt.LeftButton)
type(listWidget, "<Ctrl+A>") type(listWidget, "<Ctrl+a>")
mouseClick(waitForObject("{type='QPushButton' name='removeButton' visible='1'}"), 5, 5, 0, Qt.LeftButton) mouseClick(waitForObject("{type='QPushButton' name='removeButton' visible='1'}"), 5, 5, 0, Qt.LeftButton)
for qch in which: for qch in which:
clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}")) clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}"))
......
...@@ -71,7 +71,7 @@ def main(): ...@@ -71,7 +71,7 @@ def main():
return return
for i in range(4): for i in range(4):
type(editorWidget, "<Left>") type(editorWidget, "<Left>")
type(editorWidget, "<Ctrl+Shift+U>") type(editorWidget, "<Ctrl+Shift+u>")
# wait until search finished and verify search results # wait until search finished and verify search results
waitForSearchResults() waitForSearchResults()
validateSearchResult(3) validateSearchResult(3)
......
...@@ -60,7 +60,7 @@ def main(): ...@@ -60,7 +60,7 @@ def main():
return return
type(editorWidget, "<Left>") type(editorWidget, "<Left>")
markText(editorWidget, "Left", 6) markText(editorWidget, "Left", 6)
type(editorWidget, "<Ctrl+F>") type(editorWidget, "<Ctrl+f>")
# verify if find toolbar exists and if search text contains selected word # verify if find toolbar exists and if search text contains selected word
test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar"), test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar"),
"Verifying if: Find/Replace pane is displayed at the bottom of the view.") "Verifying if: Find/Replace pane is displayed at the bottom of the view.")
......
...@@ -33,8 +33,8 @@ source("../../shared/suites_qtta.py") ...@@ -33,8 +33,8 @@ source("../../shared/suites_qtta.py")
# go to proper line, make backup, type needed text # go to proper line, make backup, type needed text
def __beginTestSuggestions__(editorArea, lineText, textToType): def __beginTestSuggestions__(editorArea, lineText, textToType):
# make source code backup to clipboard # make source code backup to clipboard
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
type(editorArea, "<Ctrl+C>") type(editorArea, "<Ctrl+c>")
# place cursor to proper position and start typing # place cursor to proper position and start typing
if not placeCursorToLine(editorArea, lineText): if not placeCursorToLine(editorArea, lineText):
return False return False
...@@ -53,8 +53,8 @@ def verifySuggestions(textToType): ...@@ -53,8 +53,8 @@ def verifySuggestions(textToType):
# restore source code from clipboard backup # restore source code from clipboard backup
def __endTestSuggestions__(editorArea): def __endTestSuggestions__(editorArea):
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
type(editorArea, "<Ctrl+V>") type(editorArea, "<Ctrl+v>")
def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion): def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion):
# get editor # get editor
......
...@@ -132,7 +132,7 @@ def main(): ...@@ -132,7 +132,7 @@ def main():
return return
for i in range(5): for i in range(5):
type(editorArea, "<Left>") type(editorArea, "<Left>")
type(editorArea, "<Ctrl+Shift+U>") type(editorArea, "<Ctrl+Shift+u>")
# check if usage was properly found # check if usage was properly found
expectedResults = [ExpectedResult("color-animation.qml", 87, "SequentialAnimation on opacity {")] expectedResults = [ExpectedResult("color-animation.qml", 87, "SequentialAnimation on opacity {")]
resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView") resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView")
......
...@@ -74,13 +74,13 @@ def main(): ...@@ -74,13 +74,13 @@ def main():
if not verifyIndentation(editorArea): if not verifyIndentation(editorArea):
return return
# cancel indentation # cancel indentation
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
for i in range(5): for i in range(5):
type(editorArea, "<Shift+Backtab>") type(editorArea, "<Shift+Backtab>")
# select unindented block # select unindented block
type(editorArea, "<Ctrl+A>") type(editorArea, "<Ctrl+a>")
# do indentation # do indentation
type(editorArea, "<Ctrl+I>") type(editorArea, "<Ctrl+i>")
# verify invoked indentation # verify invoked indentation
if not verifyIndentation(editorArea): if not verifyIndentation(editorArea):
return return
......
...@@ -63,7 +63,7 @@ def main(): ...@@ -63,7 +63,7 @@ def main():
# - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor
# Creator will show you the declaration of the variable. # Creator will show you the declaration of the variable.
type(cppwindow, "<Ctrl+F>") type(cppwindow, "<Ctrl+f>")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), " xi") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), " xi")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>")
__typeAndWaitForAction__(cppwindow, "<F2>") __typeAndWaitForAction__(cppwindow, "<F2>")
...@@ -72,7 +72,7 @@ def main(): ...@@ -72,7 +72,7 @@ def main():
# - Move the cursor to a function call. # - Move the cursor to a function call.
# - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor
# Creator will show you the definition of the function. # Creator will show you the definition of the function.
type(cppwindow, "<Ctrl+F>") type(cppwindow, "<Ctrl+f>")
clickButton(waitForObject(":*Qt Creator_Utils::IconButton")) clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "freefunc2") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "freefunc2")
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "<Return>")
...@@ -94,7 +94,7 @@ def main(): ...@@ -94,7 +94,7 @@ def main():
else: else:
type(cppwindow, "<Ctrl+Home>") type(cppwindow, "<Ctrl+Home>")
type(cppwindow, "<Ctrl+F>") type(cppwindow, "<Ctrl+f>")
clickButton(waitForObject(":*Qt Creator_Utils::IconButton")) clickButton(waitForObject(":*Qt Creator_Utils::IconButton"))
type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "Dummy::Dummy") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "Dummy::Dummy")
# Take us to the second instance # Take us to the second instance
......
...@@ -65,9 +65,9 @@ def prepareQmlFile(): ...@@ -65,9 +65,9 @@ def prepareQmlFile():
markText(editor, "Ctrl+End") markText(editor, "Ctrl+End")
# unmark the last line # unmark the last line
type(editor, "<Shift+Up>") type(editor, "<Shift+Up>")
type(editor, "<Ctrl+C>") type(editor, "<Ctrl+c>")
for j in range(10): for j in range(10):
type(editor, "<Ctrl+V>") type(editor, "<Ctrl+v>")
# assume the current editor content to be indented correctly # assume the current editor content to be indented correctly
originalText = "%s" % editor.plainText originalText = "%s" % editor.plainText
indented = editor.plainText indented = editor.plainText
...@@ -80,10 +80,10 @@ def testReIndent(originalText): ...@@ -80,10 +80,10 @@ def testReIndent(originalText):
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
correctIndented = len(originalText) correctIndented = len(originalText)
incorrectIndented = correctIndented + 4004 incorrectIndented = correctIndented + 4004
type(editor, "<Ctrl+A>") type(editor, "<Ctrl+a>")
test.log("calling re-indent") test.log("calling re-indent")
starttime = datetime.utcnow() starttime = datetime.utcnow()
type(editor, "<Ctrl+I>") type(editor, "<Ctrl+i>")
waitFor("len(str(editor.plainText)) in (incorrectIndented, correctIndented)", 25000) waitFor("len(str(editor.plainText)) in (incorrectIndented, correctIndented)", 25000)
endtime = datetime.utcnow() endtime = datetime.utcnow()
test.xverify(originalText == str(editor.plainText), test.xverify(originalText == str(editor.plainText),
......
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