@@ -53,6 +53,7 @@ Row {
5353 summary: "",
5454 body: "",
5555 icon: "",
56+ value: 0,
5657 secondaryIcon: "",
5758 actions: []
5859 }
@@ -125,10 +126,11 @@ Row {
125126 function addEphemeralIconSummaryNotification() {
126127 var n = {
127128 type: Notification.Ephemeral,
129+ hints: {"x-canonical-non-shaped-icon": "false"},
128130 summary: "Photo upload completed",
129131 body: "",
130− icon: "",
131− secondaryIcon: "../graphics/applicationIcons/facebook.png",
132+ icon: "../graphics/applicationIcons/facebook.png",
133+ secondaryIcon: "",
132134 actions: []
133135 }
134136
@@ -148,20 +150,53 @@ Row {
148150 mockModel.append(n)
149151 }
150152
153+ function addConfirmationNotification() {
154+ var n = {
155+ type: Notification.Confirmation,
156+ hints: {"x-canonical-non-shaped-icon": "true"},
157+ summary: "Confirmation notification",
158+ body: "",
159+ icon: "image://theme/audio-volume-medium",
160+ secondaryIcon: "",
161+ value: 50,
162+ actions: [],
163+ }
164+
165+ mockModel.append(n)
166+ }
167+
168+ function add2ndConfirmationNotification() {
169+ var n = {
170+ type: Notification.Confirmation,
171+ hints: {"x-canonical-non-shaped-icon": "true",
172+ "x-canonical-value-bar-tint": "true"},
173+ summary: "Confirmation notification",
174+ body: "High Volume",
175+ icon: "image://theme/audio-volume-high",
176+ secondaryIcon: "",
177+ value: 85,
178+ actions: [],
179+ }
180+
181+ mockModel.append(n)
182+ }
183+
151184 function clearNotifications() {
152− mockModel.clear()
185+ while(mockModel.count > 1) {
186+ remove1stNotification()
187+ }
153188 }
154189
155190 function remove1stNotification() {
156− if (mockModel.count > 0)
157− mockModel.remove(0)
191+ if (mockModel.count > 1)
192+ mockModel.remove(1)
158193 }
159194
160195 Rectangle {
161196 id: notificationsRect
162197
163198 width: units.gu(40)
164− height: units.gu(71)
199+ height: units.gu(115)
165200
166201 MouseArea{
167202 id: clickThroughCatcher
@@ -183,7 +218,7 @@ Row {
183218 id: interactiveControls
184219
185220 width: units.gu(30)
186− height: units.gu(81)
221+ height: units.gu(115)
187222 color: "grey"
188223
189224 Column {
@@ -227,6 +262,18 @@ Row {
227262 onClicked: addInteractiveNotification()
228263 }
229264
265+ Button {
266+ width: parent.width
267+ text: "add a confirmation"
268+ onClicked: addConfirmationNotification()
269+ }
270+
271+ Button {
272+ width: parent.width
273+ text: "add a 2nd confirmation"
274+ onClicked: add2ndConfirmationNotification()
275+ }
276+
230277 Button {
231278 width: parent.width
232279 text: "remove 1st notification"
@@ -264,12 +311,16 @@ Row {
264311 summaryVisible: true,
265312 bodyVisible: true,
266313 iconVisible: true,
267− shapedIcon: true,
268− nonShapedIcon: false,
314+ centeredIconVisible: false,
315+ shaped: true,
316+ nonShaped: false,
269317 secondaryIconVisible: true,
270318 buttonRowVisible: true,
271319 buttonTinted: true,
272− hasSound: false
320+ hasSound: false,
321+ valueVisible: false,
322+ valueLabelVisible: false,
323+ valueTinted: false
273324 },
274325 {
275326 tag: "2-over-1 Snap Decision with button-tint",
@@ -285,31 +336,37 @@ Row {
285336 summaryVisible: true,
286337 bodyVisible: true,
287338 iconVisible: false,
288− shapedIcon: false,
289− nonShapedIcon: false,
339+ centeredIconVisible: false,
340+ shaped: false,
290341 secondaryIconVisible: false,
291342 buttonRowVisible: false,
292343 buttonTinted: true,
293− hasSound: false
344+ hasSound: false,
345+ valueVisible: false,
346+ valueLabelVisible: false,
347+ valueTinted: false
294348 },
295349 {
296350 tag: "Ephemeral notification - icon-summary layout",
297351 type: Notification.Ephemeral,
298− hints: {"x-canonical-private-affirmative-tint": "false"},
352+ hints: {},
299353 summary: "Photo upload completed",
300354 body: "",
301− icon: "",
302− secondaryIcon: "../graphics/applicationIcons/facebook.png",
355+ icon: "../graphics/applicationIcons/facebook.png",
356+ secondaryIcon: "",
303357 actions: [],
304358 summaryVisible: true,
305359 bodyVisible: false,
306− iconVisible: false,
307− shapedIcon: false,
308− nonShapedIcon: false,
309− secondaryIconVisible: true,
360+ iconVisible: true,
361+ centeredIconVisible: false,
362+ shaped: true,
363+ secondaryIconVisible: false,
310364 buttonRowVisible: false,
311365 buttonTinted: false,
312− hasSound: false
366+ hasSound: false,
367+ valueVisible: false,
368+ valueLabelVisible: false,
369+ valueTinted: false
313370 },
314371 {
315372 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
@@ -326,12 +383,15 @@ Row {
326383 bodyVisible: false,
327384 interactiveAreaEnabled: false,
328385 iconVisible: false,
329− shapedIcon: false,
330− nonShapedIcon: false,
386+ centeredIconVisible: false,
387+ shaped: false,
331388 secondaryIconVisible: true,
332389 buttonRowVisible: false,
333390 buttonTinted: false,
334− hasSound: false
391+ hasSound: false,
392+ valueVisible: false,
393+ valueLabelVisible: false,
394+ valueTinted: false
335395 },
336396 {
337397 tag: "Interactive notification",
@@ -346,12 +406,15 @@ Row {
346406 summaryVisible: true,
347407 bodyVisible: true,
348408 iconVisible: true,
349− shapedIcon: true,
350− nonShapedIcon: false,
409+ centeredIconVisible: false,
410+ shaped: true,
351411 secondaryIconVisible: false,
352412 buttonRowVisible: false,
353413 buttonTinted: false,
354− hasSound: true
414+ hasSound: true,
415+ valueVisible: false,
416+ valueLabelVisible: false,
417+ valueTinted: false
355418 },
356419 {
357420 tag: "Snap Decision without secondary icon and no button-tint",
@@ -367,12 +430,15 @@ Row {
367430 summaryVisible: true,
368431 bodyVisible: true,
369432 iconVisible: true,
370− shapedIcon: true,
371− nonShapedIcon: false,
433+ centeredIconVisible: false,
434+ shaped: true,
372435 secondaryIconVisible: false,
373436 buttonRowVisible: true,
374437 buttonTinted: false,
375− hasSound: true
438+ hasSound: true,
439+ valueVisible: false,
440+ valueLabelVisible: false,
441+ valueTinted: false
376442 },
377443 {
378444 tag: "Ephemeral notification",
@@ -387,12 +453,15 @@ Row {
387453 summaryVisible: true,
388454 bodyVisible: true,
389455 iconVisible: true,
390− shapedIcon: true,
391− nonShapedIcon: false,
456+ centeredIconVisible: false,
457+ shaped: true,
392458 secondaryIconVisible: true,
393459 buttonRowVisible: false,
394460 buttonTinted: false,
395− hasSound: true
461+ hasSound: true,
462+ valueVisible: false,
463+ valueLabelVisible: false,
464+ valueTinted: false
396465 },
397466 {
398467 tag: "Ephemeral notification with non-shaped icon",
@@ -401,18 +470,68 @@ Row {
401470 "x-canonical-non-shaped-icon": "true"},
402471 summary: "Contacts",
403472 body: "Synchronised contacts-database with cloud-storage.",
404− icon: "../graphics/applicationIcons/contacts-app.png",
473+ icon: "image://theme/contacts-app",
405474 secondaryIcon: "",
406475 actions: [],
407476 summaryVisible: true,
408477 bodyVisible: true,
409478 iconVisible: true,
410− shapedIcon: false,
411− nonShapedIcon: true,
479+ centeredIconVisible: false,
480+ shaped: false,
481+ secondaryIconVisible: false,
482+ buttonRowVisible: false,
483+ buttonTinted: false,
484+ hasSound: false,
485+ valueVisible: false,
486+ valueLabelVisible: false,
487+ valueTinted: false
488+ },
489+ {
490+ tag: "Confirmation notification with value",
491+ type: Notification.Confirmation,
492+ hints: {"x-canonical-non-shaped-icon": "true"},
493+ summary: "",
494+ body: "",
495+ icon: "image://theme/audio-volume-medium",
496+ secondaryIcon: "",
497+ value: 50,
498+ actions: [],
499+ summaryVisible: false,
500+ bodyVisible: false,
501+ iconVisible: false,
502+ centeredIconVisible: true,
503+ shaped: false,
412504 secondaryIconVisible: false,
413505 buttonRowVisible: false,
414506 buttonTinted: false,
415− hasSound: false
507+ hasSound: false,
508+ valueVisible: true,
509+ valueLabelVisible: false,
510+ valueTinted: false
511+ },
512+ {
513+ tag: "Confirmation notification with value, label and tint",
514+ type: Notification.Confirmation,
515+ hints: {"x-canonical-non-shaped-icon": "true",
516+ "x-canonical-value-bar-tint" : "true"},
517+ summary: "",
518+ body: "High Volume",
519+ icon: "image://theme/audio-volume-high",
520+ secondaryIcon: "",
521+ value: 85,
522+ actions: [],
523+ summaryVisible: false,
524+ bodyVisible: false,
525+ iconVisible: false,
526+ centeredIconVisible: true,
527+ shaped: false,
528+ secondaryIconVisible: false,
529+ buttonRowVisible: false,
530+ buttonTinted: false,
531+ hasSound: false,
532+ valueVisible: true,
533+ valueLabelVisible: true,
534+ valueTinted: true
416535 }
417536 ]
418537 }
@@ -450,17 +569,29 @@ Row {
450569 waitForRendering(notification);
451570
452571 var icon = findChild(notification, "icon")
453− var shapedIcon = findChild(notification, "shapedIcon")
454− var nonShapedIcon = findChild(notification, "nonShapedIcon")
572+ var centeredIcon = findChild(notification, "centeredIcon")
455573 var interactiveArea = findChild(notification, "interactiveArea")
456574 var secondaryIcon = findChild(notification, "secondaryIcon")
457575 var summaryLabel = findChild(notification, "summaryLabel")
458576 var bodyLabel = findChild(notification, "bodyLabel")
459577 var buttonRow = findChild(notification, "buttonRow")
578+ var valueIndicator = findChild(notification, "valueIndicator")
579+ var valueLabel = findChild(notification, "valueLabel")
580+ var innerBar = findChild(notification, "innerBar")
460581
461582 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
462− compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")
463− compare(nonShapedIcon.visible, data.nonShapedIcon, "non-shaped-icon visibility is incorrect")
583+ if (icon.visible) {
584+ compare(icon.shaped, data.shaped, "shaped-status is incorrect")
585+ }
586+ compare(centeredIcon.visible, data.centeredIconVisible, "centered-icon visibility is incorrect")
587+ if (centeredIcon.visible) {
588+ compare(centeredIcon.shaped, data.shaped, "shaped-status is incorrect")
589+ }
590+ compare(valueIndicator.visible, data.valueVisible, "value-indicator visibility is incorrect")
591+ if (valueIndicator.visible) {
592+ verify(innerBar.color === data.valueTinted ? UbuntuColors.orange : "white", "value-bar has the wrong color-tint")
593+ }
594+ compare(valueLabel.visible, data.valueLabelVisible, "value-label visibility is incorrect")
464595
465596 // test input does not fall through
466597 mouseClick(notification, notification.width / 2, notification.height / 2)