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
1=== modified file 'tests/autopilot/ubuntuuitoolkit/__init__.py'
2--- tests/autopilot/ubuntuuitoolkit/__init__.py 2014-05-09 04:12:25 +0000
3+++ tests/autopilot/ubuntuuitoolkit/__init__.py 2014-06-03 15:18:46 +0000
4@@ -40,6 +40,7 @@
5 'TextField',
6 'Toolbar',
7 'ToolkitException',
8+ 'UbuntuListView11',
9 'UbuntuUIToolkitCustomProxyObjectBase',
10 ]
11
12@@ -70,4 +71,5 @@
13 Toolbar,
14 ToolkitException,
15 UbuntuUIToolkitCustomProxyObjectBase,
16+ UbuntuListView11,
17 )
18
19=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py'
20--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py 2014-05-09 04:12:25 +0000
21+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py 2014-06-03 15:18:46 +0000
22@@ -35,6 +35,7 @@
23 'TextField',
24 'Toolbar',
25 'ToolkitException',
26+ 'UbuntuListView11',
27 'UbuntuUIToolkitCustomProxyObjectBase',
28 ]
29
30@@ -62,3 +63,6 @@
31 from ubuntuuitoolkit._custom_proxy_objects._tabs import Tabs
32 from ubuntuuitoolkit._custom_proxy_objects._textfield import TextField
33 from ubuntuuitoolkit._custom_proxy_objects._toolbar import Toolbar
34+from ubuntuuitoolkit._custom_proxy_objects._ubuntulistview import (
35+ UbuntuListView11
36+)
37
38=== modified file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py'
39--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py 2014-05-27 04:55:40 +0000
40+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py 2014-06-03 15:18:46 +0000
41@@ -199,7 +199,7 @@
42 bottom = _get_visible_container_bottom(containers)
43
44 start_y = top
45- stop_y = bottom // 2
46+ stop_y = (self.globalRect.y + bottom) // 2
47 self._slow_drag(start_x, stop_x, start_y, stop_y)
48 self.dragging.wait_for(False)
49 self.moving.wait_for(False)
50@@ -217,13 +217,14 @@
51 bottom = _get_visible_container_bottom(containers)
52
53 start_y = top
54- stop_y = bottom // 2
55+ stop_y = (self.globalRect.y + bottom) // 2
56 self.pointing_device.move(start_x, start_y)
57 self.pointing_device.press()
58 self.pointing_device.move(stop_x, stop_y)
59 self.pointing_device.move(start_x, start_y)
60 self.pointing_device.release()
61
62+
63 class PullToRefresh(_common.UbuntuUIToolkitCustomProxyObjectBase):
64 """Autopilot helper for the PullToRefresh component."""
65
66
67=== added file 'tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py'
68--- tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py 1970-01-01 00:00:00 +0000
69+++ tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py 2014-06-03 15:18:46 +0000
70@@ -0,0 +1,21 @@
71+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
72+#
73+# Copyright (C) 2014 Canonical Ltd.
74+#
75+# This program is free software; you can redistribute it and/or modify
76+# it under the terms of the GNU Lesser General Public License as published by
77+# the Free Software Foundation; version 3.
78+#
79+# This program is distributed in the hope that it will be useful,
80+# but WITHOUT ANY WARRANTY; without even the implied warranty of
81+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82+# GNU Lesser General Public License for more details.
83+#
84+# You should have received a copy of the GNU Lesser General Public License
85+# along with this program. If not, see <http://www.gnu.org/licenses/>.
86+
87+from ubuntuuitoolkit._custom_proxy_objects import _qquicklistview
88+
89+
90+class UbuntuListView11(_qquicklistview.QQuickListView):
91+ """Autopilot helper for the UbuntuListView 1.1."""
92
93=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py'
94--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-05-27 13:59:18 +0000
95+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_gallery.py 2014-06-03 15:18:46 +0000
96@@ -104,7 +104,8 @@
97 names = [
98 'navigation', 'toggles', 'buttons', 'sliders', 'textinputs',
99 'optionSelectors', 'pickers', 'progressBars', 'ubuntuShapes', 'icons',
100- 'labels', 'listItems', 'ubuntuListView', 'dialogs', 'popovers', 'sheets', 'animations'
101+ 'labels', 'listItems', 'ubuntuListView', 'dialogs', 'popovers',
102+ 'sheets', 'animations'
103 ]
104
105 scenarios = [
106
107=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py'
108--- tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py 2014-06-03 12:56:24 +0000
109+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py 2014-06-03 15:18:46 +0000
110@@ -22,12 +22,6 @@
111
112 class UbuntuListViewTestCase(GalleryTestCase):
113
114- def setUp(self):
115- super(UbuntuListViewTestCase, self).setUp()
116- item = "Ubuntu ListView"
117- self.loadItem(item)
118- self.checkPageHeader(item)
119-
120 def _open_page(self):
121 list_view = self.main_view.select_single(
122 ubuntuuitoolkit.QQuickListView, objectName="widgetList")
123@@ -43,5 +37,5 @@
124 def test_pull_to_refresh_enabled(self):
125 self._open_page()
126 listView = self.main_view.select_single(
127- ubuntuuitoolkit.QQuickListView, objectName="ubuntu_listview")
128+ ubuntuuitoolkit.UbuntuListView11, objectName="ubuntuListView")
129 listView.pull_to_refresh()

Subscribers

People subscribed via source and target branches

to all changes: