on xenial help sign in
Start adapting the notification autopilot test for snap-decisions with ComboButton.
commita757687756ae1b7063520668493c9605785de476 authorMirco Müller <mirco.mueller@canonical.com> dateThu 29 May 2014, 17:01 (12 years ago) parentc1725b9
1 file changed+9−13
tests/autopilot/unity8/shell/tests/test_notifications.py+9−13
tests/autopilot/unity8/shell/tests/test_notifications.py+9−13
@@ -178,11 +178,13 @@ class InteractiveNotificationBase(NotificationsBase):
178178 ]
179179
180180 actions = [
181− ('action_accept', 'Accept'),
182− ('action_decline_1', 'Decline'),
183− ('action_decline_2', '"Can\'t talk now, what\'s up?"'),
184− ('action_decline_3', '"I call you back."'),
185− ('action_decline_4', 'Send custom message...'),
181+ ('action_accept', 'Hold + Answer'),
182+ ('action_decline_1', 'End + Answer'),
183+ ('action_decline_2', 'Decline'),
184+ ('action_decline_3', 'messages:I missed your call - can you call me now?'),
185+ ('action_decline_4', 'messages:I\'m running late. I\'m on my way.'),
186+ ('action_decline_5', 'messages:I\'m busy at the moment. I\'ll call later.'),
187+ ('action_decline_6', 'edit:Custom'),
186188 ]
187189
188190 self._create_interactive_notification(
@@ -200,14 +202,8 @@ class InteractiveNotificationBase(NotificationsBase):
200202 notification = get_notification()
201203 self._assert_notification(notification, summary, body, True, True, 1.0)
202204 initial_height = notification.height
203− self.touch.tap_object(notification.select_single(objectName="button1"))
204− self.assertThat(
205− notification.height,
206− Eventually(Equals(initial_height +
207− 3 * notification.select_single(
208− objectName="buttonColumn").spacing +
209− 3 * notification.select_single(
210− objectName="button4").height)))
205+ self.touch.tap_object(notification.select_single(objectName="combobutton_dropdown"))
206+ self.assertThat(notification.select_single(objectName="button2").expanded, Eventually(Equals(True)))
211207 self.touch.tap_object(notification.select_single(objectName="button4"))
212208 self.assert_notification_action_id_was_called("action_decline_4")
213209