@@ -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,37 @@ 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+
151168 function clearNotifications() {
152− mockModel.clear()
169+ while(mockModel.count > 1) {
170+ remove1stNotification()
171+ }
153172 }
154173
155174 function remove1stNotification() {
156− if (mockModel.count > 0)
157− mockModel.remove(0)
175+ if (mockModel.count > 1)
176+ mockModel.remove(1)
158177 }
159178
160179 Rectangle {
161180 id: notificationsRect
162181
163182 width: units.gu(40)
164− height: units.gu(71)
183+ height: units.gu(90)
165184
166185 MouseArea{
167186 id: clickThroughCatcher
@@ -183,7 +202,7 @@ Row {
183202 id: interactiveControls
184203
185204 width: units.gu(30)
186− height: units.gu(81)
205+ height: units.gu(90)
187206 color: "grey"
188207
189208 Column {
@@ -227,6 +246,12 @@ Row {
227246 onClicked: addInteractiveNotification()
228247 }
229248
249+ Button {
250+ width: parent.width
251+ text: "add a confirmation"
252+ onClicked: addConfirmationNotification()
253+ }
254+
230255 Button {
231256 width: parent.width
232257 text: "remove 1st notification"
@@ -264,12 +289,14 @@ Row {
264289 summaryVisible: true,
265290 bodyVisible: true,
266291 iconVisible: true,
267− shapedIcon: true,
268− nonShapedIcon: false,
292+ centeredIconVisible: false,
293+ shaped: true,
294+ nonShaped: false,
269295 secondaryIconVisible: true,
270296 buttonRowVisible: true,
271297 buttonTinted: true,
272− hasSound: false
298+ hasSound: false,
299+ valueVisible: false
273300 },
274301 {
275302 tag: "2-over-1 Snap Decision with button-tint",
@@ -285,31 +312,33 @@ Row {
285312 summaryVisible: true,
286313 bodyVisible: true,
287314 iconVisible: false,
288− shapedIcon: false,
289− nonShapedIcon: false,
315+ centeredIconVisible: false,
316+ shaped: false,
290317 secondaryIconVisible: false,
291318 buttonRowVisible: false,
292319 buttonTinted: true,
293− hasSound: false
320+ hasSound: false,
321+ valueVisible: false
294322 },
295323 {
296324 tag: "Ephemeral notification - icon-summary layout",
297325 type: Notification.Ephemeral,
298− hints: {"x-canonical-private-affirmative-tint": "false"},
326+ hints: {},
299327 summary: "Photo upload completed",
300328 body: "",
301− icon: "",
302− secondaryIcon: "../graphics/applicationIcons/facebook.png",
329+ icon: "../graphics/applicationIcons/facebook.png",
330+ secondaryIcon: "",
303331 actions: [],
304332 summaryVisible: true,
305333 bodyVisible: false,
306− iconVisible: false,
307− shapedIcon: false,
308− nonShapedIcon: false,
309− secondaryIconVisible: true,
334+ iconVisible: true,
335+ centeredIconVisible: false,
336+ shaped: true,
337+ secondaryIconVisible: false,
310338 buttonRowVisible: false,
311339 buttonTinted: false,
312− hasSound: false
340+ hasSound: false,
341+ valueVisible: false
313342 },
314343 {
315344 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
@@ -326,12 +355,13 @@ Row {
326355 bodyVisible: false,
327356 interactiveAreaEnabled: false,
328357 iconVisible: false,
329− shapedIcon: false,
330− nonShapedIcon: false,
358+ centeredIconVisible: false,
359+ shaped: false,
331360 secondaryIconVisible: true,
332361 buttonRowVisible: false,
333362 buttonTinted: false,
334− hasSound: false
363+ hasSound: false,
364+ valueVisible: false
335365 },
336366 {
337367 tag: "Interactive notification",
@@ -346,12 +376,13 @@ Row {
346376 summaryVisible: true,
347377 bodyVisible: true,
348378 iconVisible: true,
349− shapedIcon: true,
350− nonShapedIcon: false,
379+ centeredIconVisible: false,
380+ shaped: true,
351381 secondaryIconVisible: false,
352382 buttonRowVisible: false,
353383 buttonTinted: false,
354− hasSound: true
384+ hasSound: true,
385+ valueVisible: false
355386 },
356387 {
357388 tag: "Snap Decision without secondary icon and no button-tint",
@@ -367,12 +398,13 @@ Row {
367398 summaryVisible: true,
368399 bodyVisible: true,
369400 iconVisible: true,
370− shapedIcon: true,
371− nonShapedIcon: false,
401+ centeredIconVisible: false,
402+ shaped: true,
372403 secondaryIconVisible: false,
373404 buttonRowVisible: true,
374405 buttonTinted: false,
375− hasSound: true
406+ hasSound: true,
407+ valueVisible: false
376408 },
377409 {
378410 tag: "Ephemeral notification",
@@ -387,12 +419,13 @@ Row {
387419 summaryVisible: true,
388420 bodyVisible: true,
389421 iconVisible: true,
390− shapedIcon: true,
391− nonShapedIcon: false,
422+ centeredIconVisible: false,
423+ shaped: true,
392424 secondaryIconVisible: true,
393425 buttonRowVisible: false,
394426 buttonTinted: false,
395− hasSound: true
427+ hasSound: true,
428+ valueVisible: false
396429 },
397430 {
398431 tag: "Ephemeral notification with non-shaped icon",
@@ -401,18 +434,40 @@ Row {
401434 "x-canonical-non-shaped-icon": "true"},
402435 summary: "Contacts",
403436 body: "Synchronised contacts-database with cloud-storage.",
404− icon: "../graphics/applicationIcons/contacts-app.png",
437+ icon: "image://theme/contacts-app",
405438 secondaryIcon: "",
406439 actions: [],
407440 summaryVisible: true,
408441 bodyVisible: true,
409442 iconVisible: true,
410− shapedIcon: false,
411− nonShapedIcon: true,
443+ centeredIconVisible: false,
444+ shaped: false,
412445 secondaryIconVisible: false,
413446 buttonRowVisible: false,
414447 buttonTinted: false,
415− hasSound: false
448+ hasSound: false,
449+ valueVisible: false
450+ },
451+ {
452+ tag: "Confirmation notification with value",
453+ type: Notification.Confirmation,
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: [],
461+ summaryVisible: false,
462+ bodyVisible: false,
463+ iconVisible: false,
464+ centeredIconVisible: true,
465+ shaped: false,
466+ secondaryIconVisible: false,
467+ buttonRowVisible: false,
468+ buttonTinted: false,
469+ hasSound: false,
470+ valueVisible: true
416471 }
417472 ]
418473 }
@@ -450,17 +505,23 @@ Row {
450505 waitForRendering(notification);
451506
452507 var icon = findChild(notification, "icon")
453− var shapedIcon = findChild(notification, "shapedIcon")
454− var nonShapedIcon = findChild(notification, "nonShapedIcon")
508+ var centeredIcon = findChild(notification, "centeredIcon")
455509 var interactiveArea = findChild(notification, "interactiveArea")
456510 var secondaryIcon = findChild(notification, "secondaryIcon")
457511 var summaryLabel = findChild(notification, "summaryLabel")
458512 var bodyLabel = findChild(notification, "bodyLabel")
459513 var buttonRow = findChild(notification, "buttonRow")
514+ var valueIndicator = findChild(notification, "valueIndicator")
460515
461516 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")
517+ if (icon.visible) {
518+ compare(icon.shaped, data.shaped, "shaped-status is incorrect")
519+ }
520+ compare(centeredIcon.visible, data.centeredIconVisible, "centered-icon visibility is incorrect")
521+ if (centeredIcon.visible) {
522+ compare(centeredIcon.shaped, data.shaped, "shaped-status is incorrect")
523+ }
524+ compare(valueIndicator.visible, data.valueVisible, "value-indicator visibility is incorrect")
464525
465526 // test input does not fall through
466527 mouseClick(notification, notification.width / 2, notification.height / 2)