Merge lp://qastaging/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view into lp://qastaging/gallery-app

Proposed by Chris Gagnon
Status: Needs review
Proposed branch: lp://qastaging/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view
Merge into: lp://qastaging/gallery-app
Diff against target: 213 lines (+48/-28)
5 files modified
tests/autopilot/gallery_app/emulators/album_view.py (+31/-2)
tests/autopilot/gallery_app/emulators/toolbar.py (+5/-1)
tests/autopilot/gallery_app/tests/__init__.py (+0/-2)
tests/autopilot/gallery_app/tests/test_album_editor.py (+11/-18)
tests/autopilot/gallery_app/tests/test_album_view.py (+1/-5)
To merge this branch: bzr merge lp://qastaging/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view
Reviewer Review Type Date Requested Status
Leo Arias (community) code review Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Arthur Mello Pending
Ubuntu Phablet Team Pending
Review via email: mp+220807@code.qastaging.launchpad.net

Commit message

fix some autopilot tests that are failing or have sleeps in them

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:987
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/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view/+merge/220807/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/gallery-app-ci/847/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-amd64-ci/22
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/22
        deb: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/22/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-i386-ci/22
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-utopic-touch/43
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/396
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-runner-mako/194
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-click-builder-utopic-armhf/60
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/7592
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/348
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/526
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/526/artifact/work/output/*zip*/output.zip

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

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

FAILED: Continuous integration, rev:987
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/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view/+merge/220807/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/gallery-app-ci/848/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-amd64-ci/23
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/23
        deb: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/23/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-i386-ci/23
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-utopic-touch/44
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/398
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-runner-mako/195
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-click-builder-utopic-armhf/61
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/7594
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/350
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/528
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/528/artifact/work/output/*zip*/output.zip

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

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

FAILED: Continuous integration, rev:987
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/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view/+merge/220807/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/gallery-app-ci/849/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-amd64-ci/24
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/24
        deb: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/24/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-i386-ci/24
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-utopic-touch/45
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/399
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-runner-mako/196
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-click-builder-utopic-armhf/62
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/7595
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/351
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/529
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/529/artifact/work/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
988. By Chris Gagnon

fix add photo to album

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

FAILED: Continuous integration, rev:988
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/~chris.gagnon/gallery-app/autopilot-fix-first-photo-in-album-view/+merge/220807/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/gallery-app-ci/850/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-amd64-ci/25
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/25
        deb: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-armhf-ci/25/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/gallery-app-utopic-i386-ci/25
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-utopic-touch/46
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/401
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-click-autopilot-runner-mako/197
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-click-builder-utopic-armhf/65
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/7671
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/353
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/536
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/536/artifact/work/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

This passes locally, but might need a new click package to pass ci.

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

21 + first_photo = None
22 + for photo in photos:
23 + if first_photo is None:
24 + first_photo = photo
25 + elif(
26 + photo.globalRect.x < first_photo.globalRect.x and
27 + photo.globalRect.y < first_photo.globalRect.y
28 + ):
29 + first_photo = photo
30 + return first_photo

I think that you can use this instead:

photos = sorted(photos, key=lambda photo: (photo.globalRect.y, photo.globalRect.x))
return photos[0]

19 + photos = self.app.select_many(
20 + "FramePortrait", visible=True, isLoaded=True)

45 + self.app.select_many(
46 + "FramePortrait",
47 + visible=True,
48 + isLoaded=True)

You can make that a method called _get_loaded_frame_portraits.

review: Needs Fixing (code review)

Unmerged revisions

988. By Chris Gagnon

fix add photo to album

987. By Chris Gagnon

wait for button in toolbar to be visible, instead of using sleep

986. By Chris Gagnon

fix sleep

985. By Chris Gagnon

remove sleeps, refactor first photo

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