on xenial help sign in
Fix notification ap-test assertions.
e2e4565Mirco Müller
tests/autopilot/unity8/shell/tests/test_notifications.py+3−4
@@ -196,7 +196,7 @@ class InteractiveNotificationBase(NotificationsBase):
196 get_notification = lambda: notify_list.wait_select_single(
196 get_notification = lambda: notify_list.wait_select_single(
197 'Notification', objectName='notification1')
197 'Notification', objectName='notification1')
198 notification = get_notification()
198 notification = get_notification()
199− self._assert_notification(notification, None, None, True, True, 1.0)
199+ self._assert_notification(notification, summary, body, True, True, 1.0)
200 initial_height = notification.height
200 initial_height = notification.height
201 self.touch.tap_object(notification.select_single(objectName="button1"))
201 self.touch.tap_object(notification.select_single(objectName="button1"))
202 self.assertThat(
202 self.assertThat(
@@ -403,7 +403,6 @@ class EphemeralNotificationsTests(NotificationsBase):
403
403
404 notification = lambda: notify_list.wait_select_single(
404 notification = lambda: notify_list.wait_select_single(
405 'Notification', objectName='notification1')
405 'Notification', objectName='notification1')
406−
407 self._assert_notification(
406 self._assert_notification(
408 notification(),
407 notification(),
409 summary,
408 summary,
@@ -579,7 +578,7 @@ class EphemeralNotificationsTests(NotificationsBase):
579 icon_path = self._get_icon_path('avatars/amanda.png')
578 icon_path = self._get_icon_path('avatars/amanda.png')
580 notification.update(summary, body, icon_path)
579 notification.update(summary, body, icon_path)
581 notification.show()
580 notification.show()
582− self._assert_notification(get_notification(), summary, body)
581+ self._assert_notification(get_notification(), summary, body, True, False, 1.0)
583
582
584 def test_update_notification_layout_change(self):
583 def test_update_notification_layout_change(self):
585 """Notification must allow updating its contents and layout while
584 """Notification must allow updating its contents and layout while
@@ -626,7 +625,7 @@ class EphemeralNotificationsTests(NotificationsBase):
626 notification.show()
625 notification.show()
627
626
628 self.assertThat(get_notification, Eventually(NotEquals(None)))
627 self.assertThat(get_notification, Eventually(NotEquals(None)))
629− self._assert_notification(get_notification(), summary, body, False)
628+ self._assert_notification(get_notification(), summary, body, False, False, 1.0)
630
629
631 def test_append_hint(self):
630 def test_append_hint(self):
632 """Notification has to accumulate body-text using append-hint."""
631 """Notification has to accumulate body-text using append-hint."""