Code review comment for lp:~bfiller/notes-app/fix-slide-delete-left-test

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

« Back to merge proposal