@@ -267,21 +267,123 @@ Item {
267 name: "NotificationRendererTest"
267 name: "NotificationRendererTest"
268 when: windowShown
268 when: windowShown
270+ property list<Notification> nlist: [
273+ type: Notification.SnapDecision
274+ hints: {"x-canonical-private-affirmative-tint": "true"}
275+ summary: "Theatre at Ferria Stadium"
276+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317"
280+ rawActions: ["ok_id", "Ok",
281+ "snooze_id", "Snooze",
286+ type: Notification.Ephemeral
288+ summary: "Photo upload completed"
290+ icon: "../graphics/applicationIcons/facebook.png"
297+ type: Notification.Ephemeral
298+ hints: {"x-canonical-private-affirmative-tint": "false",
299+ "sound-file": "dummy.ogg",
300+ "suppress-sound": "true"}
301+ summary: "New comment successfully published"
304+ secondaryIcon: "../graphics/applicationIcons/facebook.png"
310+ type: Notification.Interactive
311+ hints: {"x-canonical-private-affirmative-tint": "false",
312+ "sound-file": "dummy.ogg"}
313+ summary: "Interactive notification"
314+ body: "This is a notification that can be clicked"
315+ icon: "../graphics/avatars/amanda.png"
318+ rawActions: ["reply_id", "Dummy"]
322+ type: Notification.SnapDecision
323+ hints: {"x-canonical-private-affirmative-tint": "false",
324+ "sound-file": "dummy.ogg"}
326+ 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."
327+ icon: "../graphics/avatars/anna_olsson.png"
330+ rawActions: ["accept_id", "Accept",
331+ "reject_id", "Reject"]
335+ type: Notification.Ephemeral
336+ hints: {"x-canonical-private-affirmative-tint": "false",
337+ "sound-file": "dummy.ogg"}
338+ summary: "Cole Raby"
339+ body: "I did not expect it to be that late."
340+ icon: "../graphics/avatars/funky.png"
341+ secondaryIcon: "../graphics/applicationIcons/facebook.png"
347+ type: Notification.Ephemeral
348+ hints: {"x-canonical-private-affirmative-tint": "false",
349+ "x-canonical-non-shaped-icon": "true"}
351+ body: "Synchronised contacts-database with cloud-storage."
352+ icon: "image://theme/contacts-app"
359+ type: Notification.Confirmation
360+ hints: {"x-canonical-non-shaped-icon": "true"}
363+ icon: "image://theme/audio-volume-medium"
370+ type: Notification.Confirmation
371+ hints: {"x-canonical-non-shaped-icon": "true",
372+ "x-canonical-value-bar-tint" : "true"}
375+ icon: "image://theme/audio-volume-high"
270 function test_NotificationRenderer_data() {
382 function test_NotificationRenderer_data() {
273 tag: "2-over-1 Snap Decision with button-tint",
385 tag: "2-over-1 Snap Decision with button-tint",
274− type: Notification.SnapDecision,
386+ n: nlist[0],
276− hints: {"x-canonical-private-affirmative-tint": "true"},
277− summary: "Theatre at Ferria Stadium",
278− 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,
387 summaryVisible: true,
286 bodyVisible: true,
388 bodyVisible: true,
287 iconVisible: false,
389 iconVisible: false,
@@ -297,15 +399,7 @@ Item {
299 tag: "Ephemeral notification - icon-summary layout",
401 tag: "Ephemeral notification - icon-summary layout",
300− type: Notification.Ephemeral,
402+ n: nlist[1],
303− summary: "Photo upload completed",
305− icon: "../graphics/applicationIcons/facebook.png",
309 summaryVisible: true,
403 summaryVisible: true,
310 bodyVisible: false,
404 bodyVisible: false,
311 iconVisible: true,
405 iconVisible: true,
@@ -321,17 +415,7 @@ Item {
323 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
417 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
324− type: Notification.Ephemeral,
418+ n: nlist[2],
326− hints: {"x-canonical-private-affirmative-tint": "false",
327− "sound-file": "dummy.ogg",
328− "suppress-sound": "true"},
329− summary: "New comment successfully published",
332− secondaryIcon: "../graphics/applicationIcons/facebook.png",
335 summaryVisible: true,
419 summaryVisible: true,
336 bodyVisible: false,
420 bodyVisible: false,
337 interactiveAreaEnabled: false,
421 interactiveAreaEnabled: false,
@@ -348,16 +432,7 @@ Item {
350 tag: "Interactive notification",
434 tag: "Interactive notification",
351− type: Notification.Interactive,
435+ n: nlist[3],
353− hints: {"x-canonical-private-affirmative-tint": "false",
354− "sound-file": "dummy.ogg"},
355− summary: "Interactive notification",
356− body: "This is a notification that can be clicked",
357− icon: "../graphics/avatars/amanda.png",
360− actions: [{ id: "reply_id", label: "Dummy"}],
361 summaryVisible: true,
436 summaryVisible: true,
362 bodyVisible: true,
437 bodyVisible: true,
363 iconVisible: true,
438 iconVisible: true,
@@ -373,17 +448,7 @@ Item {
375 tag: "Snap Decision without secondary icon and no button-tint",
450 tag: "Snap Decision without secondary icon and no button-tint",
376− type: Notification.SnapDecision,
451+ n: nlist[4],
378− hints: {"x-canonical-private-affirmative-tint": "false",
379− "sound-file": "dummy.ogg"},
380− summary: "Bro Coly",
381− 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.",
382− icon: "../graphics/avatars/anna_olsson.png",
385− actions: [{ id: "accept_id", label: "Accept"},
386− { id: "reject_id", label: "Reject"}],
387 summaryVisible: true,
452 summaryVisible: true,
388 bodyVisible: true,
453 bodyVisible: true,
389 iconVisible: true,
454 iconVisible: true,
@@ -399,16 +464,7 @@ Item {
401 tag: "Ephemeral notification",
466 tag: "Ephemeral notification",
402− type: Notification.Ephemeral,
467+ n: nlist[5],
404− hints: {"x-canonical-private-affirmative-tint": "false",
405− "sound-file": "dummy.ogg"},
406− summary: "Cole Raby",
407− body: "I did not expect it to be that late.",
408− icon: "../graphics/avatars/funky.png",
409− secondaryIcon: "../graphics/applicationIcons/facebook.png",
412 summaryVisible: true,
468 summaryVisible: true,
413 bodyVisible: true,
469 bodyVisible: true,
414 iconVisible: true,
470 iconVisible: true,
@@ -424,16 +480,7 @@ Item {
426 tag: "Ephemeral notification with non-shaped icon",
482 tag: "Ephemeral notification with non-shaped icon",
427− type: Notification.Ephemeral,
483+ n: nlist[6],
429− hints: {"x-canonical-private-affirmative-tint": "false",
430− "x-canonical-non-shaped-icon": "true"},
431− summary: "Contacts",
432− body: "Synchronised contacts-database with cloud-storage.",
433− icon: "image://theme/contacts-app",
437 summaryVisible: true,
484 summaryVisible: true,
438 bodyVisible: true,
485 bodyVisible: true,
439 iconVisible: true,
486 iconVisible: true,
@@ -449,15 +496,7 @@ Item {
451 tag: "Confirmation notification with value",
498 tag: "Confirmation notification with value",
452− type: Notification.Confirmation,
499+ n: nlist[7],
454− hints: {"x-canonical-non-shaped-icon": "true"},
457− icon: "image://theme/audio-volume-medium",
461 summaryVisible: false,
500 summaryVisible: false,
462 bodyVisible: false,
501 bodyVisible: false,
463 iconVisible: false,
502 iconVisible: false,
@@ -473,16 +512,7 @@ Item {
475 tag: "Confirmation notification with value, label and tint",
514 tag: "Confirmation notification with value, label and tint",
476− type: Notification.Confirmation,
515+ n: nlist[8],
478− hints: {"x-canonical-non-shaped-icon": "true",
479− "x-canonical-value-bar-tint" : "true"},
481− body: "High Volume",
482− icon: "image://theme/audio-volume-high",
486 summaryVisible: false,
516 summaryVisible: false,
487 bodyVisible: false,
517 bodyVisible: false,
488 iconVisible: false,
518 iconVisible: false,
@@ -520,7 +550,7 @@ Item {
521 function test_NotificationRenderer(data) {
551 function test_NotificationRenderer(data) {
522 // populate model with some mock notifications
552 // populate model with some mock notifications
523− mockModel.append(data)
553+ mockModel.append(data.n)
525 // make sure the view is properly updated before going on
555 // make sure the view is properly updated before going on
526 notifications.forceLayout();
556 notifications.forceLayout();