aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_textfield.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/tst_textfield.qml')
-rw-r--r--tests/auto/controls/data/tst_textfield.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml
index 012dedba..18bcd63f 100644
--- a/tests/auto/controls/data/tst_textfield.qml
+++ b/tests/auto/controls/data/tst_textfield.qml
@@ -144,4 +144,26 @@ TestCase {
control.destroy()
}
+
+ function test_hover_data() {
+ return [
+ { tag: "enabled", hoverEnabled: true },
+ { tag: "disabled", hoverEnabled: false },
+ ]
+ }
+
+ function test_hover(data) {
+ var control = textField.createObject(testCase, {hoverEnabled: data.hoverEnabled})
+ verify(control)
+
+ compare(control.hovered, false)
+
+ mouseMove(control)
+ compare(control.hovered, data.hoverEnabled)
+
+ mouseMove(control, -1, -1)
+ compare(control.hovered, false)
+
+ control.destroy()
+ }
}