~mterry/+junk/u8

« back to all changes in this revision

Viewing changes to tests/autopilot/unity8/shell/tests/test_notifications.py

updated from lp:~unity-mir/unity8/shellRotation

Show diffs side-by-side

added added

removed removed

Lines of Context:
701
701
        self.assertThat(get_notification, Eventually(NotEquals(None)))
702
702
        self._assert_notification(
703
703
            get_notification(), summary, body, False, False, 1.0)
 
704
 
 
705
    def test_notification_helper(self):
 
706
        """ use the create notification script to get a notification dialog.
 
707
        Check that the arguments passed to the script match the fields. """
 
708
 
 
709
        unity_proxy = self.launch_unity()
 
710
        unlock_unity(unity_proxy)
 
711
 
 
712
        summary = 'Helper summary'
 
713
        body = 'Helper body'
 
714
 
 
715
        notification = shell.create_ephemeral_notification(summary, body)
 
716
        notification.show()
 
717
 
 
718
        notification_data = self.main_window.wait_for_notification()
 
719
 
 
720
        self.assertThat(notification_data['summary'],
 
721
                        Eventually(Equals(summary)))
 
722
        self.assertThat(notification_data['body'], Eventually(Equals(body)))