Merge lp:~bfiller/notes-app/fix-slide-delete-left-test into lp:notes-app

Proposed by Bill Filler
Status: Rejected
Rejected by: Olivier Tilloy
Proposed branch: lp:~bfiller/notes-app/fix-slide-delete-left-test
Merge into: lp:notes-app
Diff against target: 11 lines (+1/-1)
1 file modified
tests/autopilot/notes_app/tests/test_delete.py (+1/-1)
To merge this branch: bzr merge lp:~bfiller/notes-app/fix-slide-delete-left-test
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Olivier Tilloy Needs Fixing
Review via email: mp+193171@code.launchpad.net

Commit message

fix the test_slide_to_delete_left() test by swiping the note further to the left to cause the confirm button to be shown

Description of the change

fix the test_slide_to_delete_left() test by swiping the note further to the left to cause the confirm button to be shown.

To test you have to run the following script:
phablet-config autopilot --dbus-probe enable
phablet-click-test-setup --click com.ubuntu.notes
phablet-test-run notes_app.tests.test_delete.TestDelete.test_slide_to_delete_left

See https://wiki.ubuntu.com/Touch/Testing#Running_Click_tests

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

FAILED: Continuous integration, rev:218
http://jenkins.qa.ubuntu.com/job/notes-app-ci/228/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/178
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/172
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-amd64-ci/10
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-armhf-ci/10
        deb: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-armhf-ci/10/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-i386-ci/10
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/167
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/178
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/178/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/172
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/172/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2795
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2846
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/630
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/629

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/notes-app-ci/228/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

I’ve tested on my laptop and the test still consistently fails.

After some more investigation, it appears the problem is not with the swipe gesture itself, but with committing it, i.e. clicking on the confirmation button. The tests look like this:

    self.pointing_device.drag(…) # swipe gesture
    confirm = self.main_window.get_note_delete_confirmation_button(note)
    self.pointing_device.click_object(confirm)

The issue is that the 'confirm' item is still moving when being clicked in the test, and thus we’re clicking at the wrong position, dismissing the removal instead of committing it.
If I add a time.sleep(1) after before clicking on the confirm item, the test passes (obviously this is not a proper solution, but it confirms where the problem lies).

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

FAILED: Continuous integration, rev:218
http://jenkins.qa.ubuntu.com/job/notes-app-ci/229/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/180
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/174
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-amd64-ci/11
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-armhf-ci/11
        deb: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-armhf-ci/11/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/notes-app-trusty-i386-ci/11
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/169
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/180
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/180/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/174
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/174/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2797
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2848
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/634
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/633

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/notes-app-ci/229/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

I’ve submitted https://code.launchpad.net/~osomon/notes-app/fix-swipe-to-delete-tests/+merge/193177 to fix the issue by ensuring that the confirmation button is where we expect it to be (i.e. the swipe gesture is complete) before clicking it.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Unmerged revisions

218. By Bill Filler

fix test_delete_left test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/notes_app/tests/test_delete.py'
2--- tests/autopilot/notes_app/tests/test_delete.py 2013-10-10 09:30:43 +0000
3+++ tests/autopilot/notes_app/tests/test_delete.py 2013-10-30 00:45:18 +0000
4@@ -66,7 +66,7 @@
5 x, y, w, h = note.globalRect
6 tx = x + (w - w / 8)
7 ty = y + (h / 2)
8- self.pointing_device.drag(tx, ty, w / 2, ty)
9+ self.pointing_device.drag(tx, ty, w / 8, ty)
10 confirm = self.main_window.get_note_delete_confirmation_button(note)
11 self.pointing_device.click_object(confirm)
12

Subscribers

People subscribed via source and target branches