@@ -267,21 +267,123 @@ Item {
267267 name: "NotificationRendererTest"
268268 when: windowShown
269269
270+ property list<Notification> nlist: [
271+ Notification {
272+ nid: index++
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"
277+ icon: ""
278+ secondaryIcon: ""
279+ value: 0
280+ rawActions: ["ok_id", "Ok",
281+ "snooze_id", "Snooze",
282+ "view_id", "View"]
283+ },
284+ Notification {
285+ nid: index++
286+ type: Notification.Ephemeral
287+ hints: {}
288+ summary: "Photo upload completed"
289+ body: ""
290+ icon: "../graphics/applicationIcons/facebook.png"
291+ secondaryIcon: ""
292+ value: 0
293+ rawActions: []
294+ },
295+ Notification {
296+ nid: index++
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"
302+ body: ""
303+ icon: ""
304+ secondaryIcon: "../graphics/applicationIcons/facebook.png"
305+ value: 0
306+ rawActions: []
307+ },
308+ Notification {
309+ nid: index++
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"
316+ secondaryIcon: ""
317+ value: 0
318+ rawActions: ["reply_id", "Dummy"]
319+ },
320+ Notification {
321+ nid: index++
322+ type: Notification.SnapDecision
323+ hints: {"x-canonical-private-affirmative-tint": "false",
324+ "sound-file": "dummy.ogg"}
325+ summary: "Bro Coly"
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"
328+ secondaryIcon: ""
329+ value: 0
330+ rawActions: ["accept_id", "Accept",
331+ "reject_id", "Reject"]
332+ },
333+ Notification {
334+ nid: index++
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"
342+ value: 0
343+ rawActions: []
344+ },
345+ Notification {
346+ nid: index++
347+ type: Notification.Ephemeral
348+ hints: {"x-canonical-private-affirmative-tint": "false",
349+ "x-canonical-non-shaped-icon": "true"}
350+ summary: "Contacts"
351+ body: "Synchronised contacts-database with cloud-storage."
352+ icon: "image://theme/contacts-app"
353+ secondaryIcon: ""
354+ value: 0
355+ rawActions: []
356+ },
357+ Notification {
358+ nid: index++
359+ type: Notification.Confirmation
360+ hints: {"x-canonical-non-shaped-icon": "true"}
361+ summary: ""
362+ body: ""
363+ icon: "image://theme/audio-volume-medium"
364+ secondaryIcon: ""
365+ value: 50
366+ rawActions: []
367+ },
368+ Notification {
369+ nid: index++
370+ type: Notification.Confirmation
371+ hints: {"x-canonical-non-shaped-icon": "true",
372+ "x-canonical-value-bar-tint" : "true"}
373+ summary: ""
374+ body: "High Volume"
375+ icon: "image://theme/audio-volume-high"
376+ secondaryIcon: ""
377+ value: 85
378+ rawActions: []
379+ }
380+ ]
381+
270382 function test_NotificationRenderer_data() {
271383 return [
272384 {
273385 tag: "2-over-1 Snap Decision with button-tint",
274− type: Notification.SnapDecision,
275− nid: 2,
276− hints: {"x-canonical-private-affirmative-tint": "true"},
277− summary: "Theatre at Ferria Stadium",
278− body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
279− icon: "",
280− secondaryIcon: "",
281− value: 0,
282− actions: [{ id: "ok_id", label: "Ok"},
283− { id: "snooze_id", label: "Snooze"},
284− { id: "view_id", label: "View"}],
386+ n: nlist[0],
285387 summaryVisible: true,
286388 bodyVisible: true,
287389 iconVisible: false,
@@ -297,15 +399,7 @@ Item {
297399 },
298400 {
299401 tag: "Ephemeral notification - icon-summary layout",
300− type: Notification.Ephemeral,
301− nid: 3,
302− hints: {},
303− summary: "Photo upload completed",
304− body: "",
305− icon: "../graphics/applicationIcons/facebook.png",
306− secondaryIcon: "",
307− value: 0,
308− actions: [],
402+ n: nlist[1],
309403 summaryVisible: true,
310404 bodyVisible: false,
311405 iconVisible: true,
@@ -321,17 +415,7 @@ Item {
321415 },
322416 {
323417 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
324− type: Notification.Ephemeral,
325− nid: 4,
326− hints: {"x-canonical-private-affirmative-tint": "false",
327− "sound-file": "dummy.ogg",
328− "suppress-sound": "true"},
329− summary: "New comment successfully published",
330− body: "",
331− icon: "",
332− secondaryIcon: "../graphics/applicationIcons/facebook.png",
333− value: 0,
334− actions: [],
418+ n: nlist[2],
335419 summaryVisible: true,
336420 bodyVisible: false,
337421 interactiveAreaEnabled: false,
@@ -348,16 +432,7 @@ Item {
348432 },
349433 {
350434 tag: "Interactive notification",
351− type: Notification.Interactive,
352− nid: 5,
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",
358− secondaryIcon: "",
359− value: 0,
360− actions: [{ id: "reply_id", label: "Dummy"}],
435+ n: nlist[3],
361436 summaryVisible: true,
362437 bodyVisible: true,
363438 iconVisible: true,
@@ -373,17 +448,7 @@ Item {
373448 },
374449 {
375450 tag: "Snap Decision without secondary icon and no button-tint",
376− type: Notification.SnapDecision,
377− nid: 6,
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",
383− secondaryIcon: "",
384− value: 0,
385− actions: [{ id: "accept_id", label: "Accept"},
386− { id: "reject_id", label: "Reject"}],
451+ n: nlist[4],
387452 summaryVisible: true,
388453 bodyVisible: true,
389454 iconVisible: true,
@@ -399,16 +464,7 @@ Item {
399464 },
400465 {
401466 tag: "Ephemeral notification",
402− type: Notification.Ephemeral,
403− nid: 7,
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",
410− value: 0,
411− actions: [],
467+ n: nlist[5],
412468 summaryVisible: true,
413469 bodyVisible: true,
414470 iconVisible: true,
@@ -424,16 +480,7 @@ Item {
424480 },
425481 {
426482 tag: "Ephemeral notification with non-shaped icon",
427− type: Notification.Ephemeral,
428− nid: 8,
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",
434− secondaryIcon: "",
435− value: 0,
436− actions: [],
483+ n: nlist[6],
437484 summaryVisible: true,
438485 bodyVisible: true,
439486 iconVisible: true,
@@ -449,15 +496,7 @@ Item {
449496 },
450497 {
451498 tag: "Confirmation notification with value",
452− type: Notification.Confirmation,
453− nid: 9,
454− hints: {"x-canonical-non-shaped-icon": "true"},
455− summary: "",
456− body: "",
457− icon: "image://theme/audio-volume-medium",
458− secondaryIcon: "",
459− value: 50,
460− actions: [],
499+ n: nlist[7],
461500 summaryVisible: false,
462501 bodyVisible: false,
463502 iconVisible: false,
@@ -473,16 +512,7 @@ Item {
473512 },
474513 {
475514 tag: "Confirmation notification with value, label and tint",
476− type: Notification.Confirmation,
477− nid: 10,
478− hints: {"x-canonical-non-shaped-icon": "true",
479− "x-canonical-value-bar-tint" : "true"},
480− summary: "",
481− body: "High Volume",
482− icon: "image://theme/audio-volume-high",
483− secondaryIcon: "",
484− value: 85,
485− actions: [],
515+ n: nlist[8],
486516 summaryVisible: false,
487517 bodyVisible: false,
488518 iconVisible: false,
@@ -520,7 +550,7 @@ Item {
520550
521551 function test_NotificationRenderer(data) {
522552 // populate model with some mock notifications
523− mockModel.append(data)
553+ mockModel.append(data.n)
524554
525555 // make sure the view is properly updated before going on
526556 notifications.forceLayout();