|
| unity_geometry_args |
|
| grid_size |
|
| scenarios |
|
Collection of tests for Emphemeral notifications (non-interactive.)
Definition at line 412 of file test_notifications.py.
§ test_icon_summary()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_icon_summary |
( |
|
self | ) |
|
Notification must display the expected summary and secondary
icon.
Definition at line 458 of file test_notifications.py.
458 def test_icon_summary(self):
459 """Notification must display the expected summary and secondary 464 notify_list = self._get_notifications_list()
466 summary =
"Upload of image completed" 467 icon_path = self._get_icon_path(
'applicationIcons/facebook.png')
470 notification = shell.create_ephemeral_notification(
480 notification =
lambda: notify_list.wait_select_single(
481 'Notification', objectName=
'notification0')
482 self._assert_notification(
§ test_icon_summary_body()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_icon_summary_body |
( |
|
self | ) |
|
Notification must display the expected summary and body text.
Definition at line 422 of file test_notifications.py.
422 def test_icon_summary_body(self):
423 """Notification must display the expected summary and body text.""" 427 notify_list = self._get_notifications_list()
429 summary =
"Icon-Summary-Body" 430 body =
"Hey pal, what's up with the party next weekend? Will you " \
432 icon_path = self._get_icon_path(
'avatars/anna_olsson.png')
434 (
"x-canonical-secondary-icon",
"message")
437 notification = shell.create_ephemeral_notification(
447 notification =
lambda: notify_list.wait_select_single(
448 'Notification', objectName=
'notification0')
449 self._assert_notification(
§ test_notification_helper()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_notification_helper |
( |
|
self | ) |
|
use the create notification script to get a notification dialog.
Check that the arguments passed to the script match the fields.
Definition at line 708 of file test_notifications.py.
708 def test_notification_helper(self):
709 """ use the create notification script to get a notification dialog. 710 Check that the arguments passed to the script match the fields. """ 715 summary =
'Helper summary' 718 notification = shell.create_ephemeral_notification(summary, body)
721 notification_data = self.main_window.wait_for_notification()
723 self.assertThat(notification_data[
'summary'],
724 Eventually(Equals(summary)))
725 self.assertThat(notification_data[
'body'], Eventually(Equals(body)))
§ test_summary_and_body()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_summary_and_body |
( |
|
self | ) |
|
Notification must display the expected summary- and body-text.
Definition at line 579 of file test_notifications.py.
579 def test_summary_and_body(self):
580 """Notification must display the expected summary- and body-text.""" 584 notify_list = self._get_notifications_list()
586 summary =
'Summary-Body' 587 body =
'This is a superfluous notification' 589 notification = shell.create_ephemeral_notification(summary, body)
592 notification = notify_list.wait_select_single(
593 'Notification', objectName=
'notification0')
595 self._assert_notification(
§ test_summary_only()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_summary_only |
( |
|
self | ) |
|
Notification must display only the expected summary-text.
Definition at line 604 of file test_notifications.py.
604 def test_summary_only(self):
605 """Notification must display only the expected summary-text.""" 609 notify_list = self._get_notifications_list()
611 summary =
'Summary-Only' 613 notification = shell.create_ephemeral_notification(summary)
616 notification = notify_list.wait_select_single(
617 'Notification', objectName=
'notification0')
619 self._assert_notification(notification, summary,
'',
False,
False, 1.0)
§ test_update_notification_layout_change()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_update_notification_layout_change |
( |
|
self | ) |
|
Notification must allow updating its contents and layout while
being displayed.
Definition at line 660 of file test_notifications.py.
660 def test_update_notification_layout_change(self):
661 """Notification must allow updating its contents and layout while 666 notify_list = self._get_notifications_list()
668 summary =
'Initial layout' 669 body =
'This bubble uses the icon-title-body layout with a ' \
671 icon_path = self._get_icon_path(
'avatars/anna_olsson.png')
674 notification = shell.create_ephemeral_notification(
679 notification.set_hint_string(
680 'x-canonical-secondary-icon',
685 get_notification =
lambda: notify_list.wait_select_single(
686 'Notification', objectName=
'notification0')
688 self._assert_notification(
697 notification.clear_hints()
698 summary =
'Updated layout' 699 body =
'After the update we now have a bubble using the title-body ' \
701 notification.update(summary, body,
None)
704 self.assertThat(get_notification, Eventually(NotEquals(
None)))
705 self._assert_notification(
706 get_notification(), summary, body,
False,
False, 1.0)
§ test_update_notification_same_layout()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_update_notification_same_layout |
( |
|
self | ) |
|
Notification must allow updating its contents while being
displayed.
Definition at line 621 of file test_notifications.py.
621 def test_update_notification_same_layout(self):
622 """Notification must allow updating its contents while being 627 notify_list = self._get_notifications_list()
629 summary =
'Initial notification' 630 body =
'This is the original content of this notification-bubble.' 631 icon_path = self._get_icon_path(
'avatars/funky.png')
633 notification = shell.create_ephemeral_notification(
640 get_notification =
lambda: notify_list.wait_select_single(
641 'Notification', summary=summary)
642 self._assert_notification(
651 summary =
'Updated notification' 652 body =
'Here the same bubble with new title- and body-text, even ' \
653 'the icon can be changed on the update.' 654 icon_path = self._get_icon_path(
'avatars/amanda.png')
655 notification.update(summary, body, icon_path)
657 self._assert_notification(
658 get_notification(), summary, body,
True,
False, 1.0)
§ test_urgency_order()
def unity8.shell.tests.test_notifications.EphemeralNotificationsTests.test_urgency_order |
( |
|
self | ) |
|
Notifications must be displayed in order according to their
urgency.
Definition at line 491 of file test_notifications.py.
491 def test_urgency_order(self):
492 """Notifications must be displayed in order according to their 497 notify_list = self._get_notifications_list()
499 summary_low =
'Low Urgency' 500 body_low =
"No, I'd rather see paint dry, pal *yawn*" 501 icon_path_low = self._get_icon_path(
'avatars/amanda.png')
503 summary_normal =
'Normal Urgency' 504 body_normal =
"Hey pal, what's up with the party next weekend? Will " \
505 "you join me and Anna?" 506 icon_path_normal = self._get_icon_path(
'avatars/funky.png')
508 summary_critical =
'Critical Urgency' 509 body_critical =
'Dude, this is so urgent you have no idea :)' 510 icon_path_critical = self._get_icon_path(
'avatars/anna_olsson.png')
512 notification_normal = shell.create_ephemeral_notification(
518 notification_normal.show()
520 notification_low = shell.create_ephemeral_notification(
526 notification_low.show()
528 notification_critical = shell.create_ephemeral_notification(
534 notification_critical.show()
536 get_notification =
lambda: notify_list.wait_select_single(
538 summary=summary_critical
541 notification = get_notification()
542 self._assert_notification(
551 get_normal_notification =
lambda: notify_list.wait_select_single(
553 summary=summary_normal
555 notification = get_normal_notification()
556 self._assert_notification(
565 get_low_notification =
lambda: notify_list.wait_select_single(
569 notification = get_low_notification()
570 self._assert_notification(
The documentation for this class was generated from the following file: