on xenial help sign in
fix ShellWithPin test failures
faed16cLukáš Tinkl
tests/qmltests/Stage/tst_TabletStage.qml+1
@@ -87,6 +87,7 @@ Rectangle {
87 Button {
87 Button {
88 text: testCase.sideStage ? testCase.sideStage.shown ? "Hide Side-stage" : "Show Side-stage" : ""
88 text: testCase.sideStage ? testCase.sideStage.shown ? "Hide Side-stage" : "Show Side-stage" : ""
89 enabled: testCase.sideStage
89 enabled: testCase.sideStage
90+ activeFocusOnPress: false
90 onClicked: {
91 onClicked: {
91 if (testCase.sideStage.shown) testCase.sideStage.hide();
92 if (testCase.sideStage.shown) testCase.sideStage.hide();
92 else testCase.sideStage.show();
93 else testCase.sideStage.show();
tests/qmltests/tst_ShellWithPin.qml+5−6
@@ -393,7 +393,7 @@ Item {
393 // dialer to a side stage and give access to other apps. So just
393 // dialer to a side stage and give access to other apps. So just
394 // confirm that such an attack doesn't work.
394 // confirm that such an attack doesn't work.
395
395
396− var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader")
396+ var applicationsDisplayLoader = findChild(shell, "stage")
397
397
398 // We start in phone mode
398 // We start in phone mode
399 compare(shell.usageScenario, "phone");
399 compare(shell.usageScenario, "phone");
@@ -497,13 +497,13 @@ Item {
497
497
498 function test_suspend() {
498 function test_suspend() {
499 var greeter = findChild(shell, "greeter");
499 var greeter = findChild(shell, "greeter");
500− var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader")
500+ var applicationsDisplayLoader = findChild(shell, "stage")
501
501
502 // Put it to sleep
502 // Put it to sleep
503 Powerd.setStatus(Powerd.Off, Powerd.Unknown);
503 Powerd.setStatus(Powerd.Off, Powerd.Unknown);
504
504
505 // If locked, applicationsDisplayLoader.item.suspended should be true
505 // If locked, applicationsDisplayLoader.item.suspended should be true
506− tryCompare(applicationsDisplayLoader.item, "suspended", true);
506+ tryCompare(applicationsDisplayLoader, "suspended", true);
507
507
508 // And wake up
508 // And wake up
509 Powerd.setStatus(Powerd.On, Powerd.Unknown);
509 Powerd.setStatus(Powerd.On, Powerd.Unknown);
@@ -513,13 +513,12 @@ Item {
513 swipeAwayGreeter(true);
513 swipeAwayGreeter(true);
514
514
515 // We have a lockscreen, make sure we're still suspended
515 // We have a lockscreen, make sure we're still suspended
516− tryCompare(applicationsDisplayLoader.item, "suspended", true);
516+ tryCompare(applicationsDisplayLoader, "suspended", true);
517
517
518 enterPin("1234")
518 enterPin("1234")
519
519
520 // Now that the lockscreen has gone too, make sure we're waking up
520 // Now that the lockscreen has gone too, make sure we're waking up
521− tryCompare(applicationsDisplayLoader.item, "suspended", false);
521+ tryCompare(applicationsDisplayLoader, "suspended", false);
522−
523 }
522 }
524
523
525 /* We had a bug (1395075) where if a user kept swiping as the greeter
524 /* We had a bug (1395075) where if a user kept swiping as the greeter