@@ -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='notification0')
197 'Notification', objectName='notification0')
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(
@@ -209,6 +209,76 @@ class InteractiveNotificationBase(NotificationsBase):
209 self.touch.tap_object(notification.select_single(objectName="button4"))
209 self.touch.tap_object(notification.select_single(objectName="button4"))
210 self.assert_notification_action_id_was_called("action_decline_4")
210 self.assert_notification_action_id_was_called("action_decline_4")
212+ def test_modal_sd_without_greeter (self):
213+ """A snap-decision on a phone should block input to shell beneath it when there's no greeter."""
214+ unity_proxy = self.launch_unity()
215+ unlock_unity(unity_proxy)
217+ summary = "Incoming file"
218+ body = "Frank would like to send you the file: essay.pdf"
219+ icon_path = "sync-idle"
221+ ("x-canonical-snap-decisions", "true"),
222+ ("x-canonical-non-shaped-icon", "true"),
226+ ('action_accept', 'Accept'),
227+ ('action_decline_1', 'Decline'),
230+ self._create_interactive_notification(
239+ notify_list = self._get_notifications_list()
240+ get_notification = lambda: notify_list.wait_select_single(
241+ 'Notification', objectName='notification0')
242+ notification = get_notification()
243+ self._assert_notification(notification, summary, body, True, False, 1.0)
244+ self.touch.tap_object(notification.select_single(objectName="button0"))
245+ self.assert_notification_action_id_was_called("action_accept")
247+ def test_modal_sd_with_greeter (self):
248+ """A snap-decision on a phone should not block input to the greeter beneath it."""
249+ unity_proxy = self.launch_unity()
250+ greeter = self.main_window.get_greeter()
252+ summary = "Incoming file"
253+ body = "Frank would like to send you the file: essay.pdf"
254+ icon_path = "sync-idle"
256+ ("x-canonical-snap-decisions", "true"),
257+ ("x-canonical-non-shaped-icon", "true"),
261+ ('action_accept', 'Accept'),
262+ ('action_decline_1', 'Decline'),
265+ self._create_interactive_notification(
274+ notify_list = self._get_notifications_list()
275+ get_notification = lambda: notify_list.wait_select_single(
276+ 'Notification', objectName='notification0')
277+ notification = get_notification()
278+ self._assert_notification(notification, summary, body, True, False, 1.0)
279+ self.touch.tap_object(notification.select_single(objectName="button0"))
280+ self.assert_notification_action_id_was_called("action_accept")
212 def _create_interactive_notification(
282 def _create_interactive_notification(
214 summary="",
284 summary="",