Merge lp:~iahmad/ubuntu-autopilot-tests/add-recipient-to-sms-bug1322055 into lp:ubuntu-autopilot-tests/ubuntu-experience-tests

Proposed by I Ahmad
Status: Needs review
Proposed branch: lp:~iahmad/ubuntu-autopilot-tests/add-recipient-to-sms-bug1322055
Merge into: lp:ubuntu-autopilot-tests/ubuntu-experience-tests
Diff against target: 102 lines (+81/-0)
3 files modified
debian/control (+2/-0)
ubuntu_experience_tests/tests/messaging_app/__init__.py (+17/-0)
ubuntu_experience_tests/tests/messaging_app/test_messaging_app.py (+62/-0)
To merge this branch: bzr merge lp:~iahmad/ubuntu-autopilot-tests/add-recipient-to-sms-bug1322055
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Brendan Donegan (community) Needs Fixing
Omer Akram Pending
Review via email: mp+227435@code.launchpad.net

Commit message

Added a UX test to test integration between messaging and addressbook apps.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Made some comments. Needs quite a few helpers near the end, but otherwise looks good.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I should update the status too

review: Needs Fixing
27. By I Ahmad

udpate the test to use newly added helpers into messaging app

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

27. By I Ahmad

udpate the test to use newly added helpers into messaging app

26. By I Ahmad

Update the control file for required dependencies

25. By I Ahmad

Added test case to choose messaging recipient from pop up contact list

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2014-07-03 05:13:26 +0000
+++ debian/control 2014-07-21 10:51:10 +0000
@@ -21,6 +21,8 @@
21 ubuntu-ui-toolkit-autopilot,21 ubuntu-ui-toolkit-autopilot,
22 unity8-autopilot,22 unity8-autopilot,
23 url-dispatcher-tools,23 url-dispatcher-tools,
24 address-book-app-autopilot,
25 messaging-app-autopilot,
24Description: Ubuntu user experience Autopilot tests26Description: Ubuntu user experience Autopilot tests
25 This package provides a set of autopilot tests for testing27 This package provides a set of autopilot tests for testing
26 the inter-app integration under Unity828 the inter-app integration under Unity8
2729
=== added directory 'ubuntu_experience_tests/tests/messaging_app'
=== added file 'ubuntu_experience_tests/tests/messaging_app/__init__.py'
--- ubuntu_experience_tests/tests/messaging_app/__init__.py 1970-01-01 00:00:00 +0000
+++ ubuntu_experience_tests/tests/messaging_app/__init__.py 2014-07-21 10:51:10 +0000
@@ -0,0 +1,17 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright 2014 Canonical Ltd.
4#
5# This file is part of ubuntu-experience-tests for messaging-app.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>
018
=== added file 'ubuntu_experience_tests/tests/messaging_app/test_messaging_app.py'
--- ubuntu_experience_tests/tests/messaging_app/test_messaging_app.py 1970-01-01 00:00:00 +0000
+++ ubuntu_experience_tests/tests/messaging_app/test_messaging_app.py 2014-07-21 10:51:10 +0000
@@ -0,0 +1,62 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright 2014 Canonical Ltd.
4# Author: Iftikhar Ahmad <iftikhar.ahmad@canonical.com>
5#
6# This file is part of ubuntu-experience-tests.
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License version 3, as published
10# by the Free Software Foundation.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>
19
20"""System Integration tests which are generally initiated from messaging-app"""
21
22from messaging_app.tests import test_messaging as messaging_tests
23from ubuntu_experience_tests import fixture_setup
24from ubuntu_experience_tests import helpers
25from autopilot.matchers import Eventually
26from testtools.matchers import Equals
27
28CONTACT_NAME = 'First Last'
29CONTACT_NUMBER = '(012) 345-6789'
30
31CONTACT_VCARD = """
32BEGIN:VCARD
33VERSION:3.0
34N:%s
35TEL;TYPE=WORK,VOICE;PID=1.1:%s
36END:VCARD
37""" % (CONTACT_NAME, CONTACT_NUMBER)
38
39
40class MessagingAddressBookTestCase(messaging_tests.BaseMessagingTestCase):
41
42 def setUp(self):
43 super(MessagingAddressBookTestCase, self).setUp()
44 self.useFixture(fixture_setup.TestabilityEnvironment())
45 self.contacts_service = helpers.ContactsDbusService()
46 self.test_contact = self.contacts_service.create_contact(CONTACT_VCARD)
47 self.addCleanup(self.contacts_service.delete_contact,
48 [self.contacts_service.get_vcard_uid(
49 self.test_contact)])
50
51 def test_add_recipient_from_contacts(self):
52 """Verify a contact from contact list can be added to recipient list"""
53 self.main_view.start_new_message()
54 self.main_view.click_add_contact_icon()
55 contact_view = self.main_view.get_contact_list_view()
56 self.assertThat(contact_view.visible, Eventually(Equals(True)))
57 self.main_view.select_contact_number_from_list(contact_view,
58 CONTACT_NAME,
59 CONTACT_NUMBER)
60 contact = self.main_view.get_recipient_from_recipients(CONTACT_NAME)
61 self.assertIsNotNone(contact)
62 self.assertThat(contact.phoneNumber, Equals(CONTACT_NUMBER))

Subscribers

People subscribed via source and target branches