@@ -21,6 +21,7 @@ import "../../../qml/Notifications"
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22import Unity.Test 0.1
22import Unity.Test 0.1
23import Unity.Notifications 1.0
23import Unity.Notifications 1.0
24+import QtMultimedia 5.0
26 id: rootRow
27 id: rootRow
@@ -245,7 +246,8 @@ Row {
245 nonShapedIcon: false,
246 nonShapedIcon: false,
246 secondaryIconVisible: true,
247 secondaryIconVisible: true,
247 buttonRowVisible: true,
248 buttonRowVisible: true,
248− buttonTinted: true
249+ buttonTinted: true,
251 tag: "Ephemeral notification - icon-summary layout",
253 tag: "Ephemeral notification - icon-summary layout",
@@ -263,12 +265,15 @@ Row {
263 nonShapedIcon: false,
265 nonShapedIcon: false,
264 secondaryIconVisible: true,
266 secondaryIconVisible: true,
265 buttonRowVisible: false,
267 buttonRowVisible: false,
266− buttonTinted: false
268+ buttonTinted: false,
269 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
272 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
270 type: Notification.Ephemeral,
273 type: Notification.Ephemeral,
271− hints: {"x-canonical-private-button-tint": "false"},
274+ hints: {"x-canonical-private-button-tint": "false",
275+ "sound-file": "dummy.ogg",
276+ "suppress-sound": "true"},
272 summary: "New comment successfully published",
277 summary: "New comment successfully published",
273 body: "",
278 body: "",
274 icon: "",
279 icon: "",
@@ -282,12 +287,14 @@ Row {
282 nonShapedIcon: false,
287 nonShapedIcon: false,
283 secondaryIconVisible: true,
288 secondaryIconVisible: true,
284 buttonRowVisible: false,
289 buttonRowVisible: false,
285− buttonTinted: false
290+ buttonTinted: false,
288 tag: "Interactive notification",
294 tag: "Interactive notification",
289 type: Notification.Interactive,
295 type: Notification.Interactive,
290− hints: {"x-canonical-private-button-tint": "false"},
296+ hints: {"x-canonical-private-button-tint": "false",
297+ "sound-file": "dummy.ogg"},
291 summary: "Interactive notification",
298 summary: "Interactive notification",
292 body: "This is a notification that can be clicked",
299 body: "This is a notification that can be clicked",
293 icon: "../graphics/avatars/amanda.png",
300 icon: "../graphics/avatars/amanda.png",
@@ -300,12 +307,14 @@ Row {
300 nonShapedIcon: false,
307 nonShapedIcon: false,
301 secondaryIconVisible: false,
308 secondaryIconVisible: false,
302 buttonRowVisible: false,
309 buttonRowVisible: false,
303− buttonTinted: false
310+ buttonTinted: false,
306 tag: "Snap Decision without secondary icon and no button-tint",
314 tag: "Snap Decision without secondary icon and no button-tint",
307 type: Notification.SnapDecision,
315 type: Notification.SnapDecision,
308− hints: {"x-canonical-private-button-tint": "false"},
316+ hints: {"x-canonical-private-button-tint": "false",
317+ "sound-file": "dummy.ogg"},
309 summary: "Bro Coly",
318 summary: "Bro Coly",
310 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.",
319 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.",
311 icon: "../graphics/avatars/anna_olsson.png",
320 icon: "../graphics/avatars/anna_olsson.png",
@@ -319,12 +328,14 @@ Row {
319 nonShapedIcon: false,
328 nonShapedIcon: false,
320 secondaryIconVisible: false,
329 secondaryIconVisible: false,
321 buttonRowVisible: true,
330 buttonRowVisible: true,
322− buttonTinted: false
331+ buttonTinted: false,
325 tag: "Ephemeral notification",
335 tag: "Ephemeral notification",
326 type: Notification.Ephemeral,
336 type: Notification.Ephemeral,
327− hints: {"x-canonical-private-button-tint": "false"},
337+ hints: {"x-canonical-private-button-tint": "false",
338+ "sound-file": "dummy.ogg"},
328 summary: "Cole Raby",
339 summary: "Cole Raby",
329 body: "I did not expect it to be that late.",
340 body: "I did not expect it to be that late.",
330 icon: "../graphics/avatars/funky.png",
341 icon: "../graphics/avatars/funky.png",
@@ -337,13 +348,15 @@ Row {
337 nonShapedIcon: false,
348 nonShapedIcon: false,
338 secondaryIconVisible: true,
349 secondaryIconVisible: true,
339 buttonRowVisible: false,
350 buttonRowVisible: false,
340− buttonTinted: false
351+ buttonTinted: false,
343 tag: "Ephemeral notification with non-shaped icon",
355 tag: "Ephemeral notification with non-shaped icon",
344 type: Notification.Ephemeral,
356 type: Notification.Ephemeral,
345 hints: {"x-canonical-private-button-tint": "false",
357 hints: {"x-canonical-private-button-tint": "false",
346− "x-canonical-non-shaped-icon": "true"},
358+ "x-canonical-non-shaped-icon": "true",
359+ "sound-file": "dummy.ogg"},
347 summary: "Contacts",
360 summary: "Contacts",
348 body: "Synchronised contacts-database with cloud-storage.",
361 body: "Synchronised contacts-database with cloud-storage.",
349 icon: "../graphics/applicationIcons/contacts-app.png",
362 icon: "../graphics/applicationIcons/contacts-app.png",
@@ -356,7 +369,8 @@ Row {
356 nonShapedIcon: true,
369 nonShapedIcon: true,
357 secondaryIconVisible: false,
370 secondaryIconVisible: false,
358 buttonRowVisible: false,
371 buttonRowVisible: false,
359− buttonTinted: false
372+ buttonTinted: false,
@@ -419,6 +433,9 @@ Row {
419 compare(bodyLabel.visible, data.bodyVisible, "body-text visibility is incorrect")
433 compare(bodyLabel.visible, data.bodyVisible, "body-text visibility is incorrect")
420 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
434 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
436+ var audioItem = findInvisibleChild(notification, "sound")
437+ tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
422 if(data.buttonRowVisible) {
439 if(data.buttonRowVisible) {
423 var buttonCancel = findChild(buttonRow, "button1")
440 var buttonCancel = findChild(buttonRow, "button1")
424 var buttonAccept = findChild(buttonRow, "button0")
441 var buttonAccept = findChild(buttonRow, "button0")