Squish: Tuning tst_select_all

Change-Id: I14ba2d2eee033a6e779cd1cca47e25572020dc40
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2013-02-26 12:56:47 +01:00
parent f9cb412d7b
commit 4d7e1c43db

View File

@@ -34,12 +34,15 @@ def main():
for key in ["<Up>", "<Down>", "<Left>", "<Right>"]:
test.log("Selecting everything")
invokeMenuItem("Edit", "Select All")
waitFor("editor.textCursor().hasSelection()", 1000)
test.verify(waitFor("editor.textCursor().hasSelection()", 500),
"verify selecting")
test.compare(editor.textCursor().selectionStart(), 0)
test.compare(editor.textCursor().selectionEnd(), size)
test.compare(editor.textCursor().position(), size)
test.log("Pressing key: %s" % key.replace("<", "").replace(">", ""))
type(editor, key)
test.verify(waitFor("not editor.textCursor().hasSelection()", 500),
"verify deselecting")
if key == "<Up>":
test.compare(editor.textCursor().selectionStart(), editor.textCursor().selectionEnd())
else: