Merge lp:~elopio/ubuntu-ui-toolkit/pullToRefresh-fixes into lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/pullToRefresh

Proposed by Leo Arias
Status: Merged
Merge reported by: Zsombor Egri
Merged at revision: not available
Proposed branch: lp:~elopio/ubuntu-ui-toolkit/pullToRefresh-fixes
Merge into: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/pullToRefresh
Diff against target: 129 lines (+33/-10)
6 files modified
tests/autopilot/ubuntuuitoolkit/__init__.py (+2/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py (+4/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py (+3/-2)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py (+21/-0)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py (+2/-1)
tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py (+1/-7)
To merge this branch: bzr merge lp:~elopio/ubuntu-ui-toolkit/pullToRefresh-fixes
Reviewer Review Type Date Requested Status
Zsombor Egri Approve
Review via email: mp+221906@code.launchpad.net

Commit message

Added the UbuntuListView11 autopilot helper. Fixed the swipe to the middle.

To post a comment you must log in.
Revision history for this message
Zsombor Egri (zsombi) wrote :

Thanks for the help!!!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/ubuntuuitoolkit/__init__.py'
--- tests/autopilot/ubuntuuitoolkit/__init__.py 2014-05-09 04:12:25 +0000
+++ tests/autopilot/ubuntuuitoolkit/__init__.py 2014-06-03 15:18:46 +0000
@@ -40,6 +40,7 @@
40 'TextField',40 'TextField',
41 'Toolbar',41 'Toolbar',
42 'ToolkitException',42 'ToolkitException',
43 'UbuntuListView11',
43 'UbuntuUIToolkitCustomProxyObjectBase',44 'UbuntuUIToolkitCustomProxyObjectBase',
44]45]
4546
@@ -70,4 +71,5 @@
70 Toolbar,71 Toolbar,
71 ToolkitException,72 ToolkitException,
72 UbuntuUIToolkitCustomProxyObjectBase,73 UbuntuUIToolkitCustomProxyObjectBase,
74 UbuntuListView11,
73)75)
7476
=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py'
--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py 2014-05-09 04:12:25 +0000
+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py 2014-06-03 15:18:46 +0000
@@ -35,6 +35,7 @@
35 'TextField',35 'TextField',
36 'Toolbar',36 'Toolbar',
37 'ToolkitException',37 'ToolkitException',
38 'UbuntuListView11',
38 'UbuntuUIToolkitCustomProxyObjectBase',39 'UbuntuUIToolkitCustomProxyObjectBase',
39]40]
4041
@@ -62,3 +63,6 @@
62from ubuntuuitoolkit._custom_proxy_objects._tabs import Tabs63from ubuntuuitoolkit._custom_proxy_objects._tabs import Tabs
63from ubuntuuitoolkit._custom_proxy_objects._textfield import TextField64from ubuntuuitoolkit._custom_proxy_objects._textfield import TextField
64from ubuntuuitoolkit._custom_proxy_objects._toolbar import Toolbar65from ubuntuuitoolkit._custom_proxy_objects._toolbar import Toolbar
66from ubuntuuitoolkit._custom_proxy_objects._ubuntulistview import (
67 UbuntuListView11
68)
6569
=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py'
--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py 2014-05-27 04:55:40 +0000
+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py 2014-06-03 15:18:46 +0000
@@ -199,7 +199,7 @@
199 bottom = _get_visible_container_bottom(containers)199 bottom = _get_visible_container_bottom(containers)
200200
201 start_y = top201 start_y = top
202 stop_y = bottom // 2202 stop_y = (self.globalRect.y + bottom) // 2
203 self._slow_drag(start_x, stop_x, start_y, stop_y)203 self._slow_drag(start_x, stop_x, start_y, stop_y)
204 self.dragging.wait_for(False)204 self.dragging.wait_for(False)
205 self.moving.wait_for(False)205 self.moving.wait_for(False)
@@ -217,13 +217,14 @@
217 bottom = _get_visible_container_bottom(containers)217 bottom = _get_visible_container_bottom(containers)
218218
219 start_y = top219 start_y = top
220 stop_y = bottom // 2220 stop_y = (self.globalRect.y + bottom) // 2
221 self.pointing_device.move(start_x, start_y)221 self.pointing_device.move(start_x, start_y)
222 self.pointing_device.press()222 self.pointing_device.press()
223 self.pointing_device.move(stop_x, stop_y)223 self.pointing_device.move(stop_x, stop_y)
224 self.pointing_device.move(start_x, start_y)224 self.pointing_device.move(start_x, start_y)
225 self.pointing_device.release()225 self.pointing_device.release()
226226
227
227class PullToRefresh(_common.UbuntuUIToolkitCustomProxyObjectBase):228class PullToRefresh(_common.UbuntuUIToolkitCustomProxyObjectBase):
228 """Autopilot helper for the PullToRefresh component."""229 """Autopilot helper for the PullToRefresh component."""
229230
230231
=== added file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py'
--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py 2014-06-03 15:18:46 +0000
@@ -0,0 +1,21 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2#
3# Copyright (C) 2014 Canonical Ltd.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation; version 3.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17from ubuntuuitoolkit._custom_proxy_objects import _qquicklistview
18
19
20class UbuntuListView11(_qquicklistview.QQuickListView):
21 """Autopilot helper for the UbuntuListView 1.1."""
022
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-05-27 13:59:18 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-06-03 15:18:46 +0000
@@ -104,7 +104,8 @@
104 names = [104 names = [
105 'navigation', 'toggles', 'buttons', 'sliders', 'textinputs',105 'navigation', 'toggles', 'buttons', 'sliders', 'textinputs',
106 'optionSelectors', 'pickers', 'progressBars', 'ubuntuShapes', 'icons',106 'optionSelectors', 'pickers', 'progressBars', 'ubuntuShapes', 'icons',
107 'labels', 'listItems', 'ubuntuListView', 'dialogs', 'popovers', 'sheets', 'animations'107 'labels', 'listItems', 'ubuntuListView', 'dialogs', 'popovers',
108 'sheets', 'animations'
108 ]109 ]
109110
110 scenarios = [111 scenarios = [
111112
=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py'
--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py 2014-06-03 12:56:24 +0000
+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py 2014-06-03 15:18:46 +0000
@@ -22,12 +22,6 @@
2222
23class UbuntuListViewTestCase(GalleryTestCase):23class UbuntuListViewTestCase(GalleryTestCase):
2424
25 def setUp(self):
26 super(UbuntuListViewTestCase, self).setUp()
27 item = "Ubuntu ListView"
28 self.loadItem(item)
29 self.checkPageHeader(item)
30
31 def _open_page(self):25 def _open_page(self):
32 list_view = self.main_view.select_single(26 list_view = self.main_view.select_single(
33 ubuntuuitoolkit.QQuickListView, objectName="widgetList")27 ubuntuuitoolkit.QQuickListView, objectName="widgetList")
@@ -43,5 +37,5 @@
43 def test_pull_to_refresh_enabled(self):37 def test_pull_to_refresh_enabled(self):
44 self._open_page()38 self._open_page()
45 listView = self.main_view.select_single(39 listView = self.main_view.select_single(
46 ubuntuuitoolkit.QQuickListView, objectName="ubuntu_listview")40 ubuntuuitoolkit.UbuntuListView11, objectName="ubuntuListView")
47 listView.pull_to_refresh()41 listView.pull_to_refresh()

Subscribers

People subscribed via source and target branches

to all changes: