@@ -64,7 +64,7 @@ Row {
64 function addSnapDecisionNotification() {
64 function addSnapDecisionNotification() {
66 type: Notification.SnapDecision,
66 type: Notification.SnapDecision,
67− hints: {"x-canonical-private-button-tint": "true"},
67+ hints: {"x-canonical-private-affirmative-tint": "true"},
68 summary: "Tom Ato",
68 summary: "Tom Ato",
69 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
69 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
70 icon: "../graphics/avatars/funky.png",
70 icon: "../graphics/avatars/funky.png",
@@ -79,6 +79,22 @@ Row {
79 mockModel.append(n)
79 mockModel.append(n)
82+ function add2over1SnapDecisionNotification() {
84+ type: Notification.SnapDecision,
85+ hints: {"x-canonical-private-affirmative-tint": "true",},
86+ summary: "Theatre at Ferria Stadium",
87+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
90+ actions: [{ id: "ok_id", label: "Ok"},
91+ { id: "snooze_id", label: "Snooze"},
92+ { id: "view_id", label: "View"}]
82 function addEphemeralNotification() {
98 function addEphemeralNotification() {
84 type: Notification.Ephemeral,
100 type: Notification.Ephemeral,
@@ -181,6 +197,12 @@ Row {
181 onClicked: addSnapDecisionNotification()
197 onClicked: addSnapDecisionNotification()
202+ text: "add a 2over1 snap-decision"
203+ onClicked: add2over1SnapDecisionNotification()
185 width: parent.width
207 width: parent.width
186 text: "add an ephemeral"
208 text: "add an ephemeral"
@@ -229,7 +251,7 @@ Row {
230 tag: "Snap Decision with secondary icon and button-tint",
252 tag: "Snap Decision with secondary icon and button-tint",
231 type: Notification.SnapDecision,
253 type: Notification.SnapDecision,
232− hints: {"x-canonical-private-button-tint": "true"},
254+ hints: {"x-canonical-private-affirmative-tint": "true"},
233 summary: "Tom Ato",
255 summary: "Tom Ato",
234 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
256 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
235 icon: "../graphics/avatars/funky.png",
257 icon: "../graphics/avatars/funky.png",
@@ -249,10 +271,31 @@ Row {
249 buttonTinted: true,
271 buttonTinted: true,
250 hasSound: false
272 hasSound: false
275+ tag: "2-over-1 Snap Decision with button-tint",
276+ type: Notification.SnapDecision,
277+ hints: {"x-canonical-private-affirmative-tint": "true"},
278+ summary: "Theatre at Ferria Stadium",
279+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
282+ actions: [{ id: "ok_id", label: "Ok"},
283+ { id: "snooze_id", label: "Snooze"},
284+ { id: "view_id", label: "View"}],
285+ summaryVisible: true,
289+ nonShapedIcon: false,
290+ secondaryIconVisible: false,
291+ buttonRowVisible: false,
253 tag: "Ephemeral notification - icon-summary layout",
296 tag: "Ephemeral notification - icon-summary layout",
254 type: Notification.Ephemeral,
297 type: Notification.Ephemeral,
255− hints: {"x-canonical-private-button-tint": "false"},
298+ hints: {"x-canonical-private-affirmative-tint": "false"},
256 summary: "Photo upload completed",
299 summary: "Photo upload completed",
257 body: "",
300 body: "",
258 icon: "",
301 icon: "",
@@ -271,7 +314,7 @@ Row {
272 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
315 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
273 type: Notification.Ephemeral,
316 type: Notification.Ephemeral,
274− hints: {"x-canonical-private-button-tint": "false",
317+ hints: {"x-canonical-private-affirmative-tint": "false",
275 "sound-file": "dummy.ogg",
318 "sound-file": "dummy.ogg",
276 "suppress-sound": "true"},
319 "suppress-sound": "true"},
277 summary: "New comment successfully published",
320 summary: "New comment successfully published",
@@ -293,7 +336,7 @@ Row {
294 tag: "Interactive notification",
337 tag: "Interactive notification",
295 type: Notification.Interactive,
338 type: Notification.Interactive,
296− hints: {"x-canonical-private-button-tint": "false",
339+ hints: {"x-canonical-private-affirmative-tint": "false",
297 "sound-file": "dummy.ogg"},
340 "sound-file": "dummy.ogg"},
298 summary: "Interactive notification",
341 summary: "Interactive notification",
299 body: "This is a notification that can be clicked",
342 body: "This is a notification that can be clicked",
@@ -313,7 +356,7 @@ Row {
314 tag: "Snap Decision without secondary icon and no button-tint",
357 tag: "Snap Decision without secondary icon and no button-tint",
315 type: Notification.SnapDecision,
358 type: Notification.SnapDecision,
316− hints: {"x-canonical-private-button-tint": "false",
359+ hints: {"x-canonical-private-affirmative-tint": "false",
317 "sound-file": "dummy.ogg"},
360 "sound-file": "dummy.ogg"},
318 summary: "Bro Coly",
361 summary: "Bro Coly",
319 body: "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
362 body: "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
@@ -334,7 +377,7 @@ Row {
335 tag: "Ephemeral notification",
378 tag: "Ephemeral notification",
336 type: Notification.Ephemeral,
379 type: Notification.Ephemeral,
337− hints: {"x-canonical-private-button-tint": "false",
380+ hints: {"x-canonical-private-affirmative-tint": "false",
338 "sound-file": "dummy.ogg"},
381 "sound-file": "dummy.ogg"},
339 summary: "Cole Raby",
382 summary: "Cole Raby",
340 body: "I did not expect it to be that late.",
383 body: "I did not expect it to be that late.",
@@ -354,9 +397,8 @@ Row {
355 tag: "Ephemeral notification with non-shaped icon",
398 tag: "Ephemeral notification with non-shaped icon",
356 type: Notification.Ephemeral,
399 type: Notification.Ephemeral,
357− hints: {"x-canonical-private-button-tint": "false",
400+ hints: {"x-canonical-private-affirmative-tint": "false",
358− "x-canonical-non-shaped-icon": "true",
401+ "x-canonical-non-shaped-icon": "true"},
359− "sound-file": "dummy.ogg"},
360 summary: "Contacts",
402 summary: "Contacts",
361 body: "Synchronised contacts-database with cloud-storage.",
403 body: "Synchronised contacts-database with cloud-storage.",
362 icon: "../graphics/applicationIcons/contacts-app.png",
404 icon: "../graphics/applicationIcons/contacts-app.png",
@@ -370,7 +412,7 @@ Row {
370 secondaryIconVisible: false,
412 secondaryIconVisible: false,
371 buttonRowVisible: false,
413 buttonRowVisible: false,
372 buttonTinted: false,
414 buttonTinted: false,
373− hasSound: true
415+ hasSound: false
@@ -437,8 +479,8 @@ Row {
437 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
479 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
439 if(data.buttonRowVisible) {
481 if(data.buttonRowVisible) {
440− var buttonCancel = findChild(buttonRow, "button1")
482+ var buttonCancel = findChild(buttonRow, "notify_button1")
441− var buttonAccept = findChild(buttonRow, "button0")
483+ var buttonAccept = findChild(buttonRow, "notify_button0")
443 // only test the left/cancel-button if two actions have been passed in
485 // only test the left/cancel-button if two actions have been passed in
444 if (data.actions.length == 2) {
486 if (data.actions.length == 2) {
@@ -448,7 +490,7 @@ Row {
450 // check the tinting of the positive/right button
492 // check the tinting of the positive/right button
451− verify(buttonAccept.gradient === data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")
493+ verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
453 // click the positive/right button
495 // click the positive/right button
454 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
496 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
@@ -458,19 +500,19 @@ Row {
459 // check if there's a ComboButton created due to more actions being passed
501 // check if there's a ComboButton created due to more actions being passed
460 if (data.actions.length > 2) {
502 if (data.actions.length > 2) {
461− var comboButton = findChild(notification, "button2")
503+ var comboButton = findChild(notification, "notify_button2")
462 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
504 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
464 // click to expand
506 // click to expand
465 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
507 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
467 // try clicking on choices in expanded comboList
509 // try clicking on choices in expanded comboList
468− var choiceButton1 = findChild(notification, "button3")
510+ var choiceButton1 = findChild(notification, "notify_button3")
469 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
511 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
470 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
512 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
471 actionSpy.clear()
513 actionSpy.clear()
473− var choiceButton2 = findChild(notification, "button4")
515+ var choiceButton2 = findChild(notification, "notify_button4")
474 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
516 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
475 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
517 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
476 actionSpy.clear()
518 actionSpy.clear()