Merge lp://qastaging/~rhuddie/address-book-app/ux-calling-helpers into lp://qastaging/address-book-app

Proposed by Richard Huddie
Status: Superseded
Proposed branch: lp://qastaging/~rhuddie/address-book-app/ux-calling-helpers
Merge into: lp://qastaging/address-book-app
Diff against target: 322 lines (+246/-5)
5 files modified
debian/control (+2/-0)
tests/autopilot/address_book_app/fake_url_dispatcher.py (+74/-0)
tests/autopilot/address_book_app/pages/_contact_list_page.py (+37/-5)
tests/autopilot/address_book_app/pages/_contact_view.py (+69/-0)
tests/autopilot/address_book_app/tests/test_contactlist.py (+64/-0)
To merge this branch: bzr merge lp://qastaging/~rhuddie/address-book-app/ux-calling-helpers
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Leo Arias (community) code review Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+226473@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2014-07-22.

Commit message

New autopilot helper methods to press the telephone and message icons for a specific phone number in contacts view

Description of the change

New autopilot helper methods to press the telephone and message icons for a specific phone number in contacts view

To post a comment you must log in.
239. By Richard Huddie

flake8

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

FAILED: Continuous integration, rev:238
http://jenkins.qa.ubuntu.com/job/address-book-app-ci/601/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-amd64-ci/54
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-armhf-ci/54
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-armhf-ci/54/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-i386-ci/54
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1872
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1566
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2129
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2969
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2969/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9705
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1312
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1756
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1756/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/address-book-app-ci/601/rebuild

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

FAILED: Continuous integration, rev:239
http://jenkins.qa.ubuntu.com/job/address-book-app-ci/602/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-amd64-ci/55
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-armhf-ci/55
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-armhf-ci/55/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-i386-ci/55
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/1890
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1576
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2145
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2989
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/2989/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9723
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1320
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1766
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1766/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/address-book-app-ci/602/rebuild

review: Needs Fixing (continuous-integration)
240. By Richard Huddie

add dependencies

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

Thanks Richard. This is nice.

125 + def get_contact_index_by_name(self, display_name):

This needs some love, but feel free to leave it for the future because it's not your fault. Many things would be a lot easier if we had a method called get_contacts_info on the contacts list page. That method should return a list of contact tuples composed of all the visible information, ordered by the y coordinate. Reminders has a good example of this.
Then you could look for the contact index on that list, instead of in the QML tree.
I'm just saying it would be nice :)

174 + def _get_contact(self, index, phone_number):
This would be clearer as two methods: _get_contact_by_index and _get_contact_by_phone_number

203 + def call_contact(self, index=0, phone_number=None):
215 + def message_contact(self, index=0, phone_number=None):
Just like this, I would make two methods. And for a high level helper, I think index might not be a good parameter. I would be inclined to make a call_contact_by_number and call_contact_by_name. But in our tests we will generally have only one contact, so if you want to call him, index=0 sounds like the easiest thing to do. Feel free to keep it if you prefer that way.

231 + def get_call_button(self):
234 + def get_message_button(self):

Please make these two private method. And make two additional methods click_call_button and click_message_button. That helps encapsulating the responsibilities in the right custom proxy objects.

273 + self.add_contact("Fulano", "de Tal", [self.PHONE_NUMBER])

This is the old helper, it needs to be removed but I didn't have time to refactor all the tests.
This is the new way:

test_contact = data.Contact(
    first_name='Fulano', last_name='de Tal',
    phones=[self.PHONE_NUMBER])

contact_editor = self.app.main_window.go_to_add_contact()
contact_editor.fill_form(test_contact)

self.app.main_window.save()

You can wrap that in an add_contact method. Please don't use the other one, so it's easier to remove it once we have time.

277 + def convert_phone_number_to_url(self, phone_number):

There's a phone object on the data.py module. This sounds like a good method to have in that object.

review: Needs Fixing (code review)
241. By Richard Huddie

review updates

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

FAILED: Continuous integration, rev:241
http://jenkins.qa.ubuntu.com/job/address-book-app-ci/621/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-amd64-ci/74
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-armhf-ci/74
        deb: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-armhf-ci/74/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/address-book-app-utopic-i386-ci/74
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2240
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1861
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2441
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3424
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3424/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10135
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1563
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2080
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2080/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/address-book-app-ci/621/rebuild

review: Needs Fixing (continuous-integration)
242. By Richard Huddie

merge trunk

243. By Richard Huddie

fix review comments

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

Unmerged revisions

243. By Richard Huddie

fix review comments

242. By Richard Huddie

merge trunk

241. By Richard Huddie

review updates

240. By Richard Huddie

add dependencies

239. By Richard Huddie

flake8

238. By Richard Huddie

added fake url dispatcher and updated tests

237. By Richard Huddie

Added contact list tests for call and message contact

236. By Richard Huddie

add methods to call/message a specified contact

235. By Richard Huddie

add message_contact method

234. By Richard Huddie

Add new helpers for selecting a contact and calling them

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches