on xenial help sign in
Hide placeholder notification.

Approved by Michał Sawicz.

commit33eb6bef1818cb956ed907acba16f8923c9e97b3 authorAlbert Astals <albert.astals@canonical.com> dateWed 16 Oct 2013, 16:45 (13 years ago) parentba32a88601103c
2 files changed+12−10
Notifications/Notification.qml+2−1 tests/autopilot/unity8/shell/tests/test_notifications.py+10−9
Notifications/Notification.qml+2−1
@@ -34,12 +34,13 @@ UbuntuShape {
3434 property var notification
3535
3636 objectName: "background"
37− implicitHeight: contentColumn.height + contentColumn.spacing * 2
37+ implicitHeight: type != Notification.PlaceHolder ? contentColumn.height + contentColumn.spacing * 2 : 0
3838 color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
3939 opacity: 0
4040 radius: "medium"
4141
4242 clip: true
43+ visible: type != Notification.PlaceHolder
4344
4445 UnityMenuModelPaths {
4546 id: paths
tests/autopilot/unity8/shell/tests/test_notifications.py+10−9
@@ -145,7 +145,7 @@ class InteractiveNotificationBase(NotificationsBase):
145145 hints,
146146 )
147147
148− get_notification = lambda: notify_list.select_single('Notification')
148+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
149149 self.assertThat(get_notification, Eventually(NotEquals(None)))
150150 notification = get_notification()
151151
@@ -191,7 +191,7 @@ class InteractiveNotificationBase(NotificationsBase):
191191 hints
192192 )
193193
194− get_notification = lambda: notify_list.select_single('Notification')
194+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
195195 self.assertThat(get_notification, Eventually(NotEquals(None)))
196196 notification = get_notification()
197197 self._assert_notification(notification, None, None, True, True, 1.0)
@@ -360,7 +360,7 @@ class EphemeralNotificationsTests(NotificationsBase):
360360
361361 notification.show()
362362
363− get_notification = lambda: notify_list.select_single('Notification')
363+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
364364 self.assertThat(get_notification, Eventually(NotEquals(None)))
365365 notification = get_notification()
366366 self._assert_notification(notification, summary, body, True, True, 1.0)
@@ -391,7 +391,7 @@ class EphemeralNotificationsTests(NotificationsBase):
391391
392392 notification.show()
393393
394− get_notification = lambda: notify_list.select_single('Notification')
394+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
395395 self.assertThat(get_notification, Eventually(NotEquals(None)))
396396 notification = get_notification()
397397 self._assert_notification(
@@ -508,7 +508,7 @@ class EphemeralNotificationsTests(NotificationsBase):
508508 notification = self._create_ephemeral_notification(summary, body)
509509 notification.show()
510510
511− get_notification = lambda: notify_list.select_single('Notification')
511+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
512512 self.assertThat(get_notification, Eventually(NotEquals(None)))
513513 notification = get_notification()
514514 self._assert_notification(
@@ -533,7 +533,7 @@ class EphemeralNotificationsTests(NotificationsBase):
533533 notification = self._create_ephemeral_notification(summary)
534534 notification.show()
535535
536− get_notification = lambda: notify_list.select_single('Notification')
536+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
537537 self.assertThat(get_notification, Eventually(NotEquals(None)))
538538 notification = get_notification()
539539
@@ -603,7 +603,7 @@ class EphemeralNotificationsTests(NotificationsBase):
603603 )
604604 notification.show()
605605
606− get_notification = lambda: notify_list.select_single('Notification')
606+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
607607 self.assertThat(get_notification, Eventually(NotEquals(None)))
608608 self._assert_notification(
609609 get_notification(),
@@ -645,7 +645,7 @@ class EphemeralNotificationsTests(NotificationsBase):
645645
646646 notification.show()
647647
648− get_notification = lambda: notify_list.select_single('Notification')
648+ get_notification = lambda: notify_list.select_single('Notification', objectName='notification1')
649649 self.assertThat(get_notification, Eventually(NotEquals(None)))
650650 notification = get_notification()
651651 self._assert_notification(
@@ -678,7 +678,8 @@ class EphemeralNotificationsTests(NotificationsBase):
678678 )
679679 notification.show()
680680 get_notification = lambda: notify_list.select_single(
681− 'Notification'
681+ 'Notification',
682+ objectName='notification1'
682683 )
683684 self.assertThat(get_notification, Eventually(NotEquals(None)))
684685 notification = get_notification()