@@ -28,9 +28,10 @@ import Powerd 0.1
2828
2929import "../../qml"
3030
31−Row {
31+Item {
3232 id: root
33− spacing: 0
33+ width: contentRow.width
34+ height: contentRow.height
3435
3536 QtObject {
3637 id: applicationArguments
@@ -48,34 +49,36 @@ Row {
4849 }
4950 }
5051
51− Loader {
52− id: shellLoader
52+ Row {
53+ id: contentRow
5354
54− width: units.gu(40)
55− height: units.gu(71)
55+ Loader {
56+ id: shellLoader
5657
57− property bool itemDestroyed: false
58− sourceComponent: Component {
59− Shell {
60− Component.onDestruction: {
61− shellLoader.itemDestroyed = true
58+ width: units.gu(40)
59+ height: units.gu(71)
60+
61+ property bool itemDestroyed: false
62+ sourceComponent: Component {
63+ Shell {
64+ Component.onDestruction: {
65+ shellLoader.itemDestroyed = true
66+ }
67+ maxFailedLogins: maxRetriesTextField.text
6268 }
63− maxFailedLogins: maxRetriesTextField.text
6469 }
6570 }
66− }
6771
68− Rectangle {
69− color: "white"
70− width: units.gu(30)
71− height: shellLoader.height
72+ Rectangle {
73+ color: "white"
74+ width: units.gu(30)
75+ height: shellLoader.height
7276
73− Column {
74− anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
75− spacing: units.gu(1)
76− Row {
77− anchors { left: parent.left; right: parent.right }
77+ Column {
78+ anchors { left: parent.left; right: parent.right; top: parent.top; margins: units.gu(1) }
79+ spacing: units.gu(1)
7880 Button {
81+ anchors { left: parent.left; right: parent.right }
7982 text: "Show Greeter"
8083 onClicked: {
8184 if (shellLoader.status !== Loader.Ready)
@@ -87,15 +90,15 @@ Row {
8790 }
8891 }
8992 }
90− }
9193
92− Label {
93− text: "Max retries:"
94− color: "black"
95− }
96− TextField {
97− id: maxRetriesTextField
98− text: "-1"
94+ Label {
95+ text: "Max retries:"
96+ color: "black"
97+ }
98+ TextField {
99+ id: maxRetriesTextField
100+ text: "-1"
101+ }
99102 }
100103 }
101104 }
@@ -117,6 +120,7 @@ Row {
117120 }
118121
119122 UT.UnityTestCase {
123+ id: testCase
120124 name: "ShellWithPin"
121125 when: windowShown
122126
@@ -192,7 +196,7 @@ Row {
192196 for (var i = 0; i < pin.length; ++i) {
193197 var character = pin.charAt(i)
194198 var button = findChild(shell, "pinPadButton" + character)
195− mouseClick(button, units.gu(1), units.gu(1))
199+ tap(button)
196200 }
197201 }
198202
@@ -253,7 +257,7 @@ Row {
253257 var launcher = findChild(shell, "launcher")
254258 var stage = findChild(shell, "stage")
255259
256− mouseClick(emergencyButton, units.gu(1), units.gu(1))
260+ tap(emergencyButton)
257261
258262 tryCompare(greeter, "lockedApp", "dialer-app")
259263 tryCompare(greeter, "hasLockedApp", true)
@@ -280,7 +284,7 @@ Row {
280284 function test_emergencyCallCrash() {
281285 var lockscreen = findChild(shell, "lockscreen")
282286 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
283− mouseClick(emergencyButton, units.gu(1), units.gu(1))
287+ tap(emergencyButton)
284288
285289 tryCompare(lockscreen, "shown", false)
286290 killApps() // kill dialer-app, as if it crashed
@@ -290,7 +294,7 @@ Row {
290294 function test_emergencyCallAppLaunch() {
291295 var lockscreen = findChild(shell, "lockscreen")
292296 var emergencyButton = findChild(lockscreen, "emergencyCallLabel")
293− mouseClick(emergencyButton, units.gu(1), units.gu(1))
297+ tap(emergencyButton)
294298
295299 tryCompare(lockscreen, "shown", false)
296300 ApplicationManager.startApplication("gallery-app", ApplicationManager.NoFlag)
@@ -335,7 +339,7 @@ Row {
335339
336340 var dialog = findChild(root, "infoPopup")
337341 var button = findChild(dialog, "infoPopupOkButton")
338− mouseClick(button, units.gu(1), units.gu(1))
342+ tap(button)
339343 tryCompareFunction(function() {return findChild(root, "infoPopup")}, null)
340344
341345 tryCompare(resetSpy, "count", 0)