@@ -53,7 +53,10 @@ Row {
5353 icon: "../graphics/avatars/funky.png",
5454 secondaryIcon: "../graphics/applicationIcons/facebook.png",
5555 actions: [{ id: "ok_id", label: "Ok"},
56− { id: "cancel_id", label: "Cancel"}]
56+ { id: "cancel_id", label: "Cancel"},
57+ { id: "notreally_id", label: "Not really"},
58+ { id: "noway_id", label: "No way"},
59+ { id: "nada_id", label: "Nada"}]
5760 }
5861
5962 mockModel.append(n)
@@ -132,7 +135,7 @@ Row {
132135 id: interactiveControls
133136
134137 width: units.gu(30)
135− height: units.gu(71)
138+ height: units.gu(81)
136139 color: "grey"
137140
138141 Column {
@@ -193,7 +196,10 @@ Row {
193196 icon: "../graphics/avatars/funky.png",
194197 secondaryIcon: "../graphics/applicationIcons/facebook.png",
195198 actions: [{ id: "ok_id", label: "Ok"},
196− { id: "cancel_id", label: "Cancel"}],
199+ { id: "cancel_id", label: "Cancel"},
200+ { id: "notreally_id", label: "Not really"},
201+ { id: "noway_id", label: "No way"},
202+ { id: "nada_id", label: "Nada"}],
197203 summaryVisible: true,
198204 bodyVisible: true,
199205 interactiveAreaEnabled: false,
@@ -341,15 +347,50 @@ Row {
341347 var buttonAccept = findChild(buttonRow, "button0")
342348
343349 waitForRendering(notification)
344− mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
345− actionSpy.wait()
346− compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
347− actionSpy.clear()
348350
351+ // only test the left/cancel-button if two actions have been passed in
352+ if (data.actions.length == 2) {
353+ mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
354+ actionSpy.wait()
355+ compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
356+ actionSpy.clear()
357+ }
358+
359+ // click the positive/right button
349360 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)
350361 actionSpy.wait()
351362 compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id positive action")
352363 actionSpy.clear()
364+
365+ // check if there's more than one negative choice
366+ if (data.actions.length > 2) {
367+ var initialHeight = notification.height
368+
369+ // click to expand
370+ mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
371+ waitForRendering(notification)
372+ actionSpy.clear()
373+
374+ // test the additional buttons
375+ for (var i = 2; i < data.actions.length; i++) {
376+ waitForRendering(notification)
377+ var buttonColumn = findChild(notification, "buttonColumn")
378+ var button = findChild(buttonColumn, "button" + i)
379+ mouseClick(button, button.width / 2, button.height / 2)
380+ actionSpy.wait()
381+ compare(actionSpy.signalArguments[0][0], data.actions[i]["id"], "got wrong id for additional negative action")
382+ actionSpy.clear()
383+ }
384+
385+ // click to collapse
386+ mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
387+ waitForRendering(notification)
388+ tryCompare(notification, "height", initialHeight)
389+ } else {
390+ mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
391+ actionSpy.wait()
392+ compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
393+ }
353394 }
354395 }
355396 }