on xenial help sign in
Adapt to dummy notification being gone
47eebe2Albert Astals Cid
tests/autopilot/unity8/shell/__init__.py+2
@@ -25,6 +25,8 @@ from functools import wraps
25import ubuntuuitoolkit
25import ubuntuuitoolkit
26from autopilot import logging as autopilot_logging
26from autopilot import logging as autopilot_logging
27from autopilot import input
27from autopilot import input
28+import gi
29+gi.require_version('Notify', '0.7')
28from gi.repository import Notify
30from gi.repository import Notify
29
31
30from unity8 import (
32from unity8 import (
tests/autopilot/unity8/shell/tests/test_notifications.py+9−9
@@ -143,7 +143,7 @@ class InteractiveNotificationBase(NotificationsBase):
143 )
143 )
144
144
145 get_notification = lambda: notify_list.wait_select_single(
145 get_notification = lambda: notify_list.wait_select_single(
146− 'Notification', objectName='notification1')
146+ 'Notification', objectName='notification0')
147 notification = get_notification()
147 notification = get_notification()
148
148
149 notification.pointing_device.click_object(
149 notification.pointing_device.click_object(
@@ -185,7 +185,7 @@ class InteractiveNotificationBase(NotificationsBase):
185 # verify and interact with the triggered snap-decision notification
185 # verify and interact with the triggered snap-decision notification
186 notify_list = self._get_notifications_list()
186 notify_list = self._get_notifications_list()
187 get_notification = lambda: notify_list.wait_select_single(
187 get_notification = lambda: notify_list.wait_select_single(
188− 'Notification', objectName='notification1')
188+ 'Notification', objectName='notification0')
189 notification = get_notification()
189 notification = get_notification()
190 self._assert_notification(
190 self._assert_notification(
191 notification, summary, body, False, False, 1.0)
191 notification, summary, body, False, False, 1.0)
@@ -234,7 +234,7 @@ class InteractiveNotificationBase(NotificationsBase):
234 # verify and interact with the triggered snap-decision notification
234 # verify and interact with the triggered snap-decision notification
235 notify_list = self._get_notifications_list()
235 notify_list = self._get_notifications_list()
236 get_notification = lambda: notify_list.wait_select_single(
236 get_notification = lambda: notify_list.wait_select_single(
237− 'Notification', objectName='notification1')
237+ 'Notification', objectName='notification0')
238 notification = get_notification()
238 notification = get_notification()
239 self._assert_notification(
239 self._assert_notification(
240 notification, summary, body, True, False, 1.0)
240 notification, summary, body, True, False, 1.0)
@@ -282,7 +282,7 @@ class InteractiveNotificationBase(NotificationsBase):
282 # verify and interact with the triggered snap-decision notification
282 # verify and interact with the triggered snap-decision notification
283 notify_list = self._get_notifications_list()
283 notify_list = self._get_notifications_list()
284 get_notification = lambda: notify_list.wait_select_single(
284 get_notification = lambda: notify_list.wait_select_single(
285− 'Notification', objectName='notification1')
285+ 'Notification', objectName='notification0')
286 notification = get_notification()
286 notification = get_notification()
287 self._assert_notification(
287 self._assert_notification(
288 notification, summary, body, True, False, 1.0)
288 notification, summary, body, True, False, 1.0)
@@ -445,7 +445,7 @@ class EphemeralNotificationsTests(NotificationsBase):
445 notification.show()
445 notification.show()
446
446
447 notification = lambda: notify_list.wait_select_single(
447 notification = lambda: notify_list.wait_select_single(
448− 'Notification', objectName='notification1')
448+ 'Notification', objectName='notification0')
449 self._assert_notification(
449 self._assert_notification(
450 notification(),
450 notification(),
451 summary,
451 summary,
@@ -478,7 +478,7 @@ class EphemeralNotificationsTests(NotificationsBase):
478 notification.show()
478 notification.show()
479
479
480 notification = lambda: notify_list.wait_select_single(
480 notification = lambda: notify_list.wait_select_single(
481− 'Notification', objectName='notification1')
481+ 'Notification', objectName='notification0')
482 self._assert_notification(
482 self._assert_notification(
483 notification(),
483 notification(),
484 summary,
484 summary,
@@ -590,7 +590,7 @@ class EphemeralNotificationsTests(NotificationsBase):
590 notification.show()
590 notification.show()
591
591
592 notification = notify_list.wait_select_single(
592 notification = notify_list.wait_select_single(
593− 'Notification', objectName='notification1')
593+ 'Notification', objectName='notification0')
594
594
595 self._assert_notification(
595 self._assert_notification(
596 notification,
596 notification,
@@ -614,7 +614,7 @@ class EphemeralNotificationsTests(NotificationsBase):
614 notification.show()
614 notification.show()
615
615
616 notification = notify_list.wait_select_single(
616 notification = notify_list.wait_select_single(
617− 'Notification', objectName='notification1')
617+ 'Notification', objectName='notification0')
618
618
619 self._assert_notification(notification, summary, '', False, False, 1.0)
619 self._assert_notification(notification, summary, '', False, False, 1.0)
620
620
@@ -683,7 +683,7 @@ class EphemeralNotificationsTests(NotificationsBase):
683 notification.show()
683 notification.show()
684
684
685 get_notification = lambda: notify_list.wait_select_single(
685 get_notification = lambda: notify_list.wait_select_single(
686− 'Notification', objectName='notification1')
686+ 'Notification', objectName='notification0')
687
687
688 self._assert_notification(
688 self._assert_notification(
689 get_notification(),
689 get_notification(),