on xenial help sign in
Stabilize some Shell qml tests

As they might fail is the test runs too fast

commitcd473e830939d8c9607b85dc31cb0d3da218a8b2 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 25 Feb 2015, 10:32 (12 years ago) parent23d9094
1 file changed+22−5
tests/qmltests/tst_Shell.qml+22−5
tests/qmltests/tst_Shell.qml+22−5
@@ -375,7 +375,15 @@ Item {
375375 tryCompare(greeter, "fullyShown", true);
376376
377377 // 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);
378385 swipeAwayGreeter();
386+
379387 tryCompare(ApplicationManager, "suspended", false);
380388 compare(mainApp.state, ApplicationInfoInterface.Running);
381389 tryCompare(ApplicationManager, "focusedApplicationId", mainAppId);
@@ -665,14 +673,23 @@ Item {
665673 }
666674
667675 function test_login() {
668− var greeter = findChild(shell, "greeter")
669− waitForRendering(greeter)
676+ var greeter = findChild(shell, "greeter");
677+ waitForRendering(greeter);
670678 LightDM.Greeter.showGreeter();
671− tryCompare(greeter, "fullyShown", true)
679+ tryCompare(greeter, "fullyShown", true);
672680
673681 sessionSpy.clear();
674− swipeAwayGreeter()
675− tryCompare(sessionSpy, "count", 1)
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+
690+ swipeAwayGreeter();
691+
692+ tryCompare(sessionSpy, "count", 1);
676693 }
677694
678695 function test_fullscreen() {