Merge lp://staging/~canonical-platform-qa/ubuntu-autopilot-tests/add-contact-with-photo into lp://staging/ubuntu-autopilot-tests/ubuntu-experience-tests

Proposed by Richard Huddie
Status: Work in progress
Proposed branch: lp://staging/~canonical-platform-qa/ubuntu-autopilot-tests/add-contact-with-photo
Merge into: lp://staging/ubuntu-autopilot-tests/ubuntu-experience-tests
Diff against target: 168 lines (+136/-1)
3 files modified
debian/control (+2/-0)
ubuntu_experience_tests/helpers.py (+1/-1)
ubuntu_experience_tests/tests/contenthub/test_address_book_integration_with_content_hub.py (+133/-0)
To merge this branch: bzr merge lp://staging/~canonical-platform-qa/ubuntu-autopilot-tests/add-contact-with-photo
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Leo Arias Pending
Review via email: mp+228687@code.staging.launchpad.net

Commit message

A new UX test to add a contact with a photo selected from gallery-app

Description of the change

A new UX test to add a contact with a photo selected from gallery-app

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
Leo Arias (elopio) wrote :

100 + self.unity.search('Contacts')
101 + label = self.unity_proxy.select_single(
102 + 'Label', objectName='titleLabel', text='Contacts')

This is about to change because the search is no longer done in the unity main view. It's done on the dash which is a separate app.
So for this test you will have to either restart the dash instead of restarting unity and do self.dash.search, or launch the app from the launcher which is work in progress.
Any way you choose, you'll have to wait. Sorry. I'll ask for your review on the unity branches once they are ready, that will speed things a little and you will see what I'm talking about.

151 + # tap the photo icon to launch the gallery app
152 + self.addCleanup(os.system, 'ubuntu-app-stop gallery-app')

Why is this needed? I thought that the gallery app would be killed as soon as the picture was selected.

157 + # wait for transition back to contacts app
158 + contact_editor.wait_to_stop_moving()

This seems a little weird. wait_to_stop_moving waits for the flickable to stop flicking, right? How is that related to the picture transfer? I might just be getting it wrong.

This looks really good. I'm eager to get it running. Thanks Richard.

Revision history for this message
Richard Huddie (rhuddie) wrote :

> 100 + self.unity.search('Contacts')
> 101 + label = self.unity_proxy.select_single(
> 102 + 'Label', objectName='titleLabel', text='Contacts')
>
> This is about to change because the search is no longer done in the unity main
> view. It's done on the dash which is a separate app.
> So for this test you will have to either restart the dash instead of
> restarting unity and do self.dash.search, or launch the app from the launcher
> which is work in progress.
> Any way you choose, you'll have to wait. Sorry. I'll ask for your review on
> the unity branches once they are ready, that will speed things a little and
> you will see what I'm talking about.
>
> 151 + # tap the photo icon to launch the gallery app
> 152 + self.addCleanup(os.system, 'ubuntu-app-stop gallery-app')
>
> Why is this needed? I thought that the gallery app would be killed as soon as
> the picture was selected.
>
> 157 + # wait for transition back to contacts app
> 158 + contact_editor.wait_to_stop_moving()
>
> This seems a little weird. wait_to_stop_moving waits for the flickable to stop
> flicking, right? How is that related to the picture transfer? I might just be
> getting it wrong.
>
> This looks really good. I'm eager to get it running. Thanks Richard.

Hi Leo,

Note taken to update the search function when it is landed.

The clean-up action for the gallery-app was added in case of any termination of the test whilst the gallery-app is open. Under normal circumstances it would not be needed as the gallery-app should shut down automatically, but I just added it for extra safety.

The wait_to_stop_moving() was added because there is a transition effect when you return from gallery-app to address-book-app. I saw some failures where the test was trying to proceed whilst this was happening, but using this ensured that the UI had settled down before proceeding.

Thanks for your comments. I'll be glad too to get this one finally landed!

Revision history for this message
Leo Arias (elopio) wrote :

I get it, thanks for the info.

Unmerged revisions

39. By Richard Huddie

merge trunk

38. By Richard Huddie

tidy up

37. By Richard Huddie

use contact list page get_contact_avatar_file_path()

36. By Richard Huddie

use picker screen select_photo() method

35. By Richard Huddie

Use press_photo_icon() helper method from contact editor

34. By Richard Huddie

use photos page object from gallery-app helpers

33. By Richard Huddie

Fix review comments, TODO comments added where new helper methods are required

32. By Richard Huddie

remove globals used for dbus service, no longer needed

31. By Richard Huddie

revert previous control file changes and add address-book-app-autopilot and gallery-app-autopilot dependencies

30. By Richard Huddie

add additional thumbnail url checking

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