summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-12-21 19:08:18 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-12-21 19:08:18 +0100
commit89e36b4b0d1b9482c17375f0f69f5dd1c1f9b3fb (patch)
treed24baf1f4f50ea0c8b4f9d27119e3146d51654b6 /components
parent819c6f545087f6d636a3db5093a285401756036d (diff)
downloadkube-89e36b4b0d1b9482c17375f0f69f5dd1c1f9b3fb.tar.gz
kube-89e36b4b0d1b9482c17375f0f69f5dd1c1f9b3fb.zip
Verify the newMailButton receives focus initially
Diffstat (limited to 'components')
-rw-r--r--components/kube/qml/ComposerView.qml1
-rw-r--r--components/kube/tests/tst_composerview.qml8
2 files changed, 9 insertions, 0 deletions
diff --git a/components/kube/qml/ComposerView.qml b/components/kube/qml/ComposerView.qml
index 2e0267d5..9119de27 100644
--- a/components/kube/qml/ComposerView.qml
+++ b/components/kube/qml/ComposerView.qml
@@ -106,6 +106,7 @@ Kube.View {
106 spacing: Kube.Units.largeSpacing 106 spacing: Kube.Units.largeSpacing
107 107
108 Kube.PositiveButton { 108 Kube.PositiveButton {
109 objectName: "newMailButton"
109 anchors { 110 anchors {
110 left: parent.left 111 left: parent.left
111 right: parent.right 112 right: parent.right
diff --git a/components/kube/tests/tst_composerview.qml b/components/kube/tests/tst_composerview.qml
index 81ad5eaa..52475721 100644
--- a/components/kube/tests/tst_composerview.qml
+++ b/components/kube/tests/tst_composerview.qml
@@ -26,12 +26,20 @@ TestCase {
26 width: 400 26 width: 400
27 height: 400 27 height: 400
28 name: "ComposerView" 28 name: "ComposerView"
29 when: windowShown
29 30
30 ComposerView { 31 ComposerView {
31 id: composer 32 id: composer
33 focus: true
32 } 34 }
33 35
34 function test_start() { 36 function test_start() {
35 verify(composer) 37 verify(composer)
36 } 38 }
39
40 function test_verifyInitialFocus() {
41 var newMailButton = findChild(composer, "newMailButton");
42 verify(newMailButton)
43 verify(newMailButton.activeFocus)
44 }
37} 45}