@@ -53,6 +53,7 @@ Row {
53 summary: "",
53 summary: "",
56 secondaryIcon: "",
57 secondaryIcon: "",
57 actions: []
58 actions: []
@@ -125,10 +126,11 @@ Row {
125 function addEphemeralIconSummaryNotification() {
126 function addEphemeralIconSummaryNotification() {
126 var n = {
127 var n = {
127 type: Notification.Ephemeral,
128 type: Notification.Ephemeral,
129+ hints: {"x-canonical-non-shaped-icon": "false"},
128 summary: "Photo upload completed",
130 summary: "Photo upload completed",
129 body: "",
131 body: "",
131− secondaryIcon: "../graphics/applicationIcons/facebook.png",
132+ icon: "../graphics/applicationIcons/facebook.png",
132 actions: []
134 actions: []
@@ -148,20 +150,37 @@ Row {
148 mockModel.append(n)
150 mockModel.append(n)
153+ function addConfirmationNotification() {
155+ type: Notification.Confirmation,
156+ hints: {"x-canonical-non-shaped-icon": "true"},
157+ summary: "Confirmation notification",
159+ icon: "image://theme/audio-volume-medium",
151 function clearNotifications() {
168 function clearNotifications() {
152− mockModel.clear()
169+ while(mockModel.count > 1) {
170+ remove1stNotification()
155 function remove1stNotification() {
174 function remove1stNotification() {
156− if (mockModel.count > 0)
175+ if (mockModel.count > 1)
157− mockModel.remove(0)
176+ mockModel.remove(1)
160 Rectangle {
179 Rectangle {
161 id: notificationsRect
180 id: notificationsRect
163 width: units.gu(40)
182 width: units.gu(40)
164− height: units.gu(71)
183+ height: units.gu(90)
166 MouseArea{
185 MouseArea{
167 id: clickThroughCatcher
186 id: clickThroughCatcher
@@ -183,7 +202,7 @@ Row {
183 id: interactiveControls
202 id: interactiveControls
185 width: units.gu(30)
204 width: units.gu(30)
186− height: units.gu(81)
205+ height: units.gu(90)
187 color: "grey"
206 color: "grey"
@@ -227,6 +246,12 @@ Row {
227 onClicked: addInteractiveNotification()
246 onClicked: addInteractiveNotification()
251+ text: "add a confirmation"
252+ onClicked: addConfirmationNotification()
231 width: parent.width
256 width: parent.width
232 text: "remove 1st notification"
257 text: "remove 1st notification"
@@ -264,12 +289,14 @@ Row {
264 summaryVisible: true,
289 summaryVisible: true,
265 bodyVisible: true,
290 bodyVisible: true,
266 iconVisible: true,
291 iconVisible: true,
267− shapedIcon: true,
292+ centeredIconVisible: false,
268− nonShapedIcon: false,
293+ shaped: true,
269 secondaryIconVisible: true,
295 secondaryIconVisible: true,
270 buttonRowVisible: true,
296 buttonRowVisible: true,
271 buttonTinted: true,
297 buttonTinted: true,
272− hasSound: false
298+ hasSound: false,
275 tag: "2-over-1 Snap Decision with button-tint",
302 tag: "2-over-1 Snap Decision with button-tint",
@@ -285,31 +312,33 @@ Row {
285 summaryVisible: true,
312 summaryVisible: true,
286 bodyVisible: true,
313 bodyVisible: true,
287 iconVisible: false,
314 iconVisible: false,
288− shapedIcon: false,
315+ centeredIconVisible: false,
289− nonShapedIcon: false,
316+ shaped: false,
290 secondaryIconVisible: false,
317 secondaryIconVisible: false,
291 buttonRowVisible: false,
318 buttonRowVisible: false,
292 buttonTinted: true,
319 buttonTinted: true,
293− hasSound: false
320+ hasSound: false,
296 tag: "Ephemeral notification - icon-summary layout",
324 tag: "Ephemeral notification - icon-summary layout",
297 type: Notification.Ephemeral,
325 type: Notification.Ephemeral,
298− hints: {"x-canonical-private-affirmative-tint": "false"},
326+ hints: {},
299 summary: "Photo upload completed",
327 summary: "Photo upload completed",
300 body: "",
328 body: "",
302− secondaryIcon: "../graphics/applicationIcons/facebook.png",
329+ icon: "../graphics/applicationIcons/facebook.png",
303 actions: [],
331 actions: [],
304 summaryVisible: true,
332 summaryVisible: true,
305 bodyVisible: false,
333 bodyVisible: false,
306− iconVisible: false,
334+ iconVisible: true,
307− shapedIcon: false,
335+ centeredIconVisible: false,
308− nonShapedIcon: false,
336+ shaped: true,
309− secondaryIconVisible: true,
337+ secondaryIconVisible: false,
310 buttonRowVisible: false,
338 buttonRowVisible: false,
311 buttonTinted: false,
339 buttonTinted: false,
312− hasSound: false
340+ hasSound: false,
315 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
344 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
@@ -326,12 +355,13 @@ Row {
326 bodyVisible: false,
355 bodyVisible: false,
327 interactiveAreaEnabled: false,
356 interactiveAreaEnabled: false,
328 iconVisible: false,
357 iconVisible: false,
329− shapedIcon: false,
358+ centeredIconVisible: false,
330− nonShapedIcon: false,
359+ shaped: false,
331 secondaryIconVisible: true,
360 secondaryIconVisible: true,
332 buttonRowVisible: false,
361 buttonRowVisible: false,
333 buttonTinted: false,
362 buttonTinted: false,
334− hasSound: false
363+ hasSound: false,
337 tag: "Interactive notification",
367 tag: "Interactive notification",
@@ -346,12 +376,13 @@ Row {
346 summaryVisible: true,
376 summaryVisible: true,
347 bodyVisible: true,
377 bodyVisible: true,
348 iconVisible: true,
378 iconVisible: true,
349− shapedIcon: true,
379+ centeredIconVisible: false,
350− nonShapedIcon: false,
380+ shaped: true,
351 secondaryIconVisible: false,
381 secondaryIconVisible: false,
352 buttonRowVisible: false,
382 buttonRowVisible: false,
353 buttonTinted: false,
383 buttonTinted: false,
354− hasSound: true
384+ hasSound: true,
357 tag: "Snap Decision without secondary icon and no button-tint",
388 tag: "Snap Decision without secondary icon and no button-tint",
@@ -367,12 +398,13 @@ Row {
367 summaryVisible: true,
398 summaryVisible: true,
368 bodyVisible: true,
399 bodyVisible: true,
369 iconVisible: true,
400 iconVisible: true,
370− shapedIcon: true,
401+ centeredIconVisible: false,
371− nonShapedIcon: false,
402+ shaped: true,
372 secondaryIconVisible: false,
403 secondaryIconVisible: false,
373 buttonRowVisible: true,
404 buttonRowVisible: true,
374 buttonTinted: false,
405 buttonTinted: false,
375− hasSound: true
406+ hasSound: true,
378 tag: "Ephemeral notification",
410 tag: "Ephemeral notification",
@@ -387,12 +419,13 @@ Row {
387 summaryVisible: true,
419 summaryVisible: true,
388 bodyVisible: true,
420 bodyVisible: true,
389 iconVisible: true,
421 iconVisible: true,
390− shapedIcon: true,
422+ centeredIconVisible: false,
391− nonShapedIcon: false,
423+ shaped: true,
392 secondaryIconVisible: true,
424 secondaryIconVisible: true,
393 buttonRowVisible: false,
425 buttonRowVisible: false,
394 buttonTinted: false,
426 buttonTinted: false,
395− hasSound: true
427+ hasSound: true,
398 tag: "Ephemeral notification with non-shaped icon",
431 tag: "Ephemeral notification with non-shaped icon",
@@ -401,18 +434,40 @@ Row {
401 "x-canonical-non-shaped-icon": "true"},
434 "x-canonical-non-shaped-icon": "true"},
402 summary: "Contacts",
435 summary: "Contacts",
403 body: "Synchronised contacts-database with cloud-storage.",
436 body: "Synchronised contacts-database with cloud-storage.",
404− icon: "../graphics/applicationIcons/contacts-app.png",
437+ icon: "image://theme/contacts-app",
405 secondaryIcon: "",
438 secondaryIcon: "",
406 actions: [],
439 actions: [],
407 summaryVisible: true,
440 summaryVisible: true,
408 bodyVisible: true,
441 bodyVisible: true,
409 iconVisible: true,
442 iconVisible: true,
410− shapedIcon: false,
443+ centeredIconVisible: false,
411− nonShapedIcon: true,
444+ shaped: false,
412 secondaryIconVisible: false,
445 secondaryIconVisible: false,
413 buttonRowVisible: false,
446 buttonRowVisible: false,
414 buttonTinted: false,
447 buttonTinted: false,
415− hasSound: false
448+ hasSound: false,
452+ tag: "Confirmation notification with value",
453+ type: Notification.Confirmation,
454+ hints: {"x-canonical-non-shaped-icon": "true"},
457+ icon: "image://theme/audio-volume-medium",
461+ summaryVisible: false,
464+ centeredIconVisible: true,
466+ secondaryIconVisible: false,
467+ buttonRowVisible: false,
468+ buttonTinted: false,
@@ -450,17 +505,23 @@ Row {
450 waitForRendering(notification);
505 waitForRendering(notification);
452 var icon = findChild(notification, "icon")
507 var icon = findChild(notification, "icon")
453− var shapedIcon = findChild(notification, "shapedIcon")
454− var nonShapedIcon = findChild(notification, "nonShapedIcon")
508+ var centeredIcon = findChild(notification, "centeredIcon")
455 var interactiveArea = findChild(notification, "interactiveArea")
509 var interactiveArea = findChild(notification, "interactiveArea")
456 var secondaryIcon = findChild(notification, "secondaryIcon")
510 var secondaryIcon = findChild(notification, "secondaryIcon")
457 var summaryLabel = findChild(notification, "summaryLabel")
511 var summaryLabel = findChild(notification, "summaryLabel")
458 var bodyLabel = findChild(notification, "bodyLabel")
512 var bodyLabel = findChild(notification, "bodyLabel")
459 var buttonRow = findChild(notification, "buttonRow")
513 var buttonRow = findChild(notification, "buttonRow")
514+ var valueIndicator = findChild(notification, "valueIndicator")
461 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
516 compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
518+ compare(icon.shaped, data.shaped, "shaped-status is incorrect")
462− compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")
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")
463− compare(nonShapedIcon.visible, data.nonShapedIcon, "non-shaped-icon visibility is incorrect")
524+ compare(valueIndicator.visible, data.valueVisible, "value-indicator visibility is incorrect")
465 // test input does not fall through
526 // test input does not fall through
466 mouseClick(notification, notification.width / 2, notification.height / 2)
527 mouseClick(notification, notification.width / 2, notification.height / 2)