on xenial help sign in
Adapt test to new mock behaviour
ab3422bAlbert Astals Cid
tests/qmltests/Dash/tst_DashContent.qml+7−1
@@ -70,7 +70,7 @@ Item {
70 function loadScopes() {
70 function loadScopes() {
71 scopeLoadedSpy.clear();
71 scopeLoadedSpy.clear();
72 scopesModel.load();
72 scopesModel.load();
73− tryCompare(scopeLoadedSpy, "count", 6, 15000);
73+ tryCompare(scopeLoadedSpy, "count", 7, 15000);
74 tryCompare(scopesModel, "loaded", true);
74 tryCompare(scopesModel, "loaded", true);
75 tryCompareFunction(function() {
75 tryCompareFunction(function() {
76 var mockScope1Loader = findChild(shell, "scopeLoader0");
76 var mockScope1Loader = findChild(shell, "scopeLoader0");
@@ -610,6 +610,12 @@ Item {
610 }
610 }
611
611
612 function test_noDelegateCreationDestructionOnMove() {
612 function test_noDelegateCreationDestructionOnMove() {
613+ // Go to scope 1 and back so that items are created
614+ // and so this test makes sense
615+ dashContent.setCurrentScopeAtIndex(1);
616+ waitForRendering(dashContent);
617+ dashContent.setCurrentScopeAtIndex(0);
618+
613 // Our cards are of type AbstractButton as defined in CardCreator.js
619 // Our cards are of type AbstractButton as defined in CardCreator.js
614 // This gives also other things that are not cards but for our purpose it
620 // This gives also other things that are not cards but for our purpose it
615 // does not matter
621 // does not matter