@@ -21,6 +21,7 @@ import QtQuick 2.0
2121import QtTest 1.0
2222import GSettings 1.0
2323import LightDM 0.1 as LightDM
24+import Ubuntu.Connectivity 0.1
2425import Unity.Application 0.1
2526import Unity.Test 0.1 as UT
2627import Powerd 0.1
@@ -28,6 +29,7 @@ import Powerd 0.1
2829import "../../qml"
2930
3031Item {
32+ id: root
3133 width: shell.width
3234 height: shell.height
3335
@@ -51,6 +53,11 @@ Item {
5153 id: shell
5254 }
5355
56+ Component {
57+ id: shellComponent
58+ Shell {}
59+ }
60+
5461 SignalSpy {
5562 id: sessionSpy
5663 signalName: "sessionStarted"
@@ -61,6 +68,12 @@ Item {
6168 signalName: "setCurrentScopeCalled"
6269 }
6370
71+ SignalSpy {
72+ id: unlockAllModemsSpy
73+ target: Connectivity
74+ signalName: "unlockingAllModems"
75+ }
76+
6477 UT.UnityTestCase {
6578 name: "Shell"
6679 when: windowShown
@@ -431,5 +444,13 @@ Item {
431444
432445 touchRelease(shell);
433446 }
447+
448+ function test_unlockAllModemsOnBoot() {
449+ unlockAllModemsSpy.clear()
450+ // actually create an object so we notice the onCompleted signal
451+ var greeter = shellComponent.createObject(root)
452+ tryCompare(unlockAllModemsSpy, "count", 1)
453+ greeter.destroy()
454+ }
434455 }
435456}