on xenial help sign in
Also use modal nature of snap-decision notifications when greeter/lockscreen is shown... adapted related autopilot-tests accordingly.
daff363Mirco Müller
qml/Shell.qml+1−1
@@ -693,7 +693,7 @@ Item {
693 Rectangle {
693 Rectangle {
694 id: modalNotificationBackground
694 id: modalNotificationBackground
695
695
696− visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
696+ visible: notifications.useModal && (notifications.state == "narrow")
697 color: "#000000"
697 color: "#000000"
698 anchors.fill: parent
698 anchors.fill: parent
699 opacity: 0.9
699 opacity: 0.9
tests/autopilot/unity8/shell/tests/test_notifications.py+6−5
@@ -248,7 +248,7 @@ class InteractiveNotificationBase(NotificationsBase):
248 self.assert_notification_action_id_was_called("action_accept")
248 self.assert_notification_action_id_was_called("action_accept")
249
249
250 def test_modal_sd_without_greeter(self):
250 def test_modal_sd_without_greeter(self):
251− """Snap-decision should block input to shell without greeter."""
251+ """Snap-decision should block input to shell without greeter/lockscreen."""
252 unity_proxy = self.launch_unity()
252 unity_proxy = self.launch_unity()
253 unlock_unity(unity_proxy)
253 unlock_unity(unity_proxy)
254
254
@@ -295,7 +295,7 @@ class InteractiveNotificationBase(NotificationsBase):
295 self.assert_notification_action_id_was_called("action_accept")
295 self.assert_notification_action_id_was_called("action_accept")
296
296
297 def test_modal_sd_with_greeter(self):
297 def test_modal_sd_with_greeter(self):
298− """A snap-decision should not block input to the greeter beneath it."""
298+ """A snap-decision should block input to the greeter/lockscreen beneath it."""
299 self.launch_unity()
299 self.launch_unity()
300
300
301 summary = "Incoming file"
301 summary = "Incoming file"
@@ -322,11 +322,12 @@ class InteractiveNotificationBase(NotificationsBase):
322 hints
322 hints
323 )
323 )
324
324
325− # verify that we can swipe away the greeter (interact with the "shell")
325+ # verify that we cannot reveal the launcher (no longer interact with
326+ # the shell)
326 time.sleep(1)
327 time.sleep(1)
327 self.main_window.show_dash_swiping()
328 self.main_window.show_dash_swiping()
328− greeter = self.main_window.get_greeter()
329− self.assertThat(greeter.shown, Eventually(Equals(False)))
329+ self.assertThat(
330+ self.main_window.is_launcher_open, Eventually(Equals(False)))
330
331
331 # verify and interact with the triggered snap-decision notification
332 # verify and interact with the triggered snap-decision notification
332 notify_list = self._get_notifications_list()
333 notify_list = self._get_notifications_list()