~nskaggs/ubuntu-calendar-app/debug-ap-tests

« back to all changes in this revision

Viewing changes to tests/autopilot/calendar_app/emulators.py

  • Committer: nskaggs
  • Date: 2014-01-23 19:40:25 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20140123194025-sjub6abq3j6wywyz
further tweaks for swiping

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        except dbus.StateNotFoundError:
79
79
            return None
80
80
 
81
 
    def swipe_view(self, direction, view, x_pad=0.20):
 
81
    def swipe_view(self, direction, view, x_pad=0.15):
82
82
        """Swipe the given view to left or right.
83
83
 
84
84
        Args:
87
87
 
88
88
        """
89
89
 
90
 
        start = (-direction * x_pad) % 1
91
 
        stop = (direction * x_pad) % 1
 
90
        start = ((-direction * x_pad) % 1) / 1.5
 
91
        stop = (direction * x_pad) % 1 / 1.5
92
92
 
93
93
        y_line = view.globalRect[1] + view.globalRect[3] / 2
94
94
        x_start = view.globalRect[0] + view.globalRect[2] * start