on xenial help sign in
MenuBar test: Wait for overflow menubar to render (#338)
a4f840aDalton Durst
tests/qmltests/ApplicationMenus/tst_MenuBar.qml+2−2
@@ -349,7 +349,7 @@ Item {
349 var menu = { "rowData": { "label": "Short" } };
349 var menu = { "rowData": { "label": "Short" } };
350 tryCompareFunction(function() {
350 tryCompareFunction(function() {
351 menuBackend.insertRow(0, menu);
351 menuBackend.insertRow(0, menu);
352− wait(1);
352+ waitForRendering(menuBar);
353 if (overflow.visible) {
353 if (overflow.visible) {
354 return true;
354 return true;
355 }
355 }
@@ -366,7 +366,7 @@ Item {
366
366
367 tryCompareFunction(function() {
367 tryCompareFunction(function() {
368 menuBackend.removeRow(0);
368 menuBackend.removeRow(0);
369− wait(1);
369+ waitForRendering(menuBar);
370 if (!overflow.visible) {
370 if (!overflow.visible) {
371 return true;
371 return true;
372 }
372 }