on xenial help sign in
Dash::test_cardIconStyle change compare into tryCompareFunction
6e1f27fAlbert Astals Cid
tests/qmltests/Dash/tst_Dash.qml+14−6
@@ -633,18 +633,26 @@ Item {
633 tryCompare(dashContent.currentScope, "id", "clickscope");
633 tryCompare(dashContent.currentScope, "id", "clickscope");
634
634
635 scrollToCategory("dashCategorypredefined");
635 scrollToCategory("dashCategorypredefined");
636+ tryCompareFunction(function() {
636− var tile = getCategoryDelegate("predefined", 2);
637+ var tile = getCategoryDelegate("predefined", 2);
637− var proportionalShape = findChildsByType(tile, "UCProportionalShape");
638+ var proportionalShape = findChildsByType(tile, "UCProportionalShape");
638− compare(proportionalShape.length, 1);
639+ return proportionalShape.length === 1;
640+ },
641+ true
642+ );
639
643
640 dash.setCurrentScope("libertine-scope.ubuntu_libertine-scope");
644 dash.setCurrentScope("libertine-scope.ubuntu_libertine-scope");
641 var dashContent = findChild(dash, "dashContent");
645 var dashContent = findChild(dash, "dashContent");
642 tryCompare(dashContent.currentScope, "id", "libertine-scope.ubuntu_libertine-scope");
646 tryCompare(dashContent.currentScope, "id", "libertine-scope.ubuntu_libertine-scope");
643
647
644 scrollToCategory("dashCategory2");
648 scrollToCategory("dashCategory2");
649+ tryCompareFunction(function() {
645− tile = getCategoryDelegate("2", 2);
650+ var tile = getCategoryDelegate("2", 2);
646− proportionalShape = findChildsByType(tile, "UCProportionalShape");
651+ var proportionalShape = findChildsByType(tile, "UCProportionalShape");
647− compare(proportionalShape.length, 1);
652+ return proportionalShape.length === 1;
653+ },
654+ true
655+ );
648 }
656 }
649
657
650 function test_tempScopeItemXOnResize()
658 function test_tempScopeItemXOnResize()