on xenial help sign in
Implemented the needed visual updates on notifications requested by Design for RTM. Fixes: 1348092, 1365987

Approved by: Daniel d'Andrada

commit473ab33927dd98385e0ee75a197e0d3092b205b3 authorMirco Müller <mirco.mueller@ubuntu.com> dateMon 8 Sep 2014, 14:15 (12 years ago) parent23d0818724d096
6 files changed+258−162
qml/Notifications/Notification.qml+132−46 qml/Notifications/NotificationMenuItemFactory.qml+4 qml/Notifications/Notifications.qml+1−1 qml/Shell.qml+1−1 tests/autopilot/unity8/shell/tests/test_notifications.py+61−97 tests/qmltests/Notifications/tst_Notifications.qml+59−17
qml/Notifications/Notification.qml+132−46
@@ -39,19 +39,17 @@ Item {
3939 property bool fullscreen: false
4040 property int maxHeight
4141 property int margins
42− property Gradient greenGradient : Gradient {
43− GradientStop { position: 0.0; color: "#3fb24f" }
44− GradientStop { position: 1.0; color: "#3fb24f" }
45− }
46− property Gradient darkgreyGradient: Gradient {
47− GradientStop { position: 0.0; color: "#4d4745" }
48− GradientStop { position: 1.0; color: "#4d4745" }
49− }
42+ readonly property color red: "#fc4949"
43+ readonly property color green: "#3fb24f"
44+ readonly property color sdLightGrey: "#eaeaea"
45+ readonly property color sdDarkGrey: "#dddddd"
46+ readonly property color sdFontColor: "#5d5d5d"
47+ readonly property real contentSpacing: units.gu(2)
5048
5149 objectName: "background"
52− implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
50+ implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + contentSpacing * 2) : 0
5351
54− color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
52+ color: type == Notification.SnapDecision ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
5553 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
5654
5755 state: {
@@ -107,7 +105,7 @@ Item {
107105 states:[
108106 State {
109107 name: "contracted"
110− PropertyChanges {target: notification; height: units.gu(8)}
108+ PropertyChanges {target: notification; height: units.gu(10)}
111109 },
112110 State {
113111 name: "expanded"
@@ -131,6 +129,7 @@ Item {
131129 color: parent.color
132130 opacity: parent.opacity
133131 radius: "medium"
132+ borderSource: "none"
134133 }
135134
136135 Rectangle {
@@ -199,50 +198,41 @@ Item {
199198 }
200199
201200 Column {
202− id: contentColumn
203− objectName: "contentColumn"
201+ id: outterColumn
204202
205203 anchors {
206204 left: parent.left
207205 right: parent.right
208206 top: parent.top
209− margins: fullscreen ? 0 : spacing
207+ margins: 0
208+ topMargin: fullscreen ? 0 : units.gu(2)
210209 }
211210
212− spacing: units.gu(1)
211+ spacing: units.gu(2)
213212
214213 Row {
215214 id: topRow
216215
217− spacing: contentColumn.spacing
216+ spacing: contentSpacing
218217 anchors {
219218 left: parent.left
220219 right: parent.right
220+ margins: contentSpacing
221221 }
222222
223223 ShapedIcon {
224224 id: icon
225225
226226 objectName: "icon"
227− width: units.gu(6)
228− height: units.gu(6)
227+ width: type == Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
228+ height: width
229229 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
230230 visible: iconSource !== undefined && iconSource != ""
231− }
232−
233− Image {
234− id: secondaryIcon
235−
236− objectName: "secondaryIcon"
237− width: units.gu(2)
238− height: units.gu(2)
239− visible: source !== undefined && source != ""
240− fillMode: Image.PreserveAspectCrop
241− }
231+ }
242232
243233 Column {
244234 id: labelColumn
245− width: parent.width - x
235+ width: secondaryIcon.visible ? parent.width - x - units.gu(4.5) : parent.width - x
246236
247237 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
248238
@@ -255,8 +245,7 @@ Item {
255245 right: parent.right
256246 }
257247 fontSize: "medium"
258− font.bold: true
259− color: Theme.palette.selected.backgroundText
248+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
260249 elide: Text.ElideRight
261250 textFormat: Text.PlainText
262251 }
@@ -271,14 +260,27 @@ Item {
271260 }
272261 visible: body != ""
273262 fontSize: "small"
274− color: Theme.palette.selected.backgroundText
275− opacity: 0.6
263+ color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
276264 wrapMode: Text.WordWrap
277− maximumLineCount: 10
265+ maximumLineCount: 2
278266 elide: Text.ElideRight
279267 textFormat: Text.PlainText
280268 }
281269 }
270+
271+ Image {
272+ id: secondaryIcon
273+
274+ objectName: "secondaryIcon"
275+ width: units.gu(3)
276+ height: units.gu(3)
277+ visible: status === Image.Ready
278+ fillMode: Image.PreserveAspectCrop
279+ }
280+ }
281+
282+ ListItem.ThinDivider {
283+ visible: type == Notification.SnapDecision
282284 }
283285
284286 Column {
@@ -321,6 +323,74 @@ Item {
321323 }
322324 }
323325
326+ Column {
327+ id: oneOverTwoCase
328+
329+ anchors {
330+ left: parent.left
331+ right: parent.right
332+ margins: contentSpacing
333+ }
334+
335+ spacing: contentSpacing
336+
337+ visible: notification.type == Notification.SnapDecision && oneOverTwoRepeaterTop.count == 3
338+
339+ Repeater {
340+ id: oneOverTwoRepeaterTop
341+
342+ model: notification.actions
343+ delegate: Loader {
344+ id: oneOverTwoLoaderTop
345+
346+ property string actionId: id
347+ property string actionLabel: label
348+
349+ Component {
350+ id: oneOverTwoButtonTop
351+
352+ Button {
353+ objectName: "notify_oot_button" + index
354+ width: oneOverTwoCase.width
355+ text: oneOverTwoLoaderTop.actionLabel
356+ color: notification.hints["x-canonical-private-affirmative-tint"] == "true" ? green : sdDarkGrey
357+ onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
358+ }
359+ }
360+ sourceComponent: index == 0 ? oneOverTwoButtonTop : undefined
361+ }
362+ }
363+
364+ Row {
365+ spacing: contentSpacing
366+
367+ Repeater {
368+ id: oneOverTwoRepeaterBottom
369+
370+ model: notification.actions
371+ delegate: Loader {
372+ id: oneOverTwoLoaderBottom
373+
374+ property string actionId: id
375+ property string actionLabel: label
376+
377+ Component {
378+ id: oneOverTwoButtonBottom
379+
380+ Button {
381+ objectName: "notify_oot_button" + index
382+ width: oneOverTwoCase.width / 2 - spacing * 2
383+ text: oneOverTwoLoaderBottom.actionLabel
384+ color: index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true" ? red : sdDarkGrey
385+ onClicked: notification.notification.invokeAction(oneOverTwoLoaderBottom.actionId)
386+ }
387+ }
388+ sourceComponent: (index == 1 || index == 2) ? oneOverTwoButtonBottom : undefined
389+ }
390+ }
391+ }
392+ }
393+
324394 Row {
325395 id: buttonRow
326396
@@ -328,9 +398,10 @@ Item {
328398 anchors {
329399 left: parent.left
330400 right: parent.right
401+ margins: contentSpacing
331402 }
332− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
333− spacing: units.gu(1)
403+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0 && !oneOverTwoCase.visible
404+ spacing: units.gu(2)
334405 layoutDirection: Qt.RightToLeft
335406
336407 Repeater {
@@ -347,10 +418,19 @@ Item {
347418 id: actionButton
348419
349420 Button {
350− objectName: "button" + index
351− width: buttonRow.width / 2 - spacing
421+ objectName: "notify_button" + index
422+ width: buttonRow.width / 2 - spacing*2
352423 text: loader.actionLabel
353− gradient: notification.hints["x-canonical-private-button-tint"] == "true" && index == 0 ? greenGradient : darkgreyGradient
424+ color: {
425+ var result = sdDarkGrey;
426+ if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
427+ result = green;
428+ }
429+ if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
430+ result = red;
431+ }
432+ return result;
433+ }
354434 onClicked: notification.notification.invokeAction(loader.actionId)
355435 }
356436 }
@@ -362,10 +442,16 @@ Item {
362442 ComboButton {
363443 id: comboButton
364444
365− objectName: "button2"
445+ objectName: "notify_button2"
366446 width: parent.width
367− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
368− gradient: darkgreyGradient
447+ anchors {
448+ left: parent.left
449+ right: parent.right
450+ margins: contentSpacing
451+ }
452+
453+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
454+ color: sdDarkGrey
369455 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
370456 expanded: false
371457 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
@@ -399,7 +485,7 @@ Item {
399485 MouseArea {
400486 id: comboInputArea
401487
402− objectName: "button" + index
488+ objectName: "notify_button" + index
403489 width: comboButton.width
404490 height: comboIcon.height + units.gu(2)
405491
@@ -421,7 +507,7 @@ Item {
421507 }
422508 width: units.gu(2)
423509 height: units.gu(2)
424− color: "white"
510+ color: sdFontColor
425511 name: splitLabel[2]
426512 }
427513
@@ -434,7 +520,7 @@ Item {
434520 verticalCenter: comboIcon.verticalCenter
435521 }
436522 fontSize: "small"
437− color: "white"
523+ color: sdFontColor
438524 text: splitLabel[3]
439525 }
440526 }
qml/Notifications/NotificationMenuItemFactory.qml+4
@@ -55,6 +55,7 @@ Loader {
5555 anchors {
5656 left: parent.left
5757 right: parent.right
58+ margins: spacing
5859 }
5960
6061 Component.onCompleted: {
@@ -65,6 +66,7 @@ Loader {
6566
6667 Label {
6768 text: menuData.label
69+ color: notification.sdFontColor
6870 }
6971
7072 TextField {
@@ -98,11 +100,13 @@ Loader {
98100 id: checkBox
99101
100102 checked: false
103+ activeFocusOnPress: false
101104 }
102105
103106 Label {
104107 anchors.verticalCenter: checkBox.verticalCenter
105108 text: i18n.tr("Show password")
109+ color: notification.sdFontColor
106110 }
107111 }
108112 }
qml/Notifications/Notifications.qml+1−1
@@ -33,7 +33,7 @@ ListView {
3333 id: snapDecisionProxyModel
3434
3535 model: notificationList.model
36− filterRole: UnityNotifications.ModelInterface.RoleType
36+ filterRole: UnityNotifications.ModelInterface != undefined ? UnityNotifications.ModelInterface.RoleType : 0
3737 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
3838 }
3939
qml/Shell.qml+1−1
@@ -562,7 +562,7 @@ Item {
562562 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
563563 color: "#000000"
564564 anchors.fill: parent
565− opacity: 0.5
565+ opacity: 0.9
566566
567567 MouseArea {
568568 anchors.fill: parent
tests/autopilot/unity8/shell/tests/test_notifications.py+61−97
@@ -135,10 +135,7 @@ class InteractiveNotificationBase(NotificationsBase):
135135 actions = [("action_id", "dummy")]
136136 hints = [
137137 ("x-canonical-switch-to-application", "true"),
138− (
139− "x-canonical-secondary-icon",
140− self._get_icon_path('applicationIcons/dialer-app.png')
141− )
138+ ("x-canonical-secondary-icon","dialer")
142139 ]
143140
144141 self._create_interactive_notification(
@@ -170,20 +167,19 @@ class InteractiveNotificationBase(NotificationsBase):
170167 body = "Frank Zappa\n+44 (0)7736 027340"
171168 icon_path = self._get_icon_path('avatars/anna_olsson.png')
172169 hints = [
173− (
174− "x-canonical-secondary-icon",
175− self._get_icon_path('applicationIcons/dialer-app.png')
176− ),
170+ ("x-canonical-secondary-icon", "incoming-call"),
177171 ("x-canonical-snap-decisions", "true"),
172+ ("x-canonical-private-affirmative-tint", "true"),
173+ ("x-canonical-private-rejection-tint", "true"),
178174 ]
179175
180176 actions = [
181177 ('action_accept', 'Hold + Answer'),
182178 ('action_decline_1', 'End + Answer'),
183179 ('action_decline_2', 'Decline'),
184− ('action_decline_3', 'messages:I missed your call - can you call me now?'),
185− ('action_decline_4', 'messages:I\'m running late. I\'m on my way.'),
186− ('action_decline_5', 'messages:I\'m busy at the moment. I\'ll call later.'),
180+ ('action_decline_3', 'message:I missed your call - can you call me now?'),
181+ ('action_decline_4', 'message:I\'m running late. I\'m on my way.'),
182+ ('action_decline_5', 'message:I\'m busy at the moment. I\'ll call later.'),
187183 ('action_decline_6', 'edit:Custom'),
188184 ]
189185
@@ -204,13 +200,53 @@ class InteractiveNotificationBase(NotificationsBase):
204200 notification.pointing_device.click_object(
205201 notification.select_single(objectName="combobutton_dropdown"))
206202 self.assertThat(
207− notification.select_single(objectName="button2").expanded,
203+ notification.select_single(objectName="notify_button2").expanded,
208204 Eventually(Equals(True)))
209205 time.sleep(2)
210206 notification.pointing_device.click_object(
211− notification.select_single(objectName="button4"))
207+ notification.select_single(objectName="notify_button4"))
212208 self.assert_notification_action_id_was_called("action_decline_4")
213209
210+
211+ def test_sd_one_over_two_layout(self):
212+ """Snap-decision with three actions should use one-over two button layout."""
213+ unity_proxy = self.launch_unity()
214+ unlock_unity(unity_proxy)
215+
216+ summary = "Theatre at Ferria Stadium"
217+ body = "at Ferria Stadium in Bilbao, Spain\n07578545317"
218+ hints = [
219+ ("x-canonical-snap-decisions", "true"),
220+ ("x-canonical-non-shaped-icon", "true"),
221+ ("x-canonical-private-affirmative-tint", "true")
222+ ]
223+
224+ actions = [
225+ ('action_accept', 'Ok'),
226+ ('action_decline_1', 'Snooze'),
227+ ('action_decline_2', 'View'),
228+ ]
229+
230+ self._create_interactive_notification(
231+ summary,
232+ body,
233+ None,
234+ "NORMAL",
235+ actions,
236+ hints
237+ )
238+
239+ # verify and interact with the triggered snap-decision notification
240+ notify_list = self._get_notifications_list()
241+ get_notification = lambda: notify_list.wait_select_single(
242+ 'Notification', objectName='notification1')
243+ notification = get_notification()
244+ self._assert_notification(
245+ notification, summary, body, False, False, 1.0)
246+ notification.pointing_device.click_object(
247+ notification.select_single(objectName="notify_oot_button0"))
248+ self.assert_notification_action_id_was_called("action_accept")
249+
214250 def test_modal_sd_without_greeter(self):
215251 """Snap-decision should block input to shell without greeter."""
216252 unity_proxy = self.launch_unity()
@@ -222,6 +258,8 @@ class InteractiveNotificationBase(NotificationsBase):
222258 hints = [
223259 ("x-canonical-snap-decisions", "true"),
224260 ("x-canonical-non-shaped-icon", "true"),
261+ ("x-canonical-private-affirmative-tint", "true"),
262+ ("x-canonical-private-rejection-tint", "true"),
225263 ]
226264
227265 actions = [
@@ -253,7 +291,7 @@ class InteractiveNotificationBase(NotificationsBase):
253291 self._assert_notification(
254292 notification, summary, body, True, False, 1.0)
255293 notification.pointing_device.click_object(
256− notification.select_single(objectName="button0"))
294+ notification.select_single(objectName="notify_button0"))
257295 self.assert_notification_action_id_was_called("action_accept")
258296
259297 def test_modal_sd_with_greeter(self):
@@ -266,6 +304,8 @@ class InteractiveNotificationBase(NotificationsBase):
266304 hints = [
267305 ("x-canonical-snap-decisions", "true"),
268306 ("x-canonical-non-shaped-icon", "true"),
307+ ("x-canonical-private-affirmative-tint", "true"),
308+ ("x-canonical-private-rejection-tint", "true"),
269309 ]
270310
271311 actions = [
@@ -296,7 +336,7 @@ class InteractiveNotificationBase(NotificationsBase):
296336 self._assert_notification(
297337 notification, summary, body, True, False, 1.0)
298338 notification.pointing_device.click_object(
299− notification.select_single(objectName="button0"))
339+ notification.select_single(objectName="notify_button0"))
300340 self.assert_notification_action_id_was_called("action_accept")
301341
302342 def _create_interactive_notification(
@@ -438,10 +478,7 @@ class EphemeralNotificationsTests(NotificationsBase):
438478 "join me and Anna?"
439479 icon_path = self._get_icon_path('avatars/anna_olsson.png')
440480 hints = [
441− (
442− "x-canonical-secondary-icon",
443− self._get_icon_path('applicationIcons/dialer-app.png')
444− )
481+ ("x-canonical-secondary-icon", "message")
445482 ]
446483
447484 notification = shell.create_ephemeral_notification(
@@ -474,17 +511,13 @@ class EphemeralNotificationsTests(NotificationsBase):
474511 notify_list = self._get_notifications_list()
475512
476513 summary = "Upload of image completed"
477− hints = [
478− (
479− "x-canonical-secondary-icon",
480− self._get_icon_path('applicationIcons/facebook.png')
481− )
482− ]
514+ icon_path = self._get_icon_path('applicationIcons/facebook.png')
515+ hints=[]
483516
484517 notification = shell.create_ephemeral_notification(
485518 summary,
486519 None,
487− None,
520+ icon_path,
488521 hints,
489522 "NORMAL",
490523 )
@@ -497,8 +530,8 @@ class EphemeralNotificationsTests(NotificationsBase):
497530 notification(),
498531 summary,
499532 None,
500− False,
501533 True,
534+ False,
502535 1.0
503536 )
504537
@@ -683,7 +716,7 @@ class EphemeralNotificationsTests(NotificationsBase):
683716 body = 'This bubble uses the icon-title-body layout with a ' \
684717 'secondary icon.'
685718 icon_path = self._get_icon_path('avatars/anna_olsson.png')
686− hint_icon = self._get_icon_path('applicationIcons/dialer-app.png')
719+ hint_icon = 'dialer'
687720
688721 notification = shell.create_ephemeral_notification(
689722 summary,
@@ -718,72 +751,3 @@ class EphemeralNotificationsTests(NotificationsBase):
718751 self.assertThat(get_notification, Eventually(NotEquals(None)))
719752 self._assert_notification(
720753 get_notification(), summary, body, False, False, 1.0)
721−
722− def test_append_hint(self):
723− """Notification has to accumulate body-text using append-hint."""
724− unity_proxy = self.launch_unity()
725− unlock_unity(unity_proxy)
726−
727− notify_list = self._get_notifications_list()
728−
729− summary = 'Cole Raby'
730− body = 'Hey Bro Coly!'
731− icon_path = self._get_icon_path('avatars/amanda.png')
732− body_sum = body
733− notification = shell.create_ephemeral_notification(
734− summary,
735− body,
736− icon_path,
737− hints=[('x-canonical-append', 'true')]
738− )
739−
740− notification.show()
741−
742− get_notification = lambda: notify_list.wait_select_single(
743− 'Notification', objectName='notification1')
744−
745− notification = get_notification()
746− self._assert_notification(
747− notification,
748− summary,
749− body_sum,
750− True,
751− False,
752− 1.0
753− )
754−
755− bodies = [
756− 'What\'s up dude?',
757− 'Did you watch the air-race in Oshkosh last week?',
758− 'Phil owned the place like no one before him!',
759− 'Did really everything in the race work according to regulations?',
760− 'Somehow I think to remember Burt Williams did cut corners and '
761− 'was not punished for this.',
762− 'Hopefully the referees will watch the videos of the race.',
763− 'Burt could get fined with US$ 50000 for that rule-violation :)'
764− ]
765−
766− for new_body in bodies:
767− body = new_body
768− body_sum += '\n' + body
769− notification = shell.create_ephemeral_notification(
770− summary,
771− body,
772− icon_path,
773− hints=[('x-canonical-append', 'true')]
774− )
775− notification.show()
776−
777− get_notification = lambda: notify_list.wait_select_single(
778− 'Notification',
779− objectName='notification1'
780− )
781− notification = get_notification()
782− self._assert_notification(
783− notification,
784− summary,
785− body_sum,
786− True,
787− False,
788− 1.0
789− )
tests/qmltests/Notifications/tst_Notifications.qml+59−17
@@ -64,7 +64,7 @@ Row {
6464 function addSnapDecisionNotification() {
6565 var n = {
6666 type: Notification.SnapDecision,
67− hints: {"x-canonical-private-button-tint": "true"},
67+ hints: {"x-canonical-private-affirmative-tint": "true"},
6868 summary: "Tom Ato",
6969 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
7070 icon: "../graphics/avatars/funky.png",
@@ -79,6 +79,22 @@ Row {
7979 mockModel.append(n)
8080 }
8181
82+ function add2over1SnapDecisionNotification() {
83+ var n = {
84+ type: Notification.SnapDecision,
85+ hints: {"x-canonical-private-affirmative-tint": "true",},
86+ summary: "Theatre at Ferria Stadium",
87+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
88+ icon: "",
89+ secondaryIcon: "",
90+ actions: [{ id: "ok_id", label: "Ok"},
91+ { id: "snooze_id", label: "Snooze"},
92+ { id: "view_id", label: "View"}]
93+ }
94+
95+ mockModel.append(n)
96+ }
97+
8298 function addEphemeralNotification() {
8399 var n = {
84100 type: Notification.Ephemeral,
@@ -181,6 +197,12 @@ Row {
181197 onClicked: addSnapDecisionNotification()
182198 }
183199
200+ Button {
201+ width: parent.width
202+ text: "add a 2over1 snap-decision"
203+ onClicked: add2over1SnapDecisionNotification()
204+ }
205+
184206 Button {
185207 width: parent.width
186208 text: "add an ephemeral"
@@ -229,7 +251,7 @@ Row {
229251 {
230252 tag: "Snap Decision with secondary icon and button-tint",
231253 type: Notification.SnapDecision,
232− hints: {"x-canonical-private-button-tint": "true"},
254+ hints: {"x-canonical-private-affirmative-tint": "true"},
233255 summary: "Tom Ato",
234256 body: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.",
235257 icon: "../graphics/avatars/funky.png",
@@ -249,10 +271,31 @@ Row {
249271 buttonTinted: true,
250272 hasSound: false
251273 },
274+ {
275+ tag: "2-over-1 Snap Decision with button-tint",
276+ type: Notification.SnapDecision,
277+ hints: {"x-canonical-private-affirmative-tint": "true"},
278+ summary: "Theatre at Ferria Stadium",
279+ body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
280+ icon: "",
281+ secondaryIcon: "",
282+ actions: [{ id: "ok_id", label: "Ok"},
283+ { id: "snooze_id", label: "Snooze"},
284+ { id: "view_id", label: "View"}],
285+ summaryVisible: true,
286+ bodyVisible: true,
287+ iconVisible: false,
288+ shapedIcon: false,
289+ nonShapedIcon: false,
290+ secondaryIconVisible: false,
291+ buttonRowVisible: false,
292+ buttonTinted: true,
293+ hasSound: false
294+ },
252295 {
253296 tag: "Ephemeral notification - icon-summary layout",
254297 type: Notification.Ephemeral,
255− hints: {"x-canonical-private-button-tint": "false"},
298+ hints: {"x-canonical-private-affirmative-tint": "false"},
256299 summary: "Photo upload completed",
257300 body: "",
258301 icon: "",
@@ -271,7 +314,7 @@ Row {
271314 {
272315 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
273316 type: Notification.Ephemeral,
274− hints: {"x-canonical-private-button-tint": "false",
317+ hints: {"x-canonical-private-affirmative-tint": "false",
275318 "sound-file": "dummy.ogg",
276319 "suppress-sound": "true"},
277320 summary: "New comment successfully published",
@@ -293,7 +336,7 @@ Row {
293336 {
294337 tag: "Interactive notification",
295338 type: Notification.Interactive,
296− hints: {"x-canonical-private-button-tint": "false",
339+ hints: {"x-canonical-private-affirmative-tint": "false",
297340 "sound-file": "dummy.ogg"},
298341 summary: "Interactive notification",
299342 body: "This is a notification that can be clicked",
@@ -313,7 +356,7 @@ Row {
313356 {
314357 tag: "Snap Decision without secondary icon and no button-tint",
315358 type: Notification.SnapDecision,
316− hints: {"x-canonical-private-button-tint": "false",
359+ hints: {"x-canonical-private-affirmative-tint": "false",
317360 "sound-file": "dummy.ogg"},
318361 summary: "Bro Coly",
319362 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.",
@@ -334,7 +377,7 @@ Row {
334377 {
335378 tag: "Ephemeral notification",
336379 type: Notification.Ephemeral,
337− hints: {"x-canonical-private-button-tint": "false",
380+ hints: {"x-canonical-private-affirmative-tint": "false",
338381 "sound-file": "dummy.ogg"},
339382 summary: "Cole Raby",
340383 body: "I did not expect it to be that late.",
@@ -354,9 +397,8 @@ Row {
354397 {
355398 tag: "Ephemeral notification with non-shaped icon",
356399 type: Notification.Ephemeral,
357− hints: {"x-canonical-private-button-tint": "false",
358− "x-canonical-non-shaped-icon": "true",
359− "sound-file": "dummy.ogg"},
400+ hints: {"x-canonical-private-affirmative-tint": "false",
401+ "x-canonical-non-shaped-icon": "true"},
360402 summary: "Contacts",
361403 body: "Synchronised contacts-database with cloud-storage.",
362404 icon: "../graphics/applicationIcons/contacts-app.png",
@@ -370,7 +412,7 @@ Row {
370412 secondaryIconVisible: false,
371413 buttonRowVisible: false,
372414 buttonTinted: false,
373− hasSound: true
415+ hasSound: false
374416 }
375417 ]
376418 }
@@ -437,8 +479,8 @@ Row {
437479 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
438480
439481 if(data.buttonRowVisible) {
440− var buttonCancel = findChild(buttonRow, "button1")
441− var buttonAccept = findChild(buttonRow, "button0")
482+ var buttonCancel = findChild(buttonRow, "notify_button1")
483+ var buttonAccept = findChild(buttonRow, "notify_button0")
442484
443485 // only test the left/cancel-button if two actions have been passed in
444486 if (data.actions.length == 2) {
@@ -448,7 +490,7 @@ Row {
448490 }
449491
450492 // check the tinting of the positive/right button
451− verify(buttonAccept.gradient === data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")
493+ verify(buttonAccept.color === data.buttonTinted ? "#3fb24f" : "#dddddd", "button has the wrong color-tint")
452494
453495 // click the positive/right button
454496 tryCompareFunction(function() { mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2); return actionSpy.signalArguments.length > 0; }, true);
@@ -458,19 +500,19 @@ Row {
458500
459501 // check if there's a ComboButton created due to more actions being passed
460502 if (data.actions.length > 2) {
461− var comboButton = findChild(notification, "button2")
503+ var comboButton = findChild(notification, "notify_button2")
462504 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
463505
464506 // click to expand
465507 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
466508
467509 // try clicking on choices in expanded comboList
468− var choiceButton1 = findChild(notification, "button3")
510+ var choiceButton1 = findChild(notification, "notify_button3")
469511 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
470512 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
471513 actionSpy.clear()
472514
473− var choiceButton2 = findChild(notification, "button4")
515+ var choiceButton2 = findChild(notification, "notify_button4")
474516 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
475517 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
476518 actionSpy.clear()