[Merge] lp:~iahmad/messaging-app/autopilot_test_helpers into lp:messaging-app

Gustavo Pichorim Boiko gustavo.boiko at canonical.com
Tue Jul 15 02:09:50 UTC 2014


Review: Needs Fixing

Can you please just fix the issue on the inline comment and after that do the MP submission checklist as described here:
https://wiki.ubuntu.com/Process/Merges/Checklists/system-apps

Diff comments:

> === modified file 'src/qml/NewRecipientPage.qml'
> --- src/qml/NewRecipientPage.qml	2014-07-07 22:48:19 +0000
> +++ src/qml/NewRecipientPage.qml	2014-07-14 14:26:27 +0000
> @@ -47,7 +47,7 @@
>  
>      ContactListView {
>          id: contactList
> -
> +        objectName: "newRecipientList"
>          anchors {
>              top: parent.top
>              left: parent.left
> 
> === modified file 'tests/autopilot/messaging_app/emulators.py'
> --- tests/autopilot/messaging_app/emulators.py	2014-07-08 08:35:32 +0000
> +++ tests/autopilot/messaging_app/emulators.py	2014-07-14 14:26:27 +0000
> @@ -145,6 +145,27 @@
>              objectName='addContactButton',
>          )
>  
> +    def get_toolbar_add_contact_icon(self):
> +        """Return toolbar icon with name new-contact"""
> +
> +        return self.select_single(

Just to avoid timing problems, can you please change this to use wait_select_single instead?

> +            'Icon',
> +            name='new-contact',
> +        )
> +
> +    def click_add_contact_icon(self):
> +        """Click the add contact icon"""
> +
> +        icon = self.get_toolbar_add_contact_icon()
> +        self.pointing_device.click_object(icon)
> +
> +    def get_contact_list_view(self):
> +        """Returns the ContactListView object"""
> +        return self.select_single(
> +            'ContactListView',
> +            objectName='newRecipientList'
> +        )
> +
>      def get_toolbar_contact_profile_button(self):
>          """Return toolbar button with objectName contactProfileButton"""
>  
> 
> === modified file 'tests/autopilot/messaging_app/tests/test_messaging.py'
> --- tests/autopilot/messaging_app/tests/test_messaging.py	2014-06-30 08:42:16 +0000
> +++ tests/autopilot/messaging_app/tests/test_messaging.py	2014-07-14 14:26:27 +0000
> @@ -90,6 +90,16 @@
>  class TestMessaging(BaseMessagingTestCase):
>      """Tests for the communication panel."""
>  
> +    def test_helper_get_contact_list_view(self):
> +        """test get_contact_list_view() helper is working"""
> +        # open the chat window
> +        self.main_view.start_new_message()
> +        self.main_view.click_add_contact_icon()
> +
> +        # pop up the contact list to choose recipient
> +        contact_view = self.main_view.get_contact_list_view()
> +        self.assertThat(contact_view.visible, Eventually(Equals(True)))
> +
>      def test_write_new_message_to_group(self):
>          recipient_list = ["123", "321"]
>          self.main_view.start_new_message()
> 


-- 
https://code.launchpad.net/~iahmad/messaging-app/autopilot_test_helpers/+merge/226662
Your team Ubuntu Phablet Team is subscribed to branch lp:messaging-app.



More information about the Ubuntu-reviews mailing list