Merge lp:~barry/gallery-app/py3autopilot into lp:gallery-app

Proposed by Barry Warsaw
Status: Rejected
Rejected by: Arthur Mello
Proposed branch: lp:~barry/gallery-app/py3autopilot
Merge into: lp:gallery-app
Diff against target: 344 lines (+25/-49)
20 files modified
debian/control (+4/-3)
debian/gallery-app-autopilot.install (+1/-1)
debian/gallery-app-autopilot.lintian-overrides (+1/-1)
tests/autopilot/CMakeLists.txt (+1/-1)
tests/autopilot/gallery_app/emulators/album_editor.py (+1/-1)
tests/autopilot/gallery_app/emulators/album_view.py (+1/-5)
tests/autopilot/gallery_app/emulators/albums_view.py (+1/-1)
tests/autopilot/gallery_app/emulators/events_view.py (+2/-1)
tests/autopilot/gallery_app/emulators/gallery_utils.py (+1/-1)
tests/autopilot/gallery_app/emulators/media_selector.py (+1/-1)
tests/autopilot/gallery_app/emulators/media_viewer.py (+0/-3)
tests/autopilot/gallery_app/emulators/photo_viewer.py (+1/-1)
tests/autopilot/gallery_app/emulators/photos_view.py (+1/-1)
tests/autopilot/gallery_app/tests/test_album_editor.py (+1/-3)
tests/autopilot/gallery_app/tests/test_album_view.py (+0/-2)
tests/autopilot/gallery_app/tests/test_albums_view.py (+1/-5)
tests/autopilot/gallery_app/tests/test_events_view.py (+0/-3)
tests/autopilot/gallery_app/tests/test_photo_viewer.py (+6/-8)
tests/autopilot/gallery_app/tests/test_photos_view.py (+0/-4)
tests/autopilot/gallery_app/tests/test_picker_mode.py (+1/-3)
To merge this branch: bzr merge lp:~barry/gallery-app/py3autopilot
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+208055@code.launchpad.net

Commit message

Port autopilot tests to Python 3.

Description of the change

Port autopilot tests to Python 3.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~barry/gallery-app/py3autopilot updated
938. By Arthur Mello

Make sure that gallery will not be able to remove media files from disk if it finds any sort of inconsistency Fixes: 1295344

939. By Arthur Mello

Make sure that videos placed out the video directory will be not displayed on devices Fixes: 1296634

940. By Bill Filler

change check for desktopMode to use platform name rather than env var

941. By PS Jenkins bot

Releasing 0.0.67+14.04.20140328-0ubuntu1

942. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

943. By Ugo Riboni

Fix album navigation, allowing to page all the way to the last page, and to close the album by paging to the cover. Fixes: 1287355

944. By Arthur Mello

Make sure that album cover will be not behind header at album edit screen Fixes: 1294291

945. By Arthur Mello

Add unittest to check if only videos on the correct path are beeing added to gallery on device

946. By Leo Arias

Properly override the toolkit toolbar autopilot helper.

947. By Arthur Mello

Add an overlay play icon over Video preview on media navigation Fixes: 1294282

948. By Leo Arias

    On the autopilot helpers to click a toolbar button, check that the toolbar is opened first.
 Fixes: 1302706

949. By Arthur Mello

Apply a similar workaround to the one suggested by Zsombor to work around bug #1296832 to temporarily replace MouseAreas within PinchAreas Fixes: 1288695

950. By Bill Filler

skip broken test until root cause can be found

951. By Ugo Riboni

fix autopilot test

952. By PS Jenkins bot

Releasing 0.0.67+14.04.20140408.1-0ubuntu1

953. By Ricardo Salveti

releasing package gallery-app version 0.0.67+14.04.20140408.1-0ubuntu2

954. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~barry/gallery-app/py3autopilot updated
955. By Arthur Mello

Make sure we do not monitor hidden directories Fixes: 907870

956. By Arthur Mello

Make gallery does not create a new album if process is canceled Fixes: 1300337

957. By Arthur Mello

Make sure gallery deletes all album content when it is requested. Fixes: 1300344

958. By Richard Huddie

A new emulator method for selecting a specific photo from the picker view. A new test is also added to use this method and then click on the Pick button.

959. By Bill Filler

disable sharing option on desktop Fixes: 1311123

960. By Arthur Mello

Change the page title so it does not show the app name. Fixes: 1312123

961. By Ugo Riboni

Show progress indicator while loading thumbnails in photo view Fixes: 1295124

962. By Arthur Mello

Fallback for date that file was created if no information about encoded date was found on video metadata Fixes: 1314632

963. By PS Jenkins bot

Releasing 0.0.67+14.10.20140501-0ubuntu1

964. By Barry Warsaw

Trunk merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Arthur Mello (artmello) wrote :

This seems to be already merged on gallery-app trunk

Unmerged revisions

964. By Barry Warsaw

Trunk merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-04-14 20:21:26 +0000
3+++ debian/control 2014-05-02 17:12:26 +0000
4@@ -15,8 +15,8 @@
5 qt5-default,
6 qtbase5-dev,
7 qtdeclarative5-dev,
8- python,
9-Standards-Version: 3.9.4
10+ python3-all,
11+Standards-Version: 3.9.5
12 # If you don't have commit rights to lp:gallery-app but need to upload
13 # packaging changes, just go ahead. The developers will notice and sync
14 # up the code again.
15@@ -49,7 +49,8 @@
16 libqt5test5,
17 ubuntu-ui-toolkit-autopilot,
18 unity8-autopilot,
19- python-pkg-resources,
20+ python3-pkg-resources,
21+ python3-autopilot
22 Description: Autopilot tests for the photo gallery for Ubuntu
23 gallery-app is a photo gallery for the Ubuntu platform. This package contains
24 autopilot tests for it.
25
26=== modified file 'debian/gallery-app-autopilot.install'
27--- debian/gallery-app-autopilot.install 2013-03-19 13:04:59 +0000
28+++ debian/gallery-app-autopilot.install 2014-05-02 17:12:26 +0000
29@@ -1,1 +1,1 @@
30-usr/lib/python*/dist-packages/gallery_app/*
31+usr/lib/python3
32
33=== modified file 'debian/gallery-app-autopilot.lintian-overrides'
34--- debian/gallery-app-autopilot.lintian-overrides 2013-03-27 16:16:52 +0000
35+++ debian/gallery-app-autopilot.lintian-overrides 2014-05-02 17:12:26 +0000
36@@ -1,1 +1,1 @@
37-gallery-app-autopilot: image-file-in-usr-lib usr/lib/python2.7/dist-packages/gallery_app/data/sample.jpg
38+gallery-app-autopilot: image-file-in-usr-lib usr/lib/python3/dist-packages/gallery_app/data/sample.jpg
39
40=== modified file 'tests/autopilot/CMakeLists.txt'
41--- tests/autopilot/CMakeLists.txt 2013-10-06 23:42:20 +0000
42+++ tests/autopilot/CMakeLists.txt 2014-05-02 17:12:26 +0000
43@@ -1,6 +1,6 @@
44 set(AUTOPILOT_DIR gallery_app)
45
46-execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
47+execute_process(COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
48 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
49
50 if(INSTALL_TESTS)
51
52=== modified file 'tests/autopilot/gallery_app/emulators/album_editor.py'
53--- tests/autopilot/gallery_app/emulators/album_editor.py 2013-12-19 10:04:32 +0000
54+++ tests/autopilot/gallery_app/emulators/album_editor.py 2014-05-02 17:12:26 +0000
55@@ -15,7 +15,7 @@
56 cover_image = self.album_cover_image()
57 # click left of the cover
58 x, y, w, h = cover_image.globalRect
59- self.pointing_device.move(x - 10, y + (h/2))
60+ self.pointing_device.move(x - 10, y + (h // 2))
61 # workaround lp:1247698 (get rid of toolbar)
62 self.pointing_device.click()
63 self.pointing_device.click()
64
65=== modified file 'tests/autopilot/gallery_app/emulators/album_view.py'
66--- tests/autopilot/gallery_app/emulators/album_view.py 2014-03-10 10:28:51 +0000
67+++ tests/autopilot/gallery_app/emulators/album_view.py 2014-05-02 17:12:26 +0000
68@@ -5,7 +5,7 @@
69 # under the terms of the GNU General Public License version 3, as published
70 # by the Free Software Foundation.
71
72-from gallery_utils import GalleryUtils
73+from gallery_app.emulators.gallery_utils import GalleryUtils
74
75
76 class AlbumView(GalleryUtils):
77@@ -24,10 +24,6 @@
78 return self.app.wait_select_single("AlbumViewer",
79 objectName="albumViewer")
80
81- def get_toolbar_add_button(self):
82- """Returns the add button of the tollbar in the events view."""
83- return self.get_toolbar_named_toolbarbutton("addButton")
84-
85 def get_first_photo(self):
86 """Returns the first photo in a newly opened album"""
87 return self.app.select_many(
88
89=== modified file 'tests/autopilot/gallery_app/emulators/albums_view.py'
90--- tests/autopilot/gallery_app/emulators/albums_view.py 2013-08-09 10:20:19 +0000
91+++ tests/autopilot/gallery_app/emulators/albums_view.py 2014-05-02 17:12:26 +0000
92@@ -5,7 +5,7 @@
93 # under the terms of the GNU General Public License version 3, as published
94 # by the Free Software Foundation.
95
96-from gallery_utils import GalleryUtils
97+from gallery_app.emulators.gallery_utils import GalleryUtils
98
99
100 class AlbumsView(GalleryUtils):
101
102=== modified file 'tests/autopilot/gallery_app/emulators/events_view.py'
103--- tests/autopilot/gallery_app/emulators/events_view.py 2014-04-01 12:05:42 +0000
104+++ tests/autopilot/gallery_app/emulators/events_view.py 2014-05-02 17:12:26 +0000
105@@ -5,7 +5,8 @@
106 # under the terms of the GNU General Public License version 3, as published
107 # by the Free Software Foundation.
108
109-from gallery_utils import GalleryUtils
110+from gallery_app.emulators.gallery_utils import GalleryUtils
111+
112
113 class EventsView(GalleryUtils):
114
115
116=== modified file 'tests/autopilot/gallery_app/emulators/gallery_utils.py'
117--- tests/autopilot/gallery_app/emulators/gallery_utils.py 2014-03-11 12:21:21 +0000
118+++ tests/autopilot/gallery_app/emulators/gallery_utils.py 2014-05-02 17:12:26 +0000
119@@ -26,7 +26,7 @@
120 while len(items) < 1 and tries > 0:
121 sleep(self.retry_delay)
122 items = self.app.select_many(object_type, **kwargs)
123- tries = tries - 1
124+ tries -= 1
125 return items
126
127 def get_qml_view(self):
128
129=== modified file 'tests/autopilot/gallery_app/emulators/media_selector.py'
130--- tests/autopilot/gallery_app/emulators/media_selector.py 2013-11-04 03:27:19 +0000
131+++ tests/autopilot/gallery_app/emulators/media_selector.py 2014-05-02 17:12:26 +0000
132@@ -5,7 +5,7 @@
133 # under the terms of the GNU General Public License version 3, as published
134 # by the Free Software Foundation.
135
136-from gallery_utils import GalleryUtils
137+from gallery_app.emulators.gallery_utils import GalleryUtils
138
139
140 class MediaSelector(GalleryUtils):
141
142=== modified file 'tests/autopilot/gallery_app/emulators/media_viewer.py'
143--- tests/autopilot/gallery_app/emulators/media_viewer.py 2013-08-26 16:03:45 +0000
144+++ tests/autopilot/gallery_app/emulators/media_viewer.py 2014-05-02 17:12:26 +0000
145@@ -11,8 +11,5 @@
146 class MediaViewer(toolkit_emulators.UbuntuUIToolkitEmulatorBase):
147 """An emulator class that makes it easy to interact with the media viewer"""
148
149- def __init__(self, *args):
150- super(MediaViewer, self).__init__(*args)
151-
152 def get_edit_spinner(self):
153 return self.select_single("ActivityIndicator", objectName="busySpinner")
154
155=== modified file 'tests/autopilot/gallery_app/emulators/photo_viewer.py'
156--- tests/autopilot/gallery_app/emulators/photo_viewer.py 2014-02-04 17:37:28 +0000
157+++ tests/autopilot/gallery_app/emulators/photo_viewer.py 2014-05-02 17:12:26 +0000
158@@ -5,7 +5,7 @@
159 # under the terms of the GNU General Public License version 3, as published
160 # by the Free Software Foundation.
161
162-from gallery_utils import GalleryUtils
163+from gallery_app.emulators.gallery_utils import GalleryUtils
164
165
166 class PhotoViewer(GalleryUtils):
167
168=== modified file 'tests/autopilot/gallery_app/emulators/photos_view.py'
169--- tests/autopilot/gallery_app/emulators/photos_view.py 2014-02-28 10:27:55 +0000
170+++ tests/autopilot/gallery_app/emulators/photos_view.py 2014-05-02 17:12:26 +0000
171@@ -5,7 +5,7 @@
172 # under the terms of the GNU General Public License version 3, as published
173 # by the Free Software Foundation.
174
175-from gallery_utils import GalleryUtils
176+from gallery_app.emulators.gallery_utils import GalleryUtils
177
178
179 class PhotosView(GalleryUtils):
180
181=== modified file 'tests/autopilot/gallery_app/tests/test_album_editor.py'
182--- tests/autopilot/gallery_app/tests/test_album_editor.py 2013-12-20 09:36:26 +0000
183+++ tests/autopilot/gallery_app/tests/test_album_editor.py 2014-05-02 17:12:26 +0000
184@@ -8,8 +8,6 @@
185
186 """Tests the album editor of the gallery app"""
187
188-from __future__ import absolute_import
189-
190 from testtools.matchers import Equals
191 from autopilot.matchers import Eventually
192
193@@ -140,7 +138,7 @@
194 # workaround lp:1247698
195 self.main_view.close_toolbar()
196 x, y, w, h = cover_image.globalRect
197- self.pointing_device.move(x + int(w / 2), y + h - int(h / 10))
198+ self.pointing_device.move(x + (w // 2), y + h - (h // 10))
199 self.pointing_device.click()
200
201 green_item = self.gallery_utils.get_cover_menu_item("Green")
202
203=== modified file 'tests/autopilot/gallery_app/tests/test_album_view.py'
204--- tests/autopilot/gallery_app/tests/test_album_view.py 2014-04-15 13:22:39 +0000
205+++ tests/autopilot/gallery_app/tests/test_album_view.py 2014-05-02 17:12:26 +0000
206@@ -8,8 +8,6 @@
207
208 """Tests the album view of the gallery app"""
209
210-from __future__ import absolute_import
211-
212 from testtools.matchers import Equals, GreaterThan, LessThan
213 from autopilot.matchers import Eventually
214
215
216=== modified file 'tests/autopilot/gallery_app/tests/test_albums_view.py'
217--- tests/autopilot/gallery_app/tests/test_albums_view.py 2014-04-11 19:45:42 +0000
218+++ tests/autopilot/gallery_app/tests/test_albums_view.py 2014-05-02 17:12:26 +0000
219@@ -8,9 +8,7 @@
220
221 """Tests the albums view of the gallery app."""
222
223-from __future__ import absolute_import
224-
225-from testtools.matchers import Equals, GreaterThan
226+from testtools.matchers import Equals
227 from autopilot.matchers import Eventually
228 from autopilot.platform import model
229
230@@ -18,7 +16,6 @@
231 from gallery_app.emulators.albums_view import AlbumsView
232 from gallery_app.emulators import album_editor
233
234-from time import sleep
235 from os import environ as env
236
237 class TestAlbumsView(GalleryTestCase):
238@@ -75,4 +72,3 @@
239 self.assertThat(cameraButton.visible, Equals(False))
240 else:
241 self.assertThat(cameraButton.visible, Equals(True))
242-
243
244=== modified file 'tests/autopilot/gallery_app/tests/test_events_view.py'
245--- tests/autopilot/gallery_app/tests/test_events_view.py 2014-04-01 12:05:42 +0000
246+++ tests/autopilot/gallery_app/tests/test_events_view.py 2014-05-02 17:12:26 +0000
247@@ -8,8 +8,6 @@
248
249 """Tests for the Gallery App"""
250
251-from __future__ import absolute_import
252-
253 from testtools.matchers import Equals, NotEquals, Is, GreaterThan
254 from autopilot.matchers import Eventually
255 from autopilot.platform import model
256@@ -150,4 +148,3 @@
257 self.assertThat(cameraButton.visible, Equals(False))
258 else:
259 self.assertThat(cameraButton.visible, Equals(True))
260-
261
262=== modified file 'tests/autopilot/gallery_app/tests/test_photo_viewer.py'
263--- tests/autopilot/gallery_app/tests/test_photo_viewer.py 2014-03-24 11:01:01 +0000
264+++ tests/autopilot/gallery_app/tests/test_photo_viewer.py 2014-05-02 17:12:26 +0000
265@@ -8,9 +8,7 @@
266
267 """Tests the Photo editor of the gallery app."""
268
269-from __future__ import absolute_import
270-
271-from testtools.matchers import Equals, NotEquals, GreaterThan, Is, Not
272+from testtools.matchers import Equals, NotEquals, GreaterThan, Is
273 from autopilot.matchers import Eventually
274
275 from gallery_app.emulators.photo_viewer import PhotoViewer
276@@ -175,8 +173,8 @@
277
278 # Slide left should move to the next image
279 x, y, w, h = list.globalRect
280- mid_y = y + h / 2
281- mid_x = x + w / 2
282+ mid_y = y + h // 2
283+ mid_x = x + w // 2
284 self.pointing_device.drag(mid_x, mid_y, x + 10, mid_y)
285
286 self.assertThat(list.moving, Eventually(Equals(False)))
287@@ -250,10 +248,10 @@
288
289 crop_corner = self.photo_viewer.get_top_left_crop_corner()
290 x, y, h, w = crop_corner.globalRect
291- x = x + w / 2
292- y = y + h / 2
293+ x = x + w // 2
294+ y = y + h // 2
295 self.pointing_device.drag(x, y,
296- x + item_width / 2, y + item_height / 2)
297+ x + item_width // 2, y + item_height // 2)
298
299 # wait for animation being finished
300 crop_overlay = self.photo_viewer.get_crop_overlay()
301
302=== modified file 'tests/autopilot/gallery_app/tests/test_photos_view.py'
303--- tests/autopilot/gallery_app/tests/test_photos_view.py 2014-04-02 14:42:19 +0000
304+++ tests/autopilot/gallery_app/tests/test_photos_view.py 2014-05-02 17:12:26 +0000
305@@ -8,8 +8,6 @@
306
307 """Tests the Photos view of the gallery app."""
308
309-from __future__ import absolute_import
310-
311 from testtools.matchers import Equals, Is
312 from testtools import skipUnless
313 from autopilot.matchers import Eventually
314@@ -18,7 +16,6 @@
315 from gallery_app.tests import GalleryTestCase
316 from gallery_app.emulators.photos_view import PhotosView
317
318-from os.path import exists
319 from os import environ as env
320 import unittest
321
322@@ -84,7 +81,6 @@
323
324 def test_delete_photo_dialog_appears(self):
325 """Selecting a photo must make the delete button clickable."""
326- number_of_photos = self.photos_view.number_of_photos()
327 self.main_view.open_toolbar().click_button("selectButton")
328 self.click_first_photo()
329 self.main_view.open_toolbar().click_button("deleteButton")
330
331=== modified file 'tests/autopilot/gallery_app/tests/test_picker_mode.py'
332--- tests/autopilot/gallery_app/tests/test_picker_mode.py 2014-04-09 10:33:45 +0000
333+++ tests/autopilot/gallery_app/tests/test_picker_mode.py 2014-05-02 17:12:26 +0000
334@@ -8,9 +8,7 @@
335
336 """Tests the Photos view of the gallery app."""
337
338-from __future__ import absolute_import
339-
340-from testtools.matchers import Equals, GreaterThan
341+from testtools.matchers import Equals
342 from autopilot.matchers import Eventually
343
344 from gallery_app.emulators.picker_screen import PickerScreen

Subscribers

People subscribed via source and target branches