on xenial help sign in
Improve findChild calls inside tryCompareFunction.
3004433Albert Astals Cid
tests/qmltests/Components/tst_Carousel.qml−1
@@ -268,7 +268,6 @@ Item {
268
268
269 function test_activate() {
269 function test_activate() {
270 var carouselList = findChild(carousel, "listView");
270 var carouselList = findChild(carousel, "listView");
271− tryCompareFunction(function() { return findChild(carouselList, "carouselDelegate3") ? true : false; }, true);
272 var carouselItem = findChild(carousel, "carouselDelegate3")
271 var carouselItem = findChild(carousel, "carouselDelegate3")
273 verify(carouselItem, "Could not find delegate");
272 verify(carouselItem, "Could not find delegate");
274
273
tests/qmltests/Components/tst_Lockscreen.qml+1−2
@@ -410,7 +410,6 @@ Rectangle {
410 function test_infoPopup() {
410 function test_infoPopup() {
411 verify(findChild(root, "infoPopup") === null);
411 verify(findChild(root, "infoPopup") === null);
412 lockscreen.showInfoPopup("foo", "bar");
412 lockscreen.showInfoPopup("foo", "bar");
413− tryCompareFunction(function() { return findChild(root, "infoPopup") !== null}, true);
414
413
415 var infoPopup = findChild(root, "infoPopup");
414 var infoPopup = findChild(root, "infoPopup");
416 compare(infoPopup.title, "foo");
415 compare(infoPopup.title, "foo");
@@ -422,7 +421,7 @@ Rectangle {
422 var okButton = findChild(root, "infoPopupOkButton");
421 var okButton = findChild(root, "infoPopupOkButton");
423 mouseClick(okButton);
422 mouseClick(okButton);
424
423
425− tryCompareFunction(function() { return findChild(root, "infoPopup") === null}, true);
424+ tryCompareFunction(function() { return findChild(root, "infoPopup", 0 /* timeout */) === null}, true);
426
425
427 tryCompare(signalSpy, "count", 1);
426 tryCompare(signalSpy, "count", 1);
428 }
427 }
tests/qmltests/Dash/Previews/tst_Preview.qml−2
@@ -78,7 +78,6 @@ Rectangle {
78
78
79 function test_containOnFocus() {
79 function test_containOnFocus() {
80 waitForRendering(preview);
80 waitForRendering(preview);
81− tryCompareFunction(function () { return findChild(preview, "widget-10") != null }, true);
82 var widget = findChild(preview, "widget-10");
81 var widget = findChild(preview, "widget-10");
83
82
84 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
83 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
@@ -94,7 +93,6 @@ Rectangle {
94
93
95 function test_containOnGrow() {
94 function test_containOnGrow() {
96 waitForRendering(preview);
95 waitForRendering(preview);
97− tryCompareFunction(function () { return findChild(preview, "widget-13") != null }, true);
98 var widget = findChild(preview, "widget-13");
96 var widget = findChild(preview, "widget-13");
99
97
100 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
98 var bottomLeft = preview.mapFromItem(widget, 0, widget.height);
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml−4
@@ -116,7 +116,6 @@ Rectangle {
116
116
117 tryCompare(testCase.mascotShapeLoader, "visible", data.loaderVisible);
117 tryCompare(testCase.mascotShapeLoader, "visible", data.loaderVisible);
118 if (data.loaderVisible) {
118 if (data.loaderVisible) {
119− tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
120 var mascot = findChild(previewHeader, "mascotShape")
119 var mascot = findChild(previewHeader, "mascotShape")
121 tryCompare(mascot, "visible", data.visible);
120 tryCompare(mascot, "visible", data.visible);
122 }
121 }
@@ -165,20 +164,17 @@ Rectangle {
165
164
166 function test_fallback() {
165 function test_fallback() {
167 previewHeader.widgetData = brokenheaderjson;
166 previewHeader.widgetData = brokenheaderjson;
168− tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
169 var mascot = findChild(previewHeader, "mascotShape");
167 var mascot = findChild(previewHeader, "mascotShape");
170 compare(mascot.visible, false);
168 compare(mascot.visible, false);
171
169
172 previewHeader.widgetData = {};
170 previewHeader.widgetData = {};
173 previewHeader.widgetData = fallbackheaderjson;
171 previewHeader.widgetData = fallbackheaderjson;
174− tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
175 var mascot = findChild(previewHeader, "mascotShape");
172 var mascot = findChild(previewHeader, "mascotShape");
176 tryCompare(mascot, "visible", true);
173 tryCompare(mascot, "visible", true);
177 tryCompare(mascot.source, "status", Image.Ready);
174 tryCompare(mascot.source, "status", Image.Ready);
178
175
179 previewHeader.widgetData = {};
176 previewHeader.widgetData = {};
180 previewHeader.widgetData = emptyfallbackheaderjson;
177 previewHeader.widgetData = emptyfallbackheaderjson;
181− tryCompareFunction(function() { return findChild(previewHeader, "mascotShape") != null }, true);
182 var mascot = findChild(previewHeader, "mascotShape");
178 var mascot = findChild(previewHeader, "mascotShape");
183 tryCompare(mascot, "visible", true);
179 tryCompare(mascot, "visible", true);
184 tryCompare(mascot.source, "status", Image.Ready);
180 tryCompare(mascot.source, "status", Image.Ready);
tests/qmltests/Dash/tst_CardTool.qml+4−4
@@ -339,22 +339,22 @@ Rectangle {
339 function test_card_title_alignment(data) {
339 function test_card_title_alignment(data) {
340 selector.selectedIndex = data.index;
340 selector.selectedIndex = data.index;
341
341
342− tryCompareFunction(function() { return findChild(internalCard, "titleLabel").horizontalAlignment == Text.AlignLeft; }, true);
342+ tryCompareFunction(function() { return findChild(internalCard, "titleLabel", 0 /* timeout */).horizontalAlignment == Text.AlignLeft; }, true);
343
343
344 cardTool.components['title'] = { "field": "title", "align": "center" };
344 cardTool.components['title'] = { "field": "title", "align": "center" };
345 cardTool.componentsChanged();
345 cardTool.componentsChanged();
346
346
347− tryCompareFunction(function() { return findChild(internalCard, "titleLabel").horizontalAlignment == data.value; }, true);
347+ tryCompareFunction(function() { return findChild(internalCard, "titleLabel", 0 /* timeout */).horizontalAlignment == data.value; }, true);
348
348
349 cardTool.components['title'] = { "field": "title" };
349 cardTool.components['title'] = { "field": "title" };
350 cardTool.componentsChanged();
350 cardTool.componentsChanged();
351
351
352− tryCompareFunction(function() { return findChild(internalCard, "titleLabel").horizontalAlignment == data.value; }, true);
352+ tryCompareFunction(function() { return findChild(internalCard, "titleLabel", 0 /* timeout */).horizontalAlignment == data.value; }, true);
353
353
354 cardTool.components['title'] = { "field": "title", "align": "left" };
354 cardTool.components['title'] = { "field": "title", "align": "left" };
355 cardTool.componentsChanged();
355 cardTool.componentsChanged();
356
356
357− tryCompareFunction(function() { return findChild(internalCard, "titleLabel").horizontalAlignment == Text.AlignLeft; }, true);
357+ tryCompareFunction(function() { return findChild(internalCard, "titleLabel", 0 /* timeout */).horizontalAlignment == Text.AlignLeft; }, true);
358 }
358 }
359
359
360 function test_categoryLayout_data() {
360 function test_categoryLayout_data() {
tests/qmltests/Dash/tst_Dash.qml+8−8
@@ -76,7 +76,7 @@ Item {
76 var genericScopeView = dashContentList.currentItem;
76 var genericScopeView = dashContentList.currentItem;
77 var categoryListView = findChild(genericScopeView, "categoryListView");
77 var categoryListView = findChild(genericScopeView, "categoryListView");
78 tryCompareFunction(function() {
78 tryCompareFunction(function() {
79− var category = findChild(genericScopeView, categoryName);
79+ var category = findChild(genericScopeView, categoryName, 0 /* timeout */);
80 if (category && category.y > 0 && category.y < genericScopeView.height) return true;
80 if (category && category.y > 0 && category.y < genericScopeView.height) return true;
81 touchFlick(genericScopeView, genericScopeView.width/2, units.gu(20),
81 touchFlick(genericScopeView, genericScopeView.width/2, units.gu(20),
82 genericScopeView.width/2, genericScopeView.y)
82 genericScopeView.width/2, genericScopeView.y)
@@ -84,7 +84,7 @@ Item {
84 return false;
84 return false;
85 }, true);
85 }, true);
86
86
87− tryCompareFunction(function() { return findChild(genericScopeView, "delegate0") !== null; }, true);
87+ tryCompareFunction(function() { return findChild(genericScopeView, "delegate0", 0 /* timeout */) !== null; }, true);
88 return findChild(genericScopeView, categoryName);
88 return findChild(genericScopeView, categoryName);
89 }
89 }
90
90
@@ -94,9 +94,9 @@ Item {
94 if (category === undefined) category = 0;
94 if (category === undefined) category = 0;
95 if (delegate === undefined) delegate = 0;
95 if (delegate === undefined) delegate = 0;
96 tryCompareFunction(function() {
96 tryCompareFunction(function() {
97− var cardGrid = findChild(genericScopeView, "dashCategory"+category);
97+ var cardGrid = findChild(genericScopeView, "dashCategory"+category, 0 /* timeout */);
98 if (cardGrid != null) {
98 if (cardGrid != null) {
99− var tile = findChild(cardGrid, "delegate"+delegate);
99+ var tile = findChild(cardGrid, "delegate"+delegate, 0 /* timeout */);
100 return tile != null;
100 return tile != null;
101 }
101 }
102 return false;
102 return false;
@@ -475,9 +475,9 @@ Item {
475 compare(dashContentList.currentItem.scopeId, "MockScope1");
475 compare(dashContentList.currentItem.scopeId, "MockScope1");
476
476
477 tryCompareFunction(function() {
477 tryCompareFunction(function() {
478− var cardGrid = findChild(dashContentList, "dashCategory0");
478+ var cardGrid = findChild(dashContentList, "dashCategory0", 0 /* timeout */);
479 if (cardGrid != null) {
479 if (cardGrid != null) {
480− var tile = findChild(cardGrid, "delegate0");
480+ var tile = findChild(cardGrid, "delegate0", 0 /* timeout */);
481 return tile != null;
481 return tile != null;
482 }
482 }
483 return false;
483 return false;
@@ -522,9 +522,9 @@ Item {
522 var categoryListView = findChild(dashTempScopeItem, "categoryListView");
522 var categoryListView = findChild(dashTempScopeItem, "categoryListView");
523 categoryListView.positionAtBeginning();
523 categoryListView.positionAtBeginning();
524 tryCompareFunction(function() {
524 tryCompareFunction(function() {
525− var cardGrid = findChild(dashTempScopeItem, "dashCategory0");
525+ var cardGrid = findChild(dashTempScopeItem, "dashCategory0", 0 /* timeout */);
526 if (cardGrid != null) {
526 if (cardGrid != null) {
527− var tile = findChild(cardGrid, "delegate0");
527+ var tile = findChild(cardGrid, "delegate0", 0 /* timeout */);
528 return tile != null;
528 return tile != null;
529 }
529 }
530 return false;
530 return false;
tests/qmltests/Dash/tst_DashContent.qml+5−7
@@ -261,11 +261,11 @@ Item {
261
261
262 function test_carouselAspectRatio() {
262 function test_carouselAspectRatio() {
263 tryCompareFunction(function() {
263 tryCompareFunction(function() {
264− var scope = findChild(dashContent, "scopeLoader0");
264+ var scope = findChild(dashContent, "scopeLoader0", 0 /* timeout */);
265 if (scope != null) {
265 if (scope != null) {
266− var dashCategory1 = findChild(scope, "dashCategory1");
266+ var dashCategory1 = findChild(scope, "dashCategory1", 0 /* timeout */);
267 if (dashCategory1 != null) {
267 if (dashCategory1 != null) {
268− var tile = findChild(dashCategory1, "carouselDelegate1");
268+ var tile = findChild(dashCategory1, "carouselDelegate1", 0 /* timeout */);
269 return tile != null;
269 return tile != null;
270 }
270 }
271 }
271 }
@@ -282,7 +282,6 @@ Item {
282
282
283 function test_mainNavigation() {
283 function test_mainNavigation() {
284 var dashContentList = findChild(dashContent, "dashContentList");
284 var dashContentList = findChild(dashContent, "dashContentList");
285− tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
286 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
285 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
287 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
286 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
288 var searchButton = findChild(dashContentList.currentItem, "search_button");
287 var searchButton = findChild(dashContentList.currentItem, "search_button");
@@ -405,7 +404,6 @@ Item {
405
404
406 function goToSecondLevel() {
405 function goToSecondLevel() {
407 var dashContentList = findChild(dashContent, "dashContentList");
406 var dashContentList = findChild(dashContent, "dashContentList");
408− tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
409 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
407 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
410 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
408 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
411 var searchButton = findChild(dashContentList.currentItem, "search_button");
409 var searchButton = findChild(dashContentList.currentItem, "search_button");
@@ -580,7 +578,7 @@ Item {
580
578
581 function test_primaryFilter() {
579 function test_primaryFilter() {
582 var dashContentList = findChild(dashContent, "dashContentList");
580 var dashContentList = findChild(dashContent, "dashContentList");
583− tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
581+ tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation", 0 /* timeout */) != null; }, true);
584 dashContentList.currentItem.item.scope.setHasNavigation(false);
582 dashContentList.currentItem.item.scope.setHasNavigation(false);
585 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
583 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
586 var searchButton = findChild(dashContentList.currentItem, "search_button");
584 var searchButton = findChild(dashContentList.currentItem, "search_button");
@@ -589,7 +587,7 @@ Item {
589 mouseClick(searchButton);
587 mouseClick(searchButton);
590 tryCompare(peExtraPanel, "visible", true);
588 tryCompare(peExtraPanel, "visible", true);
591
589
592− tryCompareFunction(function() { return findChild(peExtraPanel, "OSF3") != null; }, true);
590+ tryCompareFunction(function() { return findChild(peExtraPanel, "OSF3", 0 /* timeout */) != null; }, true);
593 }
591 }
594
592
595 function test_searchHint() {
593 function test_searchHint() {
tests/qmltests/Dash/tst_GenericScopeView.qml+9−15
@@ -98,7 +98,7 @@ Item {
98 function scrollToCategory(categoryName) {
98 function scrollToCategory(categoryName) {
99 var categoryListView = findChild(genericScopeView, "categoryListView");
99 var categoryListView = findChild(genericScopeView, "categoryListView");
100 tryCompareFunction(function() {
100 tryCompareFunction(function() {
101− var category = findChild(genericScopeView, categoryName);
101+ var category = findChild(genericScopeView, categoryName, 0 /* timeout */);
102 if (category && category.y > 0 && category.y < genericScopeView.height) return true;
102 if (category && category.y > 0 && category.y < genericScopeView.height) return true;
103 touchFlick(genericScopeView, genericScopeView.width/2, units.gu(20),
103 touchFlick(genericScopeView, genericScopeView.width/2, units.gu(20),
104 genericScopeView.width/2, genericScopeView.y)
104 genericScopeView.width/2, genericScopeView.y)
@@ -106,7 +106,7 @@ Item {
106 return false;
106 return false;
107 }, true);
107 }, true);
108
108
109− tryCompareFunction(function() { return findChild(genericScopeView, "delegate0") !== null; }, true);
109+ tryCompareFunction(function() { return findChild(genericScopeView, "delegate0", 0 /* timeout */) !== null; }, true);
110 return findChild(genericScopeView, categoryName);
110 return findChild(genericScopeView, categoryName);
111 }
111 }
112
112
@@ -169,7 +169,7 @@ Item {
169 }
169 }
170
170
171 function test_expand_collapse() {
171 function test_expand_collapse() {
172− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
172+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0", 0 /* timeout */) != null; }, true);
173
173
174 var category = findChild(genericScopeView, "dashCategory0")
174 var category = findChild(genericScopeView, "dashCategory0")
175 var seeAll = findChild(category, "seeAll")
175 var seeAll = findChild(category, "seeAll")
@@ -190,7 +190,7 @@ Item {
190
190
191 function test_expand_expand_collapse() {
191 function test_expand_expand_collapse() {
192 // wait for the item to be there
192 // wait for the item to be there
193− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader2") != null; }, true);
193+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader2", 0 /* timeout */) != null; }, true);
194
194
195 var categoryListView = findChild(genericScopeView, "categoryListView");
195 var categoryListView = findChild(genericScopeView, "categoryListView");
196 categoryListView.contentY = categoryListView.height;
196 categoryListView.contentY = categoryListView.height;
@@ -218,7 +218,6 @@ Item {
218 }
218 }
219
219
220 function test_headerLink() {
220 function test_headerLink() {
221− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader1") != null; }, true);
222 var header = findChild(genericScopeView, "dashSectionHeader1");
221 var header = findChild(genericScopeView, "dashSectionHeader1");
223
222
224 spy.target = genericScopeView.scope;
223 spy.target = genericScopeView.scope;
@@ -237,7 +236,7 @@ Item {
237 categoryListView.contentY = categoryListView.height * 2;
236 categoryListView.contentY = categoryListView.height * 2;
238
237
239 // wait for the item to be there
238 // wait for the item to be there
240− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader4") != null; }, true);
239+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader4", 0 /* timeout */) != null; }, true);
241
240
242 var categoryView = findChild(genericScopeView, "dashCategory4");
241 var categoryView = findChild(genericScopeView, "dashCategory4");
243 verify(categoryView, "Can't find the category view.");
242 verify(categoryView, "Can't find the category view.");
@@ -249,7 +248,6 @@ Item {
249 }
248 }
250
249
251 function test_narrow_delegate_ranges_expand() {
250 function test_narrow_delegate_ranges_expand() {
252− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
253 var category = findChild(genericScopeView, "dashCategory0")
251 var category = findChild(genericScopeView, "dashCategory0")
254 tryCompare(category, "expanded", false);
252 tryCompare(category, "expanded", false);
255
253
@@ -281,7 +279,6 @@ Item {
281 function test_single_category_expansion() {
279 function test_single_category_expansion() {
282 genericScopeView.scope = scopes.getScope(3);
280 genericScopeView.scope = scopes.getScope(3);
283
281
284− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
285 var category = findChild(genericScopeView, "dashCategory0")
282 var category = findChild(genericScopeView, "dashCategory0")
286 compare(category.expandable, false, "Only category should not be expandable.");
283 compare(category.expandable, false, "Only category should not be expandable.");
287
284
@@ -295,9 +292,9 @@ Item {
295 if (category === undefined) category = 0;
292 if (category === undefined) category = 0;
296 if (delegate === undefined) delegate = 0;
293 if (delegate === undefined) delegate = 0;
297 tryCompareFunction(function() {
294 tryCompareFunction(function() {
298− var cardGrid = findChild(genericScopeView, "dashCategory"+category);
295+ var cardGrid = findChild(genericScopeView, "dashCategory"+category, 0 /* timeout */);
299 if (cardGrid != null) {
296 if (cardGrid != null) {
300− var tile = findChild(cardGrid, "delegate"+delegate);
297+ var tile = findChild(cardGrid, "delegate"+delegate, 0 /* timeout */);
301 return tile != null;
298 return tile != null;
302 }
299 }
303 return false;
300 return false;
@@ -338,9 +335,9 @@ Item {
338 genericScopeView.scope = scopes.getScope("NullPreviewScope");
335 genericScopeView.scope = scopes.getScope("NullPreviewScope");
339
336
340 tryCompareFunction(function() {
337 tryCompareFunction(function() {
341− var cardGrid = findChild(genericScopeView, 0);
338+ var cardGrid = findChild(genericScopeView, 0, 0 /* timeout */);
342 if (cardGrid != null) {
339 if (cardGrid != null) {
343− var tile = findChild(cardGrid, 0);
340+ var tile = findChild(cardGrid, 0, 0 /* timeout */);
344 return tile != null;
341 return tile != null;
345 }
342 }
346 return false;
343 return false;
@@ -391,7 +388,6 @@ Item {
391
388
392 tryCompare(testCase.subPageLoader, "open", false);
389 tryCompare(testCase.subPageLoader, "open", false);
393
390
394− tryCompareFunction(function() { return findChild(category, "delegate1") != null; }, true);
395 var tile = findChild(category, "delegate1");
391 var tile = findChild(category, "delegate1");
396
392
397 mouseClick(tile);
393 mouseClick(tile);
@@ -493,7 +489,6 @@ Item {
493
489
494 scrollToEnd();
490 scrollToEnd();
495
491
496− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory1") !== null; }, true);
497 var category1 = findChild(genericScopeView, "dashCategory1")
492 var category1 = findChild(genericScopeView, "dashCategory1")
498 var seeAll1 = findChild(category1, "seeAll")
493 var seeAll1 = findChild(category1, "seeAll")
499 verify(category1.expandable);
494 verify(category1.expandable);
@@ -672,7 +667,6 @@ Item {
672 function test_carousel_borderSource() {
667 function test_carousel_borderSource() {
673 var category = scrollToCategory("dashCategory1");
668 var category = scrollToCategory("dashCategory1");
674 var tile = findChild(category, "carouselDelegate0");
669 var tile = findChild(category, "carouselDelegate0");
675− tryCompareFunction(function() { return findChild(tile, "artShapeLoader") !== null; }, true);
676 var artShapeLoader = findChild(tile, "artShapeLoader");
670 var artShapeLoader = findChild(tile, "artShapeLoader");
677 var shape = findChildsByType(artShapeLoader, "UCUbuntuShape");
671 var shape = findChildsByType(artShapeLoader, "UCUbuntuShape");
678 compare(shape.borderSource, undefined);
672 compare(shape.borderSource, undefined);
tests/qmltests/Panel/tst_IndicatorPage.qml−2
@@ -177,8 +177,6 @@ Item {
177 initializeMenuData(fullMenuData);
177 initializeMenuData(fullMenuData);
178
178
179 var menuId = "menu"+data.remove
179 var menuId = "menu"+data.remove
180−
181− tryCompareFunction(function() { return findChild(page, menuId) !== null;}, true);
182 var menu = findChild(page, menuId);
180 var menu = findChild(page, menuId);
183
181
184 menu.menuSelected();
182 menu.menuSelected();
tests/qmltests/tst_ShellWithPin.qml+1−2
@@ -375,12 +375,11 @@ Item {
375
375
376 enterPin("1111")
376 enterPin("1111")
377 enterPin("1111")
377 enterPin("1111")
378− tryCompareFunction(function() {return findChild(root, "infoPopup") !== null}, true)
379
378
380 var dialog = findChild(root, "infoPopup")
379 var dialog = findChild(root, "infoPopup")
381 var button = findChild(dialog, "infoPopupOkButton")
380 var button = findChild(dialog, "infoPopupOkButton")
382 tap(button)
381 tap(button)
383− tryCompareFunction(function() {return findChild(root, "infoPopup")}, null)
382+ tryCompareFunction(function() {return findChild(root, "infoPopup", 0 /* timeout */)}, null)
384
383
385 tryCompare(resetSpy, "count", 0)
384 tryCompare(resetSpy, "count", 0)
386 enterPin("1111")
385 enterPin("1111")