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