aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals@canonical.com>2013-04-03 11:07:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-05 14:08:02 +0200
commitfedd27e1faa65d38a1a5b11f750b5ae2fb5c4006 (patch)
tree435a1b02f1636a8a51579e5fbe201803b136a96b /tests
parent6eed3409c4ecf69d3c43cdcbeeca829624b9fe25 (diff)
Make keyClick/Press/Release work with a char
Change-Id: Id821bddd993d4da4458464713a69edfea4aaecaa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qmltest/textedit/tst_textedit.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qmltest/textedit/tst_textedit.qml b/tests/auto/qmltest/textedit/tst_textedit.qml
index dc9affdad8..edfa127c59 100644
--- a/tests/auto/qmltest/textedit/tst_textedit.qml
+++ b/tests/auto/qmltest/textedit/tst_textedit.qml
@@ -74,6 +74,13 @@ Item {
}
TextEdit {
+ id: txtentry2
+ text: ""
+ height: 20
+ width: 50
+ }
+
+ TextEdit {
id: txtfunctions
text: "The quick brown fox jumped over the lazy dog"
height: 20
@@ -124,6 +131,23 @@ Item {
compare(txtentry.text, "hello world")
}
+ function test_textentry_char() {
+ txtentry2.focus = true;
+ compare(txtentry2.text, "")
+ keyClick("h")
+ keyClick("e")
+ keyClick("l")
+ keyClick("l")
+ keyClick("o")
+ keyClick(" ")
+ keyClick("W")
+ keyClick("o")
+ keyClick("r")
+ keyClick("l")
+ keyClick("d")
+ compare(txtentry2.text, "hello World")
+ }
+
function test_functions() {
compare(txtfunctions.getText(4,9), "quick")
txtfunctions.select(4,9);