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

Subscribers

People subscribed via source and target branches