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

Proposed by I Ahmad
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 131
Merged at revision: 141
Proposed branch: lp:~iahmad/messaging-app/autopilot_test_helpers
Merge into: lp:messaging-app
Diff against target: 65 lines (+32/-1)
3 files modified
src/qml/NewRecipientPage.qml (+1/-1)
tests/autopilot/messaging_app/emulators.py (+21/-0)
tests/autopilot/messaging_app/tests/test_messaging.py (+10/-0)
To merge this branch: bzr merge lp:~iahmad/messaging-app/autopilot_test_helpers
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Brendan Donegan (community) Approve
Review via email: mp+226662@code.launchpad.net

Commit message

some new helpers for AP tests

Description of the change

Some new helpers are added to improve the messaging-app test coverage itself and to aid into the UX tests being written as an independent test suite.

These particular helper is needed to pop up the contact list when receipents needs to be added to the list.

1. Are there any related MPs required for this MP to build/function as expected? Please list. No

2. Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes) Yes

3. Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator? N/A

4. Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/<package-name>) on device or emulator? Yes - No new failures

5. If you changed the UI, was the change specified/approved by design? N/A

6. If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP? N/A

To post a comment you must log in.
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Any reason not to just have a helper called 'add_contact_to_message' which clicks on the appropriate icon? It could be build on a seperate get_toolbar_add_contact_icon (i.e. get the icon, click it), so you can keep that.

review: Needs Information
131. By I Ahmad

 Added click helper for add contact icon

Revision history for this message
I Ahmad (iahmad) wrote :

brendand, done, added one more helper to combine getting the add contact icon and clicking it.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:130
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~iahmad/messaging-app/autopilot_test_helpers/+merge/226662/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/messaging-app-ci/282/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1939
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1617
    SUCCESS: http://jenkins.qa.ubuntu.com/job/messaging-app-utopic-amd64-ci/76
    SUCCESS: http://jenkins.qa.ubuntu.com/job/messaging-app-utopic-armhf-ci/76
        deb: http://jenkins.qa.ubuntu.com/job/messaging-app-utopic-armhf-ci/76/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/messaging-app-utopic-i386-ci/76
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2187
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3051
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3051/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9784
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1353
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1820
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1820/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/messaging-app-ci/282/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Looks good now to me

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

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

review: Needs Fixing
Revision history for this message
I Ahmad (iahmad) wrote :

> 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

Thanks for your review comment

re using wait_select_single, I think it is not needed in this case as it is expected that icon should appear by the time chat popover is revealed.

Added the submission checklist into description with answers.

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

Code looks good and works as expected!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/NewRecipientPage.qml'
2--- src/qml/NewRecipientPage.qml 2014-07-07 22:48:19 +0000
3+++ src/qml/NewRecipientPage.qml 2014-07-14 14:26:27 +0000
4@@ -47,7 +47,7 @@
5
6 ContactListView {
7 id: contactList
8-
9+ objectName: "newRecipientList"
10 anchors {
11 top: parent.top
12 left: parent.left
13
14=== modified file 'tests/autopilot/messaging_app/emulators.py'
15--- tests/autopilot/messaging_app/emulators.py 2014-07-08 08:35:32 +0000
16+++ tests/autopilot/messaging_app/emulators.py 2014-07-14 14:26:27 +0000
17@@ -145,6 +145,27 @@
18 objectName='addContactButton',
19 )
20
21+ def get_toolbar_add_contact_icon(self):
22+ """Return toolbar icon with name new-contact"""
23+
24+ return self.select_single(
25+ 'Icon',
26+ name='new-contact',
27+ )
28+
29+ def click_add_contact_icon(self):
30+ """Click the add contact icon"""
31+
32+ icon = self.get_toolbar_add_contact_icon()
33+ self.pointing_device.click_object(icon)
34+
35+ def get_contact_list_view(self):
36+ """Returns the ContactListView object"""
37+ return self.select_single(
38+ 'ContactListView',
39+ objectName='newRecipientList'
40+ )
41+
42 def get_toolbar_contact_profile_button(self):
43 """Return toolbar button with objectName contactProfileButton"""
44
45
46=== modified file 'tests/autopilot/messaging_app/tests/test_messaging.py'
47--- tests/autopilot/messaging_app/tests/test_messaging.py 2014-06-30 08:42:16 +0000
48+++ tests/autopilot/messaging_app/tests/test_messaging.py 2014-07-14 14:26:27 +0000
49@@ -90,6 +90,16 @@
50 class TestMessaging(BaseMessagingTestCase):
51 """Tests for the communication panel."""
52
53+ def test_helper_get_contact_list_view(self):
54+ """test get_contact_list_view() helper is working"""
55+ # open the chat window
56+ self.main_view.start_new_message()
57+ self.main_view.click_add_contact_icon()
58+
59+ # pop up the contact list to choose recipient
60+ contact_view = self.main_view.get_contact_list_view()
61+ self.assertThat(contact_view.visible, Eventually(Equals(True)))
62+
63 def test_write_new_message_to_group(self):
64 recipient_list = ["123", "321"]
65 self.main_view.start_new_message()

Subscribers

People subscribed via source and target branches