on xenial help sign in
Stabilize some Shell qml tests
cd473e8Daniel d'Andrada
tests/qmltests/tst_Shell.qml+22−5
@@ -375,7 +375,15 @@ Item {
375 tryCompare(greeter, "fullyShown", true);
375 tryCompare(greeter, "fullyShown", true);
376
376
377 // Swipe away greeter to focus app
377 // Swipe away greeter to focus app
378+
379+ // greeter unloads its internal components when hidden
380+ // and reloads them when shown. Thus we have to do this
381+ // again before interacting with it otherwise any
382+ // DirectionalDragAreas in there won't be easily fooled by
383+ // fake swipes.
384+ removeTimeConstraintsFromDirectionalDragAreas(greeter);
378 swipeAwayGreeter();
385 swipeAwayGreeter();
386+
379 tryCompare(ApplicationManager, "suspended", false);
387 tryCompare(ApplicationManager, "suspended", false);
380 compare(mainApp.state, ApplicationInfoInterface.Running);
388 compare(mainApp.state, ApplicationInfoInterface.Running);
381 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
389 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
@@ -665,14 +673,23 @@ Item {
665 }
673 }
666
674
667 function test_login() {
675 function test_login() {
668− var greeter = findChild(shell, "greeter")
676+ var greeter = findChild(shell, "greeter");
669− waitForRendering(greeter)
677+ waitForRendering(greeter);
670 LightDM.Greeter.showGreeter();
678 LightDM.Greeter.showGreeter();
671− tryCompare(greeter, "fullyShown", true)
679+ tryCompare(greeter, "fullyShown", true);
672
680
673 sessionSpy.clear();
681 sessionSpy.clear();
682+
683+ // greeter unloads its internal components when hidden
684+ // and reloads them when shown. Thus we have to do this
685+ // again before interacting with it otherwise any
686+ // DirectionalDragAreas in there won't be easily fooled by
687+ // fake swipes.
688+ removeTimeConstraintsFromDirectionalDragAreas(greeter);
689+
674− swipeAwayGreeter()
690+ swipeAwayGreeter();
691+
675− tryCompare(sessionSpy, "count", 1)
692+ tryCompare(sessionSpy, "count", 1);
676 }
693 }
677
694
678 function test_fullscreen() {
695 function test_fullscreen() {