on xenial help sign in
fix testShellWithPin
32b483dMichael Zanetti
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+9−11
@@ -393,24 +393,23 @@ 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 stage = findChild(shell, "stage")
397
397
398 // We start in phone mode
398 // We start in phone mode
399− compare(shell.usageScenario, "phone");
400− compare(applicationsDisplayLoader.usageScenario, "phone");
399+ compare(stage.usageScenario, "phone");
401
400
402 tap(findChild(shell, "emergencyCallLabel"));
401 tap(findChild(shell, "emergencyCallLabel"));
403 confirmLockedApp("dialer-app")
402 confirmLockedApp("dialer-app")
404
403
405 // OK, we're in. Now try (but fail) to switch to tablet mode
404 // OK, we're in. Now try (but fail) to switch to tablet mode
406 shell.usageScenario = "tablet";
405 shell.usageScenario = "tablet";
407− compare(applicationsDisplayLoader.usageScenario, "phone");
406+ compare(stage.usageScenario, "phone");
408
407
409 // And when we kill the app, we go back to locked tablet mode
408 // And when we kill the app, we go back to locked tablet mode
410 killApps()
409 killApps()
411 var greeter = findChild(shell, "greeter")
410 var greeter = findChild(shell, "greeter")
412 tryCompare(greeter, "fullyShown", true)
411 tryCompare(greeter, "fullyShown", true)
413− compare(applicationsDisplayLoader.usageScenario, "tablet");
412+ compare(stage.usageScenario, "tablet");
414 }
413 }
415
414
416 function test_emergencyDialerIncoming() {
415 function test_emergencyDialerIncoming() {
@@ -497,13 +496,13 @@ Item {
497
496
498 function test_suspend() {
497 function test_suspend() {
499 var greeter = findChild(shell, "greeter");
498 var greeter = findChild(shell, "greeter");
500− var applicationsDisplayLoader = findChild(shell, "applicationsDisplayLoader")
499+ var stage = findChild(shell, "stage")
501
500
502 // Put it to sleep
501 // Put it to sleep
503 Powerd.setStatus(Powerd.Off, Powerd.Unknown);
502 Powerd.setStatus(Powerd.Off, Powerd.Unknown);
504
503
505− // If locked, applicationsDisplayLoader.item.suspended should be true
504+ // If locked, stage.suspended should be true
506− tryCompare(applicationsDisplayLoader.item, "suspended", true);
505+ tryCompare(stage, "suspended", true);
507
506
508 // And wake up
507 // And wake up
509 Powerd.setStatus(Powerd.On, Powerd.Unknown);
508 Powerd.setStatus(Powerd.On, Powerd.Unknown);
@@ -513,13 +512,12 @@ Item {
513 swipeAwayGreeter(true);
512 swipeAwayGreeter(true);
514
513
515 // We have a lockscreen, make sure we're still suspended
514 // We have a lockscreen, make sure we're still suspended
516− tryCompare(applicationsDisplayLoader.item, "suspended", true);
515+ tryCompare(stage, "suspended", true);
517
516
518 enterPin("1234")
517 enterPin("1234")
519
518
520 // Now that the lockscreen has gone too, make sure we're waking up
519 // Now that the lockscreen has gone too, make sure we're waking up
521− tryCompare(applicationsDisplayLoader.item, "suspended", false);
520+ tryCompare(stage, "suspended", false);
522−
523 }
521 }
524
522
525 /* We had a bug (1395075) where if a user kept swiping as the greeter
523 /* We had a bug (1395075) where if a user kept swiping as the greeter