~canonical-platform-qa/ubuntu-system-tests/pull_to_refresh_video_scope

« back to all changes in this revision

Viewing changes to ubuntu_system_tests/helpers/scopes/base.py

  • Committer: Omer Akram
  • Date: 2016-09-15 13:44:36 UTC
  • Revision ID: om26er@ubuntu.com-20160915134436-7vt9bwxr01u96o7b
minor changes per review

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        list_view = self.select_single('ListViewWithPageHeader',
55
55
                                       objectName='categoryListView')
56
56
        list_view.swipe_to_top()
57
 
        return list_view
58
57
 
59
58
    def pull_to_refresh(self):
60
59
        """Refresh the scope by a pull down."""
61
 
        list_view = self.swipe_to_top()
62
 
        list_view._swipe_to_middle()
 
60
        width, height = self.globalRect.w, self.globalRect.h
 
61
        self.pointing_device.drag(width / 2, height / 2, width / 2, height)
63
62
        self.wait_for_processing_to_start(silent_fail=True)
64
63
        self.wait_for_processing_to_complete()
65
64