@@ -43,6 +43,21 @@ Row {
4343 function getRaw(id) {
4444 return mockNotification.createObject(mockModel)
4545 }
46+
47+ // add the default/PlaceHolder notification to the model
48+ Component.onCompleted: {
49+ var n = {
50+ type: Notification.PlaceHolder,
51+ hints: {},
52+ summary: "",
53+ body: "",
54+ icon: "",
55+ secondaryIcon: "",
56+ actions: []
57+ }
58+
59+ append(n)
60+ }
4661 }
4762
4863 function addSnapDecisionNotification() {
@@ -370,7 +385,6 @@ Row {
370385 mockModel.append(data)
371386
372387 // make sure the view is properly updated before going on
373− notifications.forceLayout();
374388 waitForRendering(notifications);
375389
376390 var notification = findChild(notifications, "notification" + (mockModel.count - 1))
@@ -384,7 +398,6 @@ Row {
384398 var summaryLabel = findChild(notification, "summaryLabel")
385399 var bodyLabel = findChild(notification, "bodyLabel")
386400 var buttonRow = findChild(notification, "buttonRow")
387− waitForRendering(buttonRow)
388401
389402 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
390403 compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")
@@ -402,17 +415,15 @@ Row {
402415 compare(summaryLabel.visible, data.summaryVisible, "summary-text visibility is incorrect")
403416 compare(bodyLabel.visible, data.bodyVisible, "body-text visibility is incorrect")
404417 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
418+ wait(500);
405419
406420 if(data.buttonRowVisible) {
407421 var buttonCancel = findChild(buttonRow, "button1")
408422 var buttonAccept = findChild(buttonRow, "button0")
409423
410− waitForRendering(notification)
411−
412424 // only test the left/cancel-button if two actions have been passed in
413425 if (data.actions.length == 2) {
414426 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
415− actionSpy.wait()
416427 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
417428 actionSpy.clear()
418429 }
@@ -422,9 +433,9 @@ Row {
422433
423434 // click the positive/right button
424435 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)
425− actionSpy.wait()
426436 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
427437 actionSpy.clear()
438+ wait(500);
428439
429440 // check if there's more than one negative choice
430441 if (data.actions.length > 2) {
@@ -432,27 +443,23 @@ Row {
432443
433444 // click to expand
434445 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
435− waitForRendering(notification)
446+ wait(500);
436447 actionSpy.clear()
437448
438449 // test the additional buttons
439450 for (var i = 2; i < data.actions.length; i++) {
440− waitForRendering(notification)
441451 var buttonColumn = findChild(notification, "buttonColumn")
442452 var button = findChild(buttonColumn, "button" + i)
443453 mouseClick(button, button.width / 2, button.height / 2)
444− actionSpy.wait()
445454 compare(actionSpy.signalArguments[0][0], data.actions[i]["id"], "got wrong id for additional negative action")
446455 actionSpy.clear()
447456 }
448457
449458 // click to collapse
450459 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
451− waitForRendering(notification)
452460 tryCompare(notification, "height", initialHeight)
453461 } else {
454462 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
455− actionSpy.wait()
456463 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
457464 }
458465 }