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

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