on xenial help sign in
Hide placeholder notification.
33eb6beAlbert Astals
Notifications/Notification.qml+2−1
@@ -34,12 +34,13 @@ UbuntuShape {
34 property var notification
34 property var notification
35
35
36 objectName: "background"
36 objectName: "background"
37− implicitHeight: contentColumn.height + contentColumn.spacing * 2
37+ implicitHeight: type != Notification.PlaceHolder ? contentColumn.height + contentColumn.spacing * 2 : 0
38 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
38 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
39 opacity: 0
39 opacity: 0
40 radius: "medium"
40 radius: "medium"
41
41
42 clip: true
42 clip: true
43+ visible: type != Notification.PlaceHolder
43
44
44 UnityMenuModelPaths {
45 UnityMenuModelPaths {
45 id: paths
46 id: paths
tests/autopilot/unity8/shell/tests/test_notifications.py+10−9
@@ -145,7 +145,7 @@ class InteractiveNotificationBase(NotificationsBase):
145 hints,
145 hints,
146 )
146 )
147
147
148− get_notification = lambda: notify_list.select_single('Notification')
148+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
149 self.assertThat(get_notification, Eventually(NotEquals(None)))
149 self.assertThat(get_notification, Eventually(NotEquals(None)))
150 notification = get_notification()
150 notification = get_notification()
151
151
@@ -191,7 +191,7 @@ class InteractiveNotificationBase(NotificationsBase):
191 hints
191 hints
192 )
192 )
193
193
194− get_notification = lambda: notify_list.select_single('Notification')
194+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
195 self.assertThat(get_notification, Eventually(NotEquals(None)))
195 self.assertThat(get_notification, Eventually(NotEquals(None)))
196 notification = get_notification()
196 notification = get_notification()
197 self._assert_notification(notification, None, None, True, True, 1.0)
197 self._assert_notification(notification, None, None, True, True, 1.0)
@@ -360,7 +360,7 @@ class EphemeralNotificationsTests(NotificationsBase):
360
360
361 notification.show()
361 notification.show()
362
362
363− get_notification = lambda: notify_list.select_single('Notification')
363+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
364 self.assertThat(get_notification, Eventually(NotEquals(None)))
364 self.assertThat(get_notification, Eventually(NotEquals(None)))
365 notification = get_notification()
365 notification = get_notification()
366 self._assert_notification(notification, summary, body, True, True, 1.0)
366 self._assert_notification(notification, summary, body, True, True, 1.0)
@@ -391,7 +391,7 @@ class EphemeralNotificationsTests(NotificationsBase):
391
391
392 notification.show()
392 notification.show()
393
393
394− get_notification = lambda: notify_list.select_single('Notification')
394+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
395 self.assertThat(get_notification, Eventually(NotEquals(None)))
395 self.assertThat(get_notification, Eventually(NotEquals(None)))
396 notification = get_notification()
396 notification = get_notification()
397 self._assert_notification(
397 self._assert_notification(
@@ -508,7 +508,7 @@ class EphemeralNotificationsTests(NotificationsBase):
508 notification = self._create_ephemeral_notification(summary, body)
508 notification = self._create_ephemeral_notification(summary, body)
509 notification.show()
509 notification.show()
510
510
511− get_notification = lambda: notify_list.select_single('Notification')
511+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
512 self.assertThat(get_notification, Eventually(NotEquals(None)))
512 self.assertThat(get_notification, Eventually(NotEquals(None)))
513 notification = get_notification()
513 notification = get_notification()
514 self._assert_notification(
514 self._assert_notification(
@@ -533,7 +533,7 @@ class EphemeralNotificationsTests(NotificationsBase):
533 notification = self._create_ephemeral_notification(summary)
533 notification = self._create_ephemeral_notification(summary)
534 notification.show()
534 notification.show()
535
535
536− get_notification = lambda: notify_list.select_single('Notification')
536+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
537 self.assertThat(get_notification, Eventually(NotEquals(None)))
537 self.assertThat(get_notification, Eventually(NotEquals(None)))
538 notification = get_notification()
538 notification = get_notification()
539
539
@@ -603,7 +603,7 @@ class EphemeralNotificationsTests(NotificationsBase):
603 )
603 )
604 notification.show()
604 notification.show()
605
605
606− get_notification = lambda: notify_list.select_single('Notification')
606+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
607 self.assertThat(get_notification, Eventually(NotEquals(None)))
607 self.assertThat(get_notification, Eventually(NotEquals(None)))
608 self._assert_notification(
608 self._assert_notification(
609 get_notification(),
609 get_notification(),
@@ -645,7 +645,7 @@ class EphemeralNotificationsTests(NotificationsBase):
645
645
646 notification.show()
646 notification.show()
647
647
648− get_notification = lambda: notify_list.select_single('Notification')
648+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
649 self.assertThat(get_notification, Eventually(NotEquals(None)))
649 self.assertThat(get_notification, Eventually(NotEquals(None)))
650 notification = get_notification()
650 notification = get_notification()
651 self._assert_notification(
651 self._assert_notification(
@@ -678,7 +678,8 @@ class EphemeralNotificationsTests(NotificationsBase):
678 )
678 )
679 notification.show()
679 notification.show()
680 get_notification = lambda: notify_list.select_single(
680 get_notification = lambda: notify_list.select_single(
681− 'Notification'
681+ 'Notification',
682+ objectName='notification1'
682 )
683 )
683 self.assertThat(get_notification, Eventually(NotEquals(None)))
684 self.assertThat(get_notification, Eventually(NotEquals(None)))
684 notification = get_notification()
685 notification = get_notification()