@@ -222,6 +222,7 @@ Rectangle {
223 function test_card_binding(data) {
223 function test_card_binding(data) {
224 selector.selectedIndex = data.index;
224 selector.selectedIndex = data.index;
225+ waitForRendering(selector);
225 waitForRendering(card);
226 waitForRendering(card);
227 tryCompareFunction(function() { return testCase[data.object] !== null }, true);
228 tryCompareFunction(function() { return testCase[data.object] !== null }, true);
@@ -252,6 +253,8 @@ Rectangle {
253 function test_card_size(data) {
254 function test_card_size(data) {
254 selector.selectedIndex = data.index;
255 selector.selectedIndex = data.index;
256+ waitForRendering(selector);
257+ waitForRendering(card);
256 if (data.hasOwnProperty("card_layout")) {
259 if (data.hasOwnProperty("card_layout")) {
257 cardTool.template['card-layout'] = data.card_layout;
260 cardTool.template['card-layout'] = data.card_layout;
@@ -284,6 +287,7 @@ Rectangle {
285 function test_art_size(data) {
288 function test_art_size(data) {
286 selector.selectedIndex = data.index;
289 selector.selectedIndex = data.index;
290+ waitForRendering(selector);
287 if (data.hasOwnProperty("size")) {
291 if (data.hasOwnProperty("size")) {
288 cardTool.template['card-size'] = data.size;
292 cardTool.template['card-size'] = data.size;
289 cardTool.templateChanged();
293 cardTool.templateChanged();
@@ -315,6 +319,7 @@ Rectangle {
316 function test_art_shape_fixed_size() {
320 function test_art_shape_fixed_size() {
317 selector.selectedIndex = 6;
321 selector.selectedIndex = 6;
322+ waitForRendering(selector);
318 card.fixedArtShapeSize = Qt.size( units.gu(8), units.gu(4) );
323 card.fixedArtShapeSize = Qt.size( units.gu(8), units.gu(4) );
319 waitForRendering(card);
324 waitForRendering(card);
320 tryCompare(art, "width", units.gu(8));
325 tryCompare(art, "width", units.gu(8));
@@ -331,6 +336,7 @@ Rectangle {
332 function test_art_layout(data) {
337 function test_art_layout(data) {
333 selector.selectedIndex = data.index;
338 selector.selectedIndex = data.index;
339+ waitForRendering(selector);
334 waitForRendering(card);
340 waitForRendering(card);
336 tryCompare(headerRow, "x", data.left());
342 tryCompare(headerRow, "x", data.left());
@@ -349,6 +355,7 @@ Rectangle {
350 function test_header_layout(data) {
356 function test_header_layout(data) {
351 selector.selectedIndex = data.index;
357 selector.selectedIndex = data.index;
358+ waitForRendering(selector);
352 waitForRendering(card);
359 waitForRendering(card);
354 tryCompareFunction(function() { return testCase.headerRow.y === data.top() }, true);
361 tryCompareFunction(function() { return testCase.headerRow.y === data.top() }, true);
@@ -364,7 +371,7 @@ Rectangle {
365 function test_summary_layout(data) {
372 function test_summary_layout(data) {
366 selector.selectedIndex = data.index;
373 selector.selectedIndex = data.index;
367−
374+ waitForRendering(selector);
368 waitForRendering(card);
375 waitForRendering(card);
370 tryCompareFunction(function() { return art.height > 0 && testCase.summary.y === data.top() }, true);
377 tryCompareFunction(function() { return art.height > 0 && testCase.summary.y === data.top() }, true);
@@ -372,6 +379,8 @@ Rectangle {
373 function test_art_visibility() {
380 function test_art_visibility() {
374 selector.selectedIndex = 8;
381 selector.selectedIndex = 8;
382+ waitForRendering(selector);
383+ waitForRendering(card);
376 compare(testCase.artImage, null);
385 compare(testCase.artImage, null);
377 compare(testCase.art, null);
386 compare(testCase.art, null);
@@ -394,6 +403,7 @@ Rectangle {
395 function test_background(data) {
404 function test_background(data) {
396 selector.selectedIndex = data.index;
405 selector.selectedIndex = data.index;
406+ waitForRendering(selector);
398 if (data.hasOwnProperty("background")) {
408 if (data.hasOwnProperty("background")) {
399 card.cardData["background"] = data.background;
409 card.cardData["background"] = data.background;
@@ -430,6 +440,8 @@ Rectangle {
431 function test_font_weights(data) {
441 function test_font_weights(data) {
432 selector.selectedIndex = data.index;
442 selector.selectedIndex = data.index;
443+ waitForRendering(selector);
444+ waitForRendering(card);
434 tryCompare(testCase.title.font, "weight", data.weight);
446 tryCompare(testCase.title.font, "weight", data.weight);
@@ -453,6 +465,7 @@ Rectangle {
454 function test_fontColor(data) {
466 function test_fontColor(data) {
455 selector.selectedIndex = 10;
467 selector.selectedIndex = 10;
468+ waitForRendering(selector);
456 waitForRendering(card);
469 waitForRendering(card);
458 background.color = data.tag;
471 background.color = data.tag;
@@ -475,6 +488,7 @@ Rectangle {
476 function test_emblemIcon(data) {
489 function test_emblemIcon(data) {
477 selector.selectedIndex = data.index;
490 selector.selectedIndex = data.index;
491+ waitForRendering(selector);
478 waitForRendering(card);
492 waitForRendering(card);
480 var emblemIcon = findChild(card, "emblemIcon");
494 var emblemIcon = findChild(card, "emblemIcon");
@@ -491,6 +505,7 @@ Rectangle {
492 function test_mascotShape(data) {
506 function test_mascotShape(data) {
493 selector.selectedIndex = data.index;
507 selector.selectedIndex = data.index;
508+ waitForRendering(selector);
494 waitForRendering(card);
509 waitForRendering(card);
496 var shape = findChild(card, "mascotShapeLoader");
511 var shape = findChild(card, "mascotShapeLoader");
@@ -501,6 +516,8 @@ Rectangle {
502 function test_touchdown_visibility() {
517 function test_touchdown_visibility() {
503 selector.selectedIndex = 0;
518 selector.selectedIndex = 0;
519+ waitForRendering(selector);
520+ waitForRendering(card);
505 var touchdown = findChild(card, "touchdown");
522 var touchdown = findChild(card, "touchdown");
@@ -524,6 +541,7 @@ Rectangle {
525 function test_paddings(data) {
542 function test_paddings(data) {
526 selector.selectedIndex = data.index;
543 selector.selectedIndex = data.index;
544+ waitForRendering(selector);
527 waitForRendering(card);
545 waitForRendering(card);
529 if (title) var titleToCard = title.mapToItem(card, 0, 0, title.width, title.height);
547 if (title) var titleToCard = title.mapToItem(card, 0, 0, title.width, title.height);