@@ -546,10 +546,12 @@ Item {
548 function test_NotificationRenderer(data) {
548 function test_NotificationRenderer(data) {
549− // hook up notification's completed-signal with model's onCompleted-slot, so that remove happens on close()
549+ // make sure the clicks on mocked notifications can be checked against by "actionSpy" (mimicking the NotificationServer component)
550− data.n.completed.connect(mockModel.onCompleted)
551 data.n.actionInvoked.connect(mockModel.actionInvoked)
550 data.n.actionInvoked.connect(mockModel.actionInvoked)
552+ // hook up notification's completed-signal with model's onCompleted-slot, so that remove() (model) happens on close() (notification)
553+ data.n.completed.connect(mockModel.onCompleted)
553 // populate model with some mock notifications
555 // populate model with some mock notifications
554 mockModel.append(data.n)
556 mockModel.append(data.n)
@@ -591,7 +593,7 @@ Item {
591 mouseClick(notification)
593 mouseClick(notification)
592 if(data.n.type === Notification.Interactive) {
594 if(data.n.type === Notification.Interactive) {
593 actionSpy.wait()
595 actionSpy.wait()
594− compare(actionSpy.signalArguments[0][0], data.n.rawActions[0], "got wrong id for interactive action")
596+ compare(actionSpy.signalArguments[0][0], data.n.actions.data(0, ActionModel.RoleActionId), "got wrong id for interactive action")
596 compare(clickThroughSpy.count, 0, "click on notification fell through")
598 compare(clickThroughSpy.count, 0, "click on notification fell through")
@@ -608,9 +610,9 @@ Item {
608 var buttonAccept = findChild(buttonRow, "notify_button0")
610 var buttonAccept = findChild(buttonRow, "notify_button0")
610 // only test the left/cancel-button if two actions have been passed in
612 // only test the left/cancel-button if two actions have been passed in
611− if (data.n.rawActions.length === 4) {
613+ if (data.n.actions.count === 2) {
612 tryCompareFunction(function() { mouseClick(buttonCancel); return actionSpy.signalArguments.length > 0; }, true);
614 tryCompareFunction(function() { mouseClick(buttonCancel); return actionSpy.signalArguments.length > 0; }, true);
613− compare(actionSpy.signalArguments[0][0], data.n.rawActions[2], "got wrong id for negative action")
615+ compare(actionSpy.signalArguments[0][0], data.n.actions.data(1, ActionModel.RoleActionId), "got wrong id for negative action")
614 actionSpy.clear()
616 actionSpy.clear()
@@ -619,12 +621,11 @@ Item {
620 // click the positive/right button
622 // click the positive/right button
621 tryCompareFunction(function() { mouseClick(buttonAccept); return actionSpy.signalArguments.length > 0; }, true);
623 tryCompareFunction(function() { mouseClick(buttonAccept); return actionSpy.signalArguments.length > 0; }, true);
622− compare(actionSpy.signalArguments[0][0], data.n.rawActions[0], "got wrong id positive action")
624+ compare(actionSpy.signalArguments[0][0], data.n.actions.data(0, ActionModel.RoleActionId), "got wrong id positive action")
623 actionSpy.clear()
625 actionSpy.clear()
624− waitForRendering (notification)
626 // check if there's a ComboButton created due to more actions being passed
627 // check if there's a ComboButton created due to more actions being passed
627− if (data.n.actions.length > 2) {
628+ if (data.n.actions.count > 3) {
628 var comboButton = findChild(notification, "notify_button2")
629 var comboButton = findChild(notification, "notify_button2")
629 tryCompareFunction(function() { return comboButton.expanded === false; }, true);
630 tryCompareFunction(function() { return comboButton.expanded === false; }, true);
@@ -634,19 +635,19 @@ Item {
634 // try clicking on choices in expanded comboList
635 // try clicking on choices in expanded comboList
635 var choiceButton1 = findChild(notification, "notify_button3")
636 var choiceButton1 = findChild(notification, "notify_button3")
636 tryCompareFunction(function() { mouseClick(choiceButton1); return actionSpy.signalArguments.length > 0; }, true);
637 tryCompareFunction(function() { mouseClick(choiceButton1); return actionSpy.signalArguments.length > 0; }, true);
637− compare(actionSpy.signalArguments[0][0], data.n.rawActions[6], "got wrong id choice action 1")
638+ compare(actionSpy.signalArguments[0][0], data.n.actions.data(3, ActionModel.RoleActionId), "got wrong id choice action 1")
638 actionSpy.clear()
639 actionSpy.clear()
640 var choiceButton2 = findChild(notification, "notify_button4")
641 var choiceButton2 = findChild(notification, "notify_button4")
641 tryCompareFunction(function() { mouseClick(choiceButton2); return actionSpy.signalArguments.length > 0; }, true);
642 tryCompareFunction(function() { mouseClick(choiceButton2); return actionSpy.signalArguments.length > 0; }, true);
642− compare(actionSpy.signalArguments[0][0], data.n.rawActions[8], "got wrong id choice action 2")
643+ compare(actionSpy.signalArguments[0][0], data.n.actions.data(4, ActionModel.RoleActionId), "got wrong id choice action 2")
643 actionSpy.clear()
644 actionSpy.clear()
645 // click to collapse
646 // click to collapse
646− //tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == false; }, true);
647+ tryCompareFunction(function() { mouseClick(comboButton, comboButton.width / 2, comboButton.height / 2); return comboButton.expanded == false; }, true);
648 mouseClick(buttonCancel)
649 mouseClick(buttonCancel)
649− compare(actionSpy.signalArguments[0][0], data.n.rawActions[2], "got wrong id for negative action")
650+ compare(actionSpy.signalArguments[0][0], data.n.actions.data(1, ActionModel.RoleActionId), "got wrong id for negative action")