@@ -165,6 +165,22 @@ Row {
165 mockModel.append(n)
165 mockModel.append(n)
168+ function add2ndConfirmationNotification() {
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",
168 function clearNotifications() {
184 function clearNotifications() {
169 while(mockModel.count > 1) {
185 while(mockModel.count > 1) {
170 remove1stNotification()
186 remove1stNotification()
@@ -180,7 +196,7 @@ Row {
180 id: notificationsRect
196 id: notificationsRect
182 width: units.gu(40)
198 width: units.gu(40)
183− height: units.gu(90)
199+ height: units.gu(115)
185 MouseArea{
201 MouseArea{
186 id: clickThroughCatcher
202 id: clickThroughCatcher
@@ -202,7 +218,7 @@ Row {
202 id: interactiveControls
218 id: interactiveControls
204 width: units.gu(30)
220 width: units.gu(30)
205− height: units.gu(90)
221+ height: units.gu(115)
206 color: "grey"
222 color: "grey"
@@ -252,6 +268,12 @@ Row {
252 onClicked: addConfirmationNotification()
268 onClicked: addConfirmationNotification()
273+ text: "add a 2nd confirmation"
274+ onClicked: add2ndConfirmationNotification()
256 width: parent.width
278 width: parent.width
257 text: "remove 1st notification"
279 text: "remove 1st notification"
@@ -296,7 +318,9 @@ Row {
296 buttonRowVisible: true,
318 buttonRowVisible: true,
297 buttonTinted: true,
319 buttonTinted: true,
298 hasSound: false,
320 hasSound: false,
299− valueVisible: false
321+ valueVisible: false,
322+ valueLabelVisible: false,
302 tag: "2-over-1 Snap Decision with button-tint",
326 tag: "2-over-1 Snap Decision with button-tint",
@@ -318,7 +342,9 @@ Row {
318 buttonRowVisible: false,
342 buttonRowVisible: false,
319 buttonTinted: true,
343 buttonTinted: true,
320 hasSound: false,
344 hasSound: false,
321− valueVisible: false
345+ valueVisible: false,
346+ valueLabelVisible: false,
324 tag: "Ephemeral notification - icon-summary layout",
350 tag: "Ephemeral notification - icon-summary layout",
@@ -338,7 +364,9 @@ Row {
338 buttonRowVisible: false,
364 buttonRowVisible: false,
339 buttonTinted: false,
365 buttonTinted: false,
340 hasSound: false,
366 hasSound: false,
341− valueVisible: false
367+ valueVisible: false,
368+ valueLabelVisible: false,
344 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
372 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
@@ -361,7 +389,9 @@ Row {
361 buttonRowVisible: false,
389 buttonRowVisible: false,
362 buttonTinted: false,
390 buttonTinted: false,
363 hasSound: false,
391 hasSound: false,
364− valueVisible: false
392+ valueVisible: false,
393+ valueLabelVisible: false,
367 tag: "Interactive notification",
397 tag: "Interactive notification",
@@ -382,7 +412,9 @@ Row {
382 buttonRowVisible: false,
412 buttonRowVisible: false,
383 buttonTinted: false,
413 buttonTinted: false,
384 hasSound: true,
414 hasSound: true,
385− valueVisible: false
415+ valueVisible: false,
416+ valueLabelVisible: false,
388 tag: "Snap Decision without secondary icon and no button-tint",
420 tag: "Snap Decision without secondary icon and no button-tint",
@@ -404,7 +436,9 @@ Row {
404 buttonRowVisible: true,
436 buttonRowVisible: true,
405 buttonTinted: false,
437 buttonTinted: false,
406 hasSound: true,
438 hasSound: true,
407− valueVisible: false
439+ valueVisible: false,
440+ valueLabelVisible: false,
410 tag: "Ephemeral notification",
444 tag: "Ephemeral notification",
@@ -425,7 +459,9 @@ Row {
425 buttonRowVisible: false,
459 buttonRowVisible: false,
426 buttonTinted: false,
460 buttonTinted: false,
427 hasSound: true,
461 hasSound: true,
428− valueVisible: false
462+ valueVisible: false,
463+ valueLabelVisible: false,
431 tag: "Ephemeral notification with non-shaped icon",
467 tag: "Ephemeral notification with non-shaped icon",
@@ -446,7 +482,9 @@ Row {
446 buttonRowVisible: false,
482 buttonRowVisible: false,
447 buttonTinted: false,
483 buttonTinted: false,
448 hasSound: false,
484 hasSound: false,
449− valueVisible: false
485+ valueVisible: false,
486+ valueLabelVisible: false,
452 tag: "Confirmation notification with value",
490 tag: "Confirmation notification with value",
@@ -467,7 +505,33 @@ Row {
467 buttonRowVisible: false,
505 buttonRowVisible: false,
468 buttonTinted: false,
506 buttonTinted: false,
469 hasSound: false,
507 hasSound: false,
470− valueVisible: true
508+ valueVisible: true,
509+ valueLabelVisible: false,
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"},
518+ body: "High Volume",
519+ icon: "image://theme/audio-volume-high",
523+ summaryVisible: false,
526+ centeredIconVisible: true,
528+ secondaryIconVisible: false,
529+ buttonRowVisible: false,
530+ buttonTinted: false,
533+ valueLabelVisible: true,
@@ -512,6 +576,8 @@ Row {
512 var bodyLabel = findChild(notification, "bodyLabel")
576 var bodyLabel = findChild(notification, "bodyLabel")
513 var buttonRow = findChild(notification, "buttonRow")
577 var buttonRow = findChild(notification, "buttonRow")
514 var valueIndicator = findChild(notification, "valueIndicator")
578 var valueIndicator = findChild(notification, "valueIndicator")
579+ var valueLabel = findChild(notification, "valueLabel")
580+ var innerBar = findChild(notification, "innerBar")
516 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
582 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
517 if (icon.visible) {
583 if (icon.visible) {
@@ -522,6 +588,10 @@ Row {
522 compare(centeredIcon.shaped, data.shaped, "shaped-status is incorrect")
588 compare(centeredIcon.shaped, data.shaped, "shaped-status is incorrect")
524 compare(valueIndicator.visible, data.valueVisible, "value-indicator visibility is incorrect")
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")
594+ compare(valueLabel.visible, data.valueLabelVisible, "value-label visibility is incorrect")
526 // test input does not fall through
596 // test input does not fall through
527 mouseClick(notification, notification.width / 2, notification.height / 2)
597 mouseClick(notification, notification.width / 2, notification.height / 2)