Merge lp:~schwann/gallery-app/gallery-uitk-emulators into lp:gallery-app
- gallery-uitk-emulators
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Günter Schwann |
Approved revision: | 797 |
Merged at revision: | 798 |
Proposed branch: | lp:~schwann/gallery-app/gallery-uitk-emulators |
Merge into: | lp:gallery-app |
Diff against target: |
508 lines (+77/-120) 12 files modified
debian/control (+1/-0) rc/qml/MainScreen.qml (+1/-0) tests/autopilot/gallery_app/emulators/events_view.py (+0/-28) tests/autopilot/gallery_app/emulators/main_screen.py (+12/-0) tests/autopilot/gallery_app/tests/__init__.py (+12/-20) tests/autopilot/gallery_app/tests/test_album_editor.py (+1/-1) tests/autopilot/gallery_app/tests/test_album_view.py (+3/-3) tests/autopilot/gallery_app/tests/test_albums_view.py (+1/-1) tests/autopilot/gallery_app/tests/test_events_view.py (+27/-33) tests/autopilot/gallery_app/tests/test_photo_viewer.py (+18/-26) tests/autopilot/gallery_app/tests/test_photos_view.py (+1/-5) tests/autopilot/gallery_app/tests/test_picker_mode.py (+0/-3) |
To merge this branch: | bzr merge lp:~schwann/gallery-app/gallery-uitk-emulators |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Olivier Tilloy | Approve | ||
Omer Akram | Pending | ||
Review via email: mp+178330@code.launchpad.net |
Commit message
Start to use the UITK emulators
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:793
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:793
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:793
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:793
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:794
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
298 + # TODO: find a better way to wait for dialog being closed
299 + sleep(1)
When the dialog is closed, it is being destroyed, right? So something like that should work (not tested):
self.
Olivier Tilloy (osomon) wrote : | # |
265 + # TODO: test to be in select mode
Testing the value of organicEventVie
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:795
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
Output of pyflakes on this branch:
tests/autopilot
tests/autopilot
tests/autopilot
tests/autopilot
tests/autopilot
tests/autopilot
tests/autopilot
Not all of those warnings were introduced by changes in this branch, but at least a couple of them were, so they should be addressed. And if you choose to address them all here, I won’t mind.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:796
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:797
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:797
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
> 797. By Günter Schwann 1 hour ago
> Fix test
This fix is suspicious. It works but I don’t really understand why. Can you please try to fix it in another way (it’s ok if you do that in a separate MR, let’s get this one merged for now).
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:797
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2013-07-30 22:58:47 +0000 |
3 | +++ debian/control 2013-08-08 12:38:17 +0000 |
4 | @@ -44,6 +44,7 @@ |
5 | gallery-app (>= ${source:Version}), |
6 | libautopilot-qt, |
7 | libqt5test5, |
8 | + ubuntu-ui-toolkit-autopilot, |
9 | Description: Autopilot tests for the photo gallery for Ubuntu |
10 | gallery-app is a photo gallery for the Ubuntu platform. This package contains |
11 | autopilot tests for it. |
12 | |
13 | === modified file 'rc/qml/MainScreen.qml' |
14 | --- rc/qml/MainScreen.qml 2013-06-28 17:43:13 +0000 |
15 | +++ rc/qml/MainScreen.qml 2013-08-08 12:38:17 +0000 |
16 | @@ -54,6 +54,7 @@ |
17 | } |
18 | |
19 | Tab { |
20 | + objectName: "albumsTab" |
21 | title: i18n.tr("Albums") |
22 | page: Loader { |
23 | id: albumsCheckerboardLoader |
24 | |
25 | === removed file 'tests/autopilot/gallery_app/emulators/events_view.py' |
26 | --- tests/autopilot/gallery_app/emulators/events_view.py 2013-07-04 08:37:56 +0000 |
27 | +++ tests/autopilot/gallery_app/emulators/events_view.py 1970-01-01 00:00:00 +0000 |
28 | @@ -1,28 +0,0 @@ |
29 | -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
30 | -# Copyright 2012 Canonical |
31 | -# |
32 | -# This program is free software: you can redistribute it and/or modify it |
33 | -# under the terms of the GNU General Public License version 3, as published |
34 | -# by the Free Software Foundation. |
35 | - |
36 | -from gallery_utils import GalleryUtils |
37 | - |
38 | - |
39 | -class EventsView(GalleryUtils): |
40 | - """An emulator class that makes it easy to interact with the event view of |
41 | - gallery.""" |
42 | - |
43 | - def __init__(self, app): |
44 | - self.app = app |
45 | - |
46 | - def get_toolbar_camera_button(self): |
47 | - """Returns the camera button of the toolbar in the event view""" |
48 | - return self.get_toolbar_named_toolbarbutton("cameraButton") |
49 | - |
50 | - def get_toolbar_select_button(self): |
51 | - """Returns the select button of the toolbar in the event view""" |
52 | - return self.get_toolbar_named_toolbarbutton("selectButton") |
53 | - |
54 | - def get_toolbar_delete_button(self): |
55 | - """Returns the delete button of the toolbar in the event view""" |
56 | - return self.get_toolbar_named_toolbarbutton("deleteButton") |
57 | |
58 | === added file 'tests/autopilot/gallery_app/emulators/main_screen.py' |
59 | --- tests/autopilot/gallery_app/emulators/main_screen.py 1970-01-01 00:00:00 +0000 |
60 | +++ tests/autopilot/gallery_app/emulators/main_screen.py 2013-08-08 12:38:17 +0000 |
61 | @@ -0,0 +1,12 @@ |
62 | +# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
63 | +# Copyright 2013 Canonical |
64 | +# |
65 | +# This program is free software: you can redistribute it and/or modify it |
66 | +# under the terms of the GNU General Public License version 3, as published |
67 | +# by the Free Software Foundation. |
68 | + |
69 | +from ubuntuuitoolkit import emulators as toolkit_emulators |
70 | + |
71 | + |
72 | +class MainScreen(toolkit_emulators.MainView): |
73 | + """An emulator class that makes it easy to interact with the gallery app""" |
74 | |
75 | === modified file 'tests/autopilot/gallery_app/tests/__init__.py' |
76 | --- tests/autopilot/gallery_app/tests/__init__.py 2013-07-09 05:21:41 +0000 |
77 | +++ tests/autopilot/gallery_app/tests/__init__.py 2013-08-08 12:38:17 +0000 |
78 | @@ -16,6 +16,8 @@ |
79 | from autopilot.testcase import AutopilotTestCase |
80 | from testtools.matchers import Equals, GreaterThan |
81 | |
82 | +from ubuntuuitoolkit import emulators as toolkit_emulators |
83 | +from gallery_app.emulators import main_screen |
84 | from gallery_app.emulators.gallery_utils import GalleryUtils |
85 | |
86 | from time import sleep |
87 | @@ -51,6 +53,10 @@ |
88 | def gallery_utils(self): |
89 | return GalleryUtils(self.app) |
90 | |
91 | + @property |
92 | + def main_view(self): |
93 | + return self.app.select_single("MainScreen") |
94 | + |
95 | def setUp(self): |
96 | self.pointing_device = Pointer(self.input_device_class.create()) |
97 | super(GalleryTestCase, self).setUp() |
98 | @@ -93,14 +99,16 @@ |
99 | self.ARGS.append(self.sample_destination_dir) |
100 | self.app = self.launch_test_application( |
101 | self.local_location, |
102 | - *self.ARGS) |
103 | + *self.ARGS, |
104 | + emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase) |
105 | |
106 | def launch_test_installed(self): |
107 | if model() == 'Desktop': |
108 | self.ARGS.append(self.sample_destination_dir) |
109 | self.app = self.launch_test_application( |
110 | "gallery-app", |
111 | - *self.ARGS) |
112 | + *self.ARGS, |
113 | + emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase) |
114 | else: |
115 | self.ARGS.append("--desktop_file_hint=" |
116 | "/usr/share/applications/gallery-app.desktop") |
117 | @@ -108,7 +116,8 @@ |
118 | self.app = self.launch_test_application( |
119 | "gallery-app", |
120 | *self.ARGS, |
121 | - app_type='qt') |
122 | + app_type='qt', |
123 | + emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase) |
124 | |
125 | def ui_update(self): |
126 | """ Gives the program the time to update the UI""" |
127 | @@ -134,23 +143,6 @@ |
128 | sleep(1) |
129 | self.pointing_device.release() |
130 | |
131 | - def reveal_toolbar(self): |
132 | - toolbar = self.gallery_utils.get_toolbar() |
133 | - self.assertThat(toolbar.animating, Eventually(Equals(False))) |
134 | - |
135 | - if toolbar.active: |
136 | - # Toolbar already open |
137 | - return |
138 | - |
139 | - main_view = self.gallery_utils.get_qml_view() |
140 | - x, y, w, h = toolbar.globalRect |
141 | - x_line = main_view.x + main_view.width * 0.5 |
142 | - start_y = main_view.y + main_view.height - 1 |
143 | - stop_y = start_y - 2 * h |
144 | - |
145 | - self.pointing_device.drag(x_line, start_y, x_line, stop_y) |
146 | - self.assertThat(toolbar.state, Eventually(Equals("spread"))) |
147 | - |
148 | def ensure_at_least_one_event(self): |
149 | """The event view has to have at least one event |
150 | In case gallery is not yet fully loaded wait a while and test again""" |
151 | |
152 | === modified file 'tests/autopilot/gallery_app/tests/test_album_editor.py' |
153 | --- tests/autopilot/gallery_app/tests/test_album_editor.py 2013-06-26 09:02:33 +0000 |
154 | +++ tests/autopilot/gallery_app/tests/test_album_editor.py 2013-08-08 12:38:17 +0000 |
155 | @@ -125,7 +125,7 @@ |
156 | self.open_first_album() |
157 | num_photos_start = self.album_view.number_of_photos() |
158 | self.assertThat(num_photos_start, Equals(1)) |
159 | - self.reveal_toolbar() |
160 | + self.main_view.open_toolbar() |
161 | back = self.album_view.get_toolbar_back_icon() |
162 | self.click_item(back) |
163 | self.ensure_album_viewer_is_fully_closed() |
164 | |
165 | === modified file 'tests/autopilot/gallery_app/tests/test_album_view.py' |
166 | --- tests/autopilot/gallery_app/tests/test_album_view.py 2013-06-26 09:02:33 +0000 |
167 | +++ tests/autopilot/gallery_app/tests/test_album_view.py 2013-08-08 12:38:17 +0000 |
168 | @@ -61,7 +61,7 @@ |
169 | self.assertThat(num_photos_start, Equals(1)) |
170 | |
171 | # open media selector but cancel |
172 | - self.reveal_toolbar() |
173 | + self.main_view.open_toolbar() |
174 | add_button = self.album_view.get_toolbar_add_button() |
175 | self.click_item(add_button) |
176 | self.ensure_media_selector_is_fully_open() |
177 | @@ -74,7 +74,7 @@ |
178 | self.assertThat(num_photos, Equals(num_photos_start)) |
179 | |
180 | # open media selector and add a photo |
181 | - self.reveal_toolbar() |
182 | + self.main_view.open_toolbar() |
183 | add_button = self.album_view.get_toolbar_add_button() |
184 | self.click_item(add_button) |
185 | self.ensure_media_selector_is_fully_open() |
186 | @@ -89,7 +89,7 @@ |
187 | Eventually(Equals(num_photos_start + 1))) |
188 | |
189 | def test_add_photo_to_new_album(self): |
190 | - self.reveal_toolbar() |
191 | + self.main_view.open_toolbar() |
192 | add_button = self.albums_view.get_toolbar_add_button() |
193 | self.click_item(add_button) |
194 | self.ui_update() |
195 | |
196 | === modified file 'tests/autopilot/gallery_app/tests/test_albums_view.py' |
197 | --- tests/autopilot/gallery_app/tests/test_albums_view.py 2013-06-26 08:59:08 +0000 |
198 | +++ tests/autopilot/gallery_app/tests/test_albums_view.py 2013-08-08 12:38:17 +0000 |
199 | @@ -43,7 +43,7 @@ |
200 | 2""" |
201 | self.compare_number_of_albums(1) |
202 | |
203 | - self.reveal_toolbar() |
204 | + self.main_view.open_toolbar() |
205 | add_button = self.albums_view.get_toolbar_add_button() |
206 | self.click_item(add_button) |
207 | |
208 | |
209 | === modified file 'tests/autopilot/gallery_app/tests/test_events_view.py' |
210 | --- tests/autopilot/gallery_app/tests/test_events_view.py 2013-07-04 08:37:56 +0000 |
211 | +++ tests/autopilot/gallery_app/tests/test_events_view.py 2013-08-08 12:38:17 +0000 |
212 | @@ -10,10 +10,9 @@ |
213 | |
214 | from __future__ import absolute_import |
215 | |
216 | -from testtools.matchers import Equals |
217 | +from testtools.matchers import Equals, Is |
218 | from autopilot.matchers import Eventually |
219 | |
220 | -from gallery_app.emulators.events_view import EventsView |
221 | from gallery_app.tests import GalleryTestCase |
222 | |
223 | from os.path import exists |
224 | @@ -22,10 +21,6 @@ |
225 | class TestEventsView(GalleryTestCase): |
226 | """Tests the main gallery features""" |
227 | |
228 | - @property |
229 | - def events_view(self): |
230 | - return EventsView(self.app) |
231 | - |
232 | def setUp(self): |
233 | self.ARGS = [] |
234 | # This is needed to wait for the application to start. |
235 | @@ -35,16 +30,15 @@ |
236 | def tearDown(self): |
237 | super(TestEventsView, self).tearDown() |
238 | |
239 | + def get_events_view(self): |
240 | + return self.gallery_utils.select_single_retry("EventsOverview", |
241 | + objectName="organicEventView") |
242 | + |
243 | def enable_select_mode(self): |
244 | - self.reveal_toolbar() |
245 | - self.click_select_icon() |
246 | - |
247 | - def click_select_icon(self): |
248 | - select_icon = self.events_view.get_toolbar_select_button() |
249 | - self.click_item(select_icon) |
250 | + self.main_view.open_toolbar().click_button("selectButton") |
251 | |
252 | def click_first_photo(self): |
253 | - first_photo = self.events_view.get_first_image_in_event_view() |
254 | + first_photo = self.gallery_utils.get_first_image_in_event_view() |
255 | self.click_item(first_photo) |
256 | |
257 | def get_delete_dialog(self): |
258 | @@ -52,51 +46,51 @@ |
259 | self.assertThat(delete_dialog.opacity, Eventually(Equals(1))) |
260 | return delete_dialog |
261 | |
262 | - def click_delete_action(self): |
263 | - trash_button = self.events_view.get_toolbar_delete_button() |
264 | - self.click_item(trash_button) |
265 | - |
266 | def test_select_button_cancel(self): |
267 | """Clicking the cancel button after clicking the select button must |
268 | hide the toolbar automatically.""" |
269 | + events_view = self.get_events_view() |
270 | + self.assertFalse(events_view.inSelectionMode) |
271 | + |
272 | self.enable_select_mode() |
273 | + self.assertTrue(events_view.inSelectionMode) |
274 | |
275 | - cancel_icon = self.events_view.get_toolbar_cancel_icon() |
276 | + cancel_icon = self.gallery_utils.get_toolbar_cancel_icon() |
277 | self.click_item(cancel_icon) |
278 | |
279 | - toolbar = self.events_view.get_toolbar() |
280 | - self.assertThat(toolbar.active, Eventually(Equals(False))) |
281 | + toolbar = self.main_view.get_toolbar() |
282 | + self.assertThat(toolbar.opened, Eventually(Equals(False))) |
283 | + self.assertFalse(events_view.inSelectionMode) |
284 | |
285 | def test_delete_a_photo(self): |
286 | """Selecting a photo must make the delete button clickable.""" |
287 | - number_of_photos = self.events_view.number_of_photos_in_events() |
288 | + number_of_photos = self.gallery_utils.number_of_photos_in_events() |
289 | self.enable_select_mode() |
290 | self.click_first_photo() |
291 | - self.click_delete_action() |
292 | - |
293 | - delete_dialog = self.get_delete_dialog() |
294 | - |
295 | - cancel_item = self.events_view.get_delete_dialog_cancel_button() |
296 | + self.main_view.open_toolbar().click_button("deleteButton") |
297 | + |
298 | + cancel_item = self.gallery_utils.get_delete_dialog_cancel_button() |
299 | self.click_item(cancel_item) |
300 | |
301 | self.assertThat(lambda: exists(self.sample_file), |
302 | Eventually(Equals(True))) |
303 | |
304 | - new_number_of_photos = self.events_view.number_of_photos_in_events() |
305 | + new_number_of_photos = self.gallery_utils.number_of_photos_in_events() |
306 | self.assertThat(new_number_of_photos, Equals(number_of_photos)) |
307 | |
308 | - self.click_delete_action() |
309 | - |
310 | - delete_dialog = self.get_delete_dialog() |
311 | - |
312 | - delete_item = self.events_view.get_delete_dialog_delete_button() |
313 | + self.assertThat(lambda: self.gallery_utils.get_delete_dialog(), |
314 | + Eventually(Is(None))) |
315 | + |
316 | + self.main_view.open_toolbar().click_button("deleteButton") |
317 | + |
318 | + delete_item = self.gallery_utils.get_delete_dialog_delete_button() |
319 | self.click_item(delete_item) |
320 | |
321 | self.assertThat(lambda: exists(self.sample_file), |
322 | Eventually(Equals(False))) |
323 | |
324 | self.ui_update() |
325 | - new_number_of_photos = self.events_view.number_of_photos_in_events() |
326 | + new_number_of_photos = self.gallery_utils.number_of_photos_in_events() |
327 | self.assertThat(new_number_of_photos, Equals(number_of_photos - 1)) |
328 | |
329 | def test_adding_a_video(self): |
330 | |
331 | === modified file 'tests/autopilot/gallery_app/tests/test_photo_viewer.py' |
332 | --- tests/autopilot/gallery_app/tests/test_photo_viewer.py 2013-07-04 12:03:51 +0000 |
333 | +++ tests/autopilot/gallery_app/tests/test_photo_viewer.py 2013-08-08 12:38:17 +0000 |
334 | @@ -34,7 +34,7 @@ |
335 | self.ARGS = [] |
336 | super(TestPhotoViewerBase, self).setUp() |
337 | self.open_first_photo() |
338 | - self.reveal_toolbar() |
339 | + self.main_view.open_toolbar() |
340 | |
341 | def open_first_photo(self): |
342 | self.assertThat(lambda: self.photo_viewer.number_of_photos_in_events(), |
343 | @@ -75,32 +75,26 @@ |
344 | self.pointing_device.move_to_object(trash_button) |
345 | self.pointing_device.click() |
346 | |
347 | - delete_dialog = self.get_delete_dialog() |
348 | - |
349 | cancel_item = self.photo_viewer.get_delete_popover_cancel_item() |
350 | self.click_item(cancel_item) |
351 | |
352 | self.assertThat(lambda: exists(self.sample_file), |
353 | Eventually(Equals(True))) |
354 | |
355 | - self.reveal_toolbar() |
356 | + self.main_view.open_toolbar() |
357 | |
358 | self.pointing_device.move_to_object(trash_button) |
359 | self.pointing_device.click() |
360 | |
361 | - delete_dialog = self.get_delete_dialog() |
362 | - |
363 | delete_item = self.photo_viewer.get_delete_popover_delete_item() |
364 | self.click_item(delete_item) |
365 | |
366 | self.assertThat(lambda: exists(self.sample_file), |
367 | Eventually(Equals(False))) |
368 | |
369 | - self.reveal_toolbar() |
370 | + self.main_view.open_toolbar() |
371 | self.pointing_device.click_object(trash_button) |
372 | |
373 | - delete_dialog = self.get_delete_dialog() |
374 | - |
375 | delete_item = self.photo_viewer.get_delete_popover_delete_item() |
376 | self.click_item(delete_item) |
377 | |
378 | @@ -240,7 +234,7 @@ |
379 | is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight |
380 | self.assertThat(is_landscape, Equals(False)) |
381 | |
382 | - self.reveal_toolbar() |
383 | + self.main_view.open_toolbar() |
384 | self.click_edit_button() |
385 | self.click_undo_item() |
386 | |
387 | @@ -249,7 +243,7 @@ |
388 | is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight |
389 | self.assertThat(is_landscape, Equals(True)) |
390 | |
391 | - self.reveal_toolbar() |
392 | + self.main_view.open_toolbar() |
393 | self.click_edit_button() |
394 | self.click_redo_item() |
395 | |
396 | @@ -258,10 +252,10 @@ |
397 | is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight |
398 | self.assertThat(is_landscape, Equals(False)) |
399 | |
400 | - self.reveal_toolbar() |
401 | + self.main_view.open_toolbar() |
402 | self.click_edit_button() |
403 | self.click_rotate_item() |
404 | - self.reveal_toolbar() |
405 | + self.main_view.open_toolbar() |
406 | self.click_edit_button() |
407 | self.click_revert_item() |
408 | |
409 | @@ -287,7 +281,7 @@ |
410 | |
411 | self.click_rotate_item() |
412 | |
413 | - self.reveal_toolbar() |
414 | + self.main_view.open_toolbar() |
415 | self.click_edit_button() |
416 | undo_item = self.photo_viewer.get_undo_menu_item() |
417 | redo_item = self.photo_viewer.get_redo_menu_item() |
418 | @@ -299,7 +293,7 @@ |
419 | |
420 | self.click_undo_item() |
421 | |
422 | - self.reveal_toolbar() |
423 | + self.main_view.open_toolbar() |
424 | self.click_edit_button() |
425 | undo_item = self.photo_viewer.get_undo_menu_item() |
426 | redo_item = self.photo_viewer.get_redo_menu_item() |
427 | @@ -311,7 +305,7 @@ |
428 | |
429 | self.click_redo_item() |
430 | |
431 | - self.reveal_toolbar() |
432 | + self.main_view.open_toolbar() |
433 | self.click_edit_button() |
434 | undo_item = self.photo_viewer.get_undo_menu_item() |
435 | redo_item = self.photo_viewer.get_redo_menu_item() |
436 | @@ -323,7 +317,7 @@ |
437 | |
438 | self.click_revert_item() |
439 | |
440 | - self.reveal_toolbar() |
441 | + self.main_view.open_toolbar() |
442 | self.click_edit_button() |
443 | undo_item = self.photo_viewer.get_undo_menu_item() |
444 | redo_item = self.photo_viewer.get_redo_menu_item() |
445 | @@ -333,12 +327,10 @@ |
446 | self.assertThat(redo_item.enabled, Eventually(Equals(False))) |
447 | self.assertThat(revert_item.enabled, Eventually(Equals(False))) |
448 | |
449 | - # disabled the test, as with the current implementation the UI is |
450 | - # blocked. This causes troubles on jenkins |
451 | - #self.click_enhance_item() |
452 | - |
453 | - #self.reveal_toolbar() |
454 | - #self.click_edit_button() |
455 | - |
456 | - #revert_item = self.photo_viewer.get_revert_menu_item() |
457 | - #self.assertThat(lambda: revert_item.enabled, Eventually(Equals(True))) |
458 | + self.click_enhance_item() |
459 | + |
460 | + self.main_view.open_toolbar() |
461 | + self.click_edit_button() |
462 | + |
463 | + revert_item = self.photo_viewer.get_revert_menu_item() |
464 | + self.assertThat(lambda: revert_item.enabled, Eventually(Equals(True))) |
465 | |
466 | === modified file 'tests/autopilot/gallery_app/tests/test_photos_view.py' |
467 | --- tests/autopilot/gallery_app/tests/test_photos_view.py 2013-07-02 08:47:23 +0000 |
468 | +++ tests/autopilot/gallery_app/tests/test_photos_view.py 2013-08-08 12:38:17 +0000 |
469 | @@ -45,7 +45,7 @@ |
470 | self.ensure_tabs_dont_move() |
471 | |
472 | def enable_select_mode(self): |
473 | - self.reveal_toolbar() |
474 | + self.main_view.open_toolbar() |
475 | self.click_select_icon() |
476 | |
477 | def click_select_icon(self): |
478 | @@ -88,8 +88,6 @@ |
479 | self.click_first_photo() |
480 | self.click_delete_action() |
481 | |
482 | - delete_dialog = self.get_delete_dialog() |
483 | - |
484 | cancel_item = self.photos_view.get_delete_dialog_cancel_button() |
485 | self.click_item(cancel_item) |
486 | |
487 | @@ -101,8 +99,6 @@ |
488 | |
489 | self.click_delete_action() |
490 | |
491 | - delete_dialog = self.get_delete_dialog() |
492 | - |
493 | delete_item = self.photos_view.get_delete_dialog_delete_button() |
494 | self.click_item(delete_item) |
495 | |
496 | |
497 | === modified file 'tests/autopilot/gallery_app/tests/test_picker_mode.py' |
498 | --- tests/autopilot/gallery_app/tests/test_picker_mode.py 2013-06-26 08:59:08 +0000 |
499 | +++ tests/autopilot/gallery_app/tests/test_picker_mode.py 2013-08-08 12:38:17 +0000 |
500 | @@ -16,9 +16,6 @@ |
501 | from gallery_app.emulators.picker_mode import PickerMode |
502 | from gallery_app.tests import GalleryTestCase |
503 | |
504 | -from os.path import exists |
505 | -from time import sleep |
506 | - |
507 | |
508 | class TestPickerMode(GalleryTestCase): |
509 |
FAILED: Continuous integration, rev:793 jenkins. qa.ubuntu. com/job/ gallery- app-ci/ 378/ jenkins. qa.ubuntu. com/job/ gallery- app-saucy- amd64-ci/ 188 jenkins. qa.ubuntu. com/job/ gallery- app-saucy- armhf-ci/ 188 jenkins. qa.ubuntu. com/job/ gallery- app-saucy- armhf-ci/ 188/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ gallery- app-saucy- i386-ci/ 188 jenkins. qa.ubuntu. com/job/ generic- mediumtests- saucy/1848 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy/1853 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- saucy/1853/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- saucy/1580
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ gallery- app-ci/ 378/rebuild
http://