@@ -29,13 +29,18 @@ Row {
29 id: mockNotification
29 id: mockNotification
31 QtObject {
31 QtObject {
32− function invokeAction(actionId) { }
32+ function invokeAction(actionId) {
33+ mockModel.actionId = actionId
34+ print ("action-id: ", actionId)
36 ListModel {
39 ListModel {
37 id: mockModel
40 id: mockModel
42+ property string actionId
39 function getRaw(id) {
44 function getRaw(id) {
40 return mockNotification.createObject(mockModel)
45 return mockNotification.createObject(mockModel)
@@ -319,7 +324,7 @@ Row {
319 actionSpy.target = findChild(notification, "interactiveArea")
324 actionSpy.target = findChild(notification, "interactiveArea")
320 mouseClick(notification, notification.width / 2, notification.height / 2)
325 mouseClick(notification, notification.width / 2, notification.height / 2)
321 actionSpy.wait()
326 actionSpy.wait()
322− compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
327+ compare(mockModel.actionId, data.actions[0]["id"], "got wrong id for interactive action")
323 compare(clickThroughSpy.count, 0, "click on interactive notification fell through")
328 compare(clickThroughSpy.count, 0, "click on interactive notification fell through")
325 mouseClick(notification, notification.width / 2, notification.height / 2)
330 mouseClick(notification, notification.width / 2, notification.height / 2)
@@ -339,13 +344,13 @@ Row {
339 actionSpy.target = buttonCancel
344 actionSpy.target = buttonCancel
340 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
345 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
341 actionSpy.wait()
346 actionSpy.wait()
342− compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
347+ compare(mockModel.actionId, data.actions[1]["id"], "got wrong id for negative action")
343 actionSpy.clear()
348 actionSpy.clear()
345 actionSpy.target = buttonAccept
350 actionSpy.target = buttonAccept
346 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)
351 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)
347 actionSpy.wait()
352 actionSpy.wait()
348− compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
353+ compare(mockModel.actionId, data.actions[0]["id"], "got wrong id positive action")