on xenial help sign in
Improve findChild calls inside tryCompareFunction
ed1a770Albert 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
@@ -422,7 +422,6 @@ Rectangle {
422 function test_infoPopup() {
422 function test_infoPopup() {
423 verify(findChild(root, "infoPopup") === null);
423 verify(findChild(root, "infoPopup") === null);
424 lockscreen.showInfoPopup("foo", "bar");
424 lockscreen.showInfoPopup("foo", "bar");
425− tryCompareFunction(function() { return findChild(root, "infoPopup") !== null}, true);
426
425
427 var infoPopup = findChild(root, "infoPopup");
426 var infoPopup = findChild(root, "infoPopup");
428 compare(infoPopup.title, "foo");
427 compare(infoPopup.title, "foo");
@@ -434,7 +433,7 @@ Rectangle {
434 var okButton = findChild(root, "infoPopupOkButton");
433 var okButton = findChild(root, "infoPopupOkButton");
435 mouseClick(okButton);
434 mouseClick(okButton);
436
435
437− tryCompareFunction(function() { return findChild(root, "infoPopup") === null}, true);
436+ tryCompareFunction(function() { return findChild(root, "infoPopup", 0 /* timeout */) === null}, true);
438
437
439 tryCompare(signalSpy, "count", 1);
438 tryCompare(signalSpy, "count", 1);
440 }
439 }
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;
@@ -473,9 +473,9 @@ Item {
473 compare(dashContentList.currentItem.scopeId, "MockScope1");
473 compare(dashContentList.currentItem.scopeId, "MockScope1");
474
474
475 tryCompareFunction(function() {
475 tryCompareFunction(function() {
476− var cardGrid = findChild(dashContentList, "dashCategory0");
476+ var cardGrid = findChild(dashContentList, "dashCategory0", 0 /* timeout */);
477 if (cardGrid != null) {
477 if (cardGrid != null) {
478− var tile = findChild(cardGrid, "delegate0");
478+ var tile = findChild(cardGrid, "delegate0", 0 /* timeout */);
479 return tile != null;
479 return tile != null;
480 }
480 }
481 return false;
481 return false;
@@ -520,9 +520,9 @@ Item {
520 var categoryListView = findChild(dashTempScopeItem, "categoryListView");
520 var categoryListView = findChild(dashTempScopeItem, "categoryListView");
521 categoryListView.positionAtBeginning();
521 categoryListView.positionAtBeginning();
522 tryCompareFunction(function() {
522 tryCompareFunction(function() {
523− var cardGrid = findChild(dashTempScopeItem, "dashCategory0");
523+ var cardGrid = findChild(dashTempScopeItem, "dashCategory0", 0 /* timeout */);
524 if (cardGrid != null) {
524 if (cardGrid != null) {
525− var tile = findChild(cardGrid, "delegate0");
525+ var tile = findChild(cardGrid, "delegate0", 0 /* timeout */);
526 return tile != null;
526 return tile != null;
527 }
527 }
528 return false;
528 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
@@ -92,7 +92,7 @@ Item {
92 function scrollToCategory(categoryName) {
92 function scrollToCategory(categoryName) {
93 var categoryListView = findChild(genericScopeView, "categoryListView");
93 var categoryListView = findChild(genericScopeView, "categoryListView");
94 tryCompareFunction(function() {
94 tryCompareFunction(function() {
95− var category = findChild(genericScopeView, categoryName);
95+ var category = findChild(genericScopeView, categoryName, 0 /* timeout */);
96 if (category && category.y > 0 && category.y < genericScopeView.height) return true;
96 if (category && category.y > 0 && category.y < genericScopeView.height) return true;
97 touchFlick(genericScopeView, genericScopeView.width/2, units.gu(20),
97 touchFlick(genericScopeView, genericScopeView.width/2, units.gu(20),
98 genericScopeView.width/2, genericScopeView.y)
98 genericScopeView.width/2, genericScopeView.y)
@@ -100,7 +100,7 @@ Item {
100 return false;
100 return false;
101 }, true);
101 }, true);
102
102
103− tryCompareFunction(function() { return findChild(genericScopeView, "delegate0") !== null; }, true);
103+ tryCompareFunction(function() { return findChild(genericScopeView, "delegate0", 0 /* timeout */) !== null; }, true);
104 return findChild(genericScopeView, categoryName);
104 return findChild(genericScopeView, categoryName);
105 }
105 }
106
106
@@ -163,7 +163,7 @@ Item {
163 }
163 }
164
164
165 function test_expand_collapse() {
165 function test_expand_collapse() {
166− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0") != null; }, true);
166+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader0", 0 /* timeout */) != null; }, true);
167
167
168 var category = findChild(genericScopeView, "dashCategory0")
168 var category = findChild(genericScopeView, "dashCategory0")
169 var seeAll = findChild(category, "seeAll")
169 var seeAll = findChild(category, "seeAll")
@@ -184,7 +184,7 @@ Item {
184
184
185 function test_expand_expand_collapse() {
185 function test_expand_expand_collapse() {
186 // wait for the item to be there
186 // wait for the item to be there
187− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader2") != null; }, true);
187+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader2", 0 /* timeout */) != null; }, true);
188
188
189 var categoryListView = findChild(genericScopeView, "categoryListView");
189 var categoryListView = findChild(genericScopeView, "categoryListView");
190 categoryListView.contentY = categoryListView.height;
190 categoryListView.contentY = categoryListView.height;
@@ -212,7 +212,6 @@ Item {
212 }
212 }
213
213
214 function test_headerLink() {
214 function test_headerLink() {
215− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader1") != null; }, true);
216 var header = findChild(genericScopeView, "dashSectionHeader1");
215 var header = findChild(genericScopeView, "dashSectionHeader1");
217
216
218 spy.target = genericScopeView.scope;
217 spy.target = genericScopeView.scope;
@@ -231,7 +230,7 @@ Item {
231 categoryListView.contentY = categoryListView.height * 2;
230 categoryListView.contentY = categoryListView.height * 2;
232
231
233 // wait for the item to be there
232 // wait for the item to be there
234− tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader4") != null; }, true);
233+ tryCompareFunction(function() { return findChild(genericScopeView, "dashSectionHeader4", 0 /* timeout */) != null; }, true);
235
234
236 var categoryView = findChild(genericScopeView, "dashCategory4");
235 var categoryView = findChild(genericScopeView, "dashCategory4");
237 verify(categoryView, "Can't find the category view.");
236 verify(categoryView, "Can't find the category view.");
@@ -243,7 +242,6 @@ Item {
243 }
242 }
244
243
245 function test_narrow_delegate_ranges_expand() {
244 function test_narrow_delegate_ranges_expand() {
246− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") !== null; }, true);
247 var category = findChild(genericScopeView, "dashCategory0")
245 var category = findChild(genericScopeView, "dashCategory0")
248 tryCompare(category, "expanded", false);
246 tryCompare(category, "expanded", false);
249
247
@@ -275,7 +273,6 @@ Item {
275 function test_single_category_expansion() {
273 function test_single_category_expansion() {
276 genericScopeView.scope = scopes.getScope(3);
274 genericScopeView.scope = scopes.getScope(3);
277
275
278− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory0") != undefined; }, true);
279 var category = findChild(genericScopeView, "dashCategory0")
276 var category = findChild(genericScopeView, "dashCategory0")
280 compare(category.expandable, false, "Only category should not be expandable.");
277 compare(category.expandable, false, "Only category should not be expandable.");
281
278
@@ -289,9 +286,9 @@ Item {
289 if (category === undefined) category = 0;
286 if (category === undefined) category = 0;
290 if (delegate === undefined) delegate = 0;
287 if (delegate === undefined) delegate = 0;
291 tryCompareFunction(function() {
288 tryCompareFunction(function() {
292− var cardGrid = findChild(genericScopeView, "dashCategory"+category);
289+ var cardGrid = findChild(genericScopeView, "dashCategory"+category, 0 /* timeout */);
293 if (cardGrid != null) {
290 if (cardGrid != null) {
294− var tile = findChild(cardGrid, "delegate"+delegate);
291+ var tile = findChild(cardGrid, "delegate"+delegate, 0 /* timeout */);
295 return tile != null;
292 return tile != null;
296 }
293 }
297 return false;
294 return false;
@@ -332,9 +329,9 @@ Item {
332 genericScopeView.scope = scopes.getScope("NullPreviewScope");
329 genericScopeView.scope = scopes.getScope("NullPreviewScope");
333
330
334 tryCompareFunction(function() {
331 tryCompareFunction(function() {
335− var cardGrid = findChild(genericScopeView, 0);
332+ var cardGrid = findChild(genericScopeView, 0, 0 /* timeout */);
336 if (cardGrid != null) {
333 if (cardGrid != null) {
337− var tile = findChild(cardGrid, 0);
334+ var tile = findChild(cardGrid, 0, 0 /* timeout */);
338 return tile != null;
335 return tile != null;
339 }
336 }
340 return false;
337 return false;
@@ -385,7 +382,6 @@ Item {
385
382
386 tryCompare(testCase.subPageLoader, "open", false);
383 tryCompare(testCase.subPageLoader, "open", false);
387
384
388− tryCompareFunction(function() { return findChild(category, "delegate1") != null; }, true);
389 var tile = findChild(category, "delegate1");
385 var tile = findChild(category, "delegate1");
390
386
391 mouseClick(tile);
387 mouseClick(tile);
@@ -487,7 +483,6 @@ Item {
487
483
488 scrollToEnd();
484 scrollToEnd();
489
485
490− tryCompareFunction(function() { return findChild(genericScopeView, "dashCategory1") !== null; }, true);
491 var category1 = findChild(genericScopeView, "dashCategory1")
486 var category1 = findChild(genericScopeView, "dashCategory1")
492 var seeAll1 = findChild(category1, "seeAll")
487 var seeAll1 = findChild(category1, "seeAll")
493 verify(category1.expandable);
488 verify(category1.expandable);
@@ -669,7 +664,6 @@ Item {
669 function test_carousel_borderSource() {
664 function test_carousel_borderSource() {
670 var category = scrollToCategory("dashCategory1");
665 var category = scrollToCategory("dashCategory1");
671 var tile = findChild(category, "carouselDelegate0");
666 var tile = findChild(category, "carouselDelegate0");
672− tryCompareFunction(function() { return findChild(tile, "artShapeLoader") !== null; }, true);
673 var artShapeLoader = findChild(tile, "artShapeLoader");
667 var artShapeLoader = findChild(tile, "artShapeLoader");
674 var shape = findChildsByType(artShapeLoader, "UCUbuntuShape");
668 var shape = findChildsByType(artShapeLoader, "UCUbuntuShape");
675 compare(shape.borderSource, undefined);
669 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
@@ -363,12 +363,11 @@ Item {
363
363
364 enterPin("1111")
364 enterPin("1111")
365 enterPin("1111")
365 enterPin("1111")
366− tryCompareFunction(function() {return findChild(root, "infoPopup") !== null}, true)
367
366
368 var dialog = findChild(root, "infoPopup")
367 var dialog = findChild(root, "infoPopup")
369 var button = findChild(dialog, "infoPopupOkButton")
368 var button = findChild(dialog, "infoPopupOkButton")
370 tap(button)
369 tap(button)
371− tryCompareFunction(function() {return findChild(root, "infoPopup")}, null)
370+ tryCompareFunction(function() {return findChild(root, "infoPopup", 0 /* timeout */)}, null)
372
371
373 tryCompare(resetSpy, "count", 0)
372 tryCompare(resetSpy, "count", 0)
374 enterPin("1111")
373 enterPin("1111")