Merge lp:~schwann/gallery-app/gallery-uitk-emulators into lp:gallery-app

Proposed by Günter Schwann
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
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

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)
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: Approve (continuous-integration)
Revision history for this message
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.assertThat(lambda: self.get_delete_dialog(), Eventually(Is(None)))

Revision history for this message
Olivier Tilloy (osomon) wrote :

265 + # TODO: test to be in select mode

Testing the value of organicEventView.inSelectionMode should do the trick, no?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Output of pyflakes on this branch:

tests/autopilot/gallery_app/tests/test_photos_view.py:104: local variable 'delete_dialog' is assigned to but never used
tests/autopilot/gallery_app/tests/test_events_view.py:19: 'sleep' imported but unused
tests/autopilot/gallery_app/tests/test_events_view.py:89: local variable 'delete_dialog' is assigned to but never used
tests/autopilot/gallery_app/tests/__init__.py:20: 'main_screen' imported but unused
tests/autopilot/gallery_app/tests/test_photo_viewer.py:102: local variable 'delete_dialog' is assigned to but never used
tests/autopilot/gallery_app/tests/test_picker_mode.py:19: 'exists' imported but unused
tests/autopilot/gallery_app/tests/test_picker_mode.py:20: 'sleep' imported but unused

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.

review: Needs Fixing
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: Approve (continuous-integration)
Revision history for this message
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).

review: Approve
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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2013-07-30 22:58:47 +0000
+++ debian/control 2013-08-08 12:38:17 +0000
@@ -44,6 +44,7 @@
44 gallery-app (>= ${source:Version}),44 gallery-app (>= ${source:Version}),
45 libautopilot-qt,45 libautopilot-qt,
46 libqt5test5,46 libqt5test5,
47 ubuntu-ui-toolkit-autopilot,
47Description: Autopilot tests for the photo gallery for Ubuntu48Description: Autopilot tests for the photo gallery for Ubuntu
48 gallery-app is a photo gallery for the Ubuntu platform. This package contains49 gallery-app is a photo gallery for the Ubuntu platform. This package contains
49 autopilot tests for it.50 autopilot tests for it.
5051
=== modified file 'rc/qml/MainScreen.qml'
--- rc/qml/MainScreen.qml 2013-06-28 17:43:13 +0000
+++ rc/qml/MainScreen.qml 2013-08-08 12:38:17 +0000
@@ -54,6 +54,7 @@
54 }54 }
5555
56 Tab {56 Tab {
57 objectName: "albumsTab"
57 title: i18n.tr("Albums")58 title: i18n.tr("Albums")
58 page: Loader {59 page: Loader {
59 id: albumsCheckerboardLoader60 id: albumsCheckerboardLoader
6061
=== removed file 'tests/autopilot/gallery_app/emulators/events_view.py'
--- tests/autopilot/gallery_app/emulators/events_view.py 2013-07-04 08:37:56 +0000
+++ tests/autopilot/gallery_app/emulators/events_view.py 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2# Copyright 2012 Canonical
3#
4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published
6# by the Free Software Foundation.
7
8from gallery_utils import GalleryUtils
9
10
11class EventsView(GalleryUtils):
12 """An emulator class that makes it easy to interact with the event view of
13 gallery."""
14
15 def __init__(self, app):
16 self.app = app
17
18 def get_toolbar_camera_button(self):
19 """Returns the camera button of the toolbar in the event view"""
20 return self.get_toolbar_named_toolbarbutton("cameraButton")
21
22 def get_toolbar_select_button(self):
23 """Returns the select button of the toolbar in the event view"""
24 return self.get_toolbar_named_toolbarbutton("selectButton")
25
26 def get_toolbar_delete_button(self):
27 """Returns the delete button of the toolbar in the event view"""
28 return self.get_toolbar_named_toolbarbutton("deleteButton")
290
=== added file 'tests/autopilot/gallery_app/emulators/main_screen.py'
--- tests/autopilot/gallery_app/emulators/main_screen.py 1970-01-01 00:00:00 +0000
+++ tests/autopilot/gallery_app/emulators/main_screen.py 2013-08-08 12:38:17 +0000
@@ -0,0 +1,12 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2# Copyright 2013 Canonical
3#
4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU General Public License version 3, as published
6# by the Free Software Foundation.
7
8from ubuntuuitoolkit import emulators as toolkit_emulators
9
10
11class MainScreen(toolkit_emulators.MainView):
12 """An emulator class that makes it easy to interact with the gallery app"""
013
=== modified file 'tests/autopilot/gallery_app/tests/__init__.py'
--- tests/autopilot/gallery_app/tests/__init__.py 2013-07-09 05:21:41 +0000
+++ tests/autopilot/gallery_app/tests/__init__.py 2013-08-08 12:38:17 +0000
@@ -16,6 +16,8 @@
16from autopilot.testcase import AutopilotTestCase16from autopilot.testcase import AutopilotTestCase
17from testtools.matchers import Equals, GreaterThan17from testtools.matchers import Equals, GreaterThan
1818
19from ubuntuuitoolkit import emulators as toolkit_emulators
20from gallery_app.emulators import main_screen
19from gallery_app.emulators.gallery_utils import GalleryUtils21from gallery_app.emulators.gallery_utils import GalleryUtils
2022
21from time import sleep23from time import sleep
@@ -51,6 +53,10 @@
51 def gallery_utils(self):53 def gallery_utils(self):
52 return GalleryUtils(self.app)54 return GalleryUtils(self.app)
5355
56 @property
57 def main_view(self):
58 return self.app.select_single("MainScreen")
59
54 def setUp(self):60 def setUp(self):
55 self.pointing_device = Pointer(self.input_device_class.create())61 self.pointing_device = Pointer(self.input_device_class.create())
56 super(GalleryTestCase, self).setUp()62 super(GalleryTestCase, self).setUp()
@@ -93,14 +99,16 @@
93 self.ARGS.append(self.sample_destination_dir)99 self.ARGS.append(self.sample_destination_dir)
94 self.app = self.launch_test_application(100 self.app = self.launch_test_application(
95 self.local_location,101 self.local_location,
96 *self.ARGS)102 *self.ARGS,
103 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
97104
98 def launch_test_installed(self):105 def launch_test_installed(self):
99 if model() == 'Desktop':106 if model() == 'Desktop':
100 self.ARGS.append(self.sample_destination_dir)107 self.ARGS.append(self.sample_destination_dir)
101 self.app = self.launch_test_application(108 self.app = self.launch_test_application(
102 "gallery-app",109 "gallery-app",
103 *self.ARGS)110 *self.ARGS,
111 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
104 else:112 else:
105 self.ARGS.append("--desktop_file_hint="113 self.ARGS.append("--desktop_file_hint="
106 "/usr/share/applications/gallery-app.desktop")114 "/usr/share/applications/gallery-app.desktop")
@@ -108,7 +116,8 @@
108 self.app = self.launch_test_application(116 self.app = self.launch_test_application(
109 "gallery-app",117 "gallery-app",
110 *self.ARGS,118 *self.ARGS,
111 app_type='qt')119 app_type='qt',
120 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
112121
113 def ui_update(self):122 def ui_update(self):
114 """ Gives the program the time to update the UI"""123 """ Gives the program the time to update the UI"""
@@ -134,23 +143,6 @@
134 sleep(1)143 sleep(1)
135 self.pointing_device.release()144 self.pointing_device.release()
136145
137 def reveal_toolbar(self):
138 toolbar = self.gallery_utils.get_toolbar()
139 self.assertThat(toolbar.animating, Eventually(Equals(False)))
140
141 if toolbar.active:
142 # Toolbar already open
143 return
144
145 main_view = self.gallery_utils.get_qml_view()
146 x, y, w, h = toolbar.globalRect
147 x_line = main_view.x + main_view.width * 0.5
148 start_y = main_view.y + main_view.height - 1
149 stop_y = start_y - 2 * h
150
151 self.pointing_device.drag(x_line, start_y, x_line, stop_y)
152 self.assertThat(toolbar.state, Eventually(Equals("spread")))
153
154 def ensure_at_least_one_event(self):146 def ensure_at_least_one_event(self):
155 """The event view has to have at least one event147 """The event view has to have at least one event
156 In case gallery is not yet fully loaded wait a while and test again"""148 In case gallery is not yet fully loaded wait a while and test again"""
157149
=== modified file 'tests/autopilot/gallery_app/tests/test_album_editor.py'
--- tests/autopilot/gallery_app/tests/test_album_editor.py 2013-06-26 09:02:33 +0000
+++ tests/autopilot/gallery_app/tests/test_album_editor.py 2013-08-08 12:38:17 +0000
@@ -125,7 +125,7 @@
125 self.open_first_album()125 self.open_first_album()
126 num_photos_start = self.album_view.number_of_photos()126 num_photos_start = self.album_view.number_of_photos()
127 self.assertThat(num_photos_start, Equals(1))127 self.assertThat(num_photos_start, Equals(1))
128 self.reveal_toolbar()128 self.main_view.open_toolbar()
129 back = self.album_view.get_toolbar_back_icon()129 back = self.album_view.get_toolbar_back_icon()
130 self.click_item(back)130 self.click_item(back)
131 self.ensure_album_viewer_is_fully_closed()131 self.ensure_album_viewer_is_fully_closed()
132132
=== modified file 'tests/autopilot/gallery_app/tests/test_album_view.py'
--- tests/autopilot/gallery_app/tests/test_album_view.py 2013-06-26 09:02:33 +0000
+++ tests/autopilot/gallery_app/tests/test_album_view.py 2013-08-08 12:38:17 +0000
@@ -61,7 +61,7 @@
61 self.assertThat(num_photos_start, Equals(1))61 self.assertThat(num_photos_start, Equals(1))
6262
63 # open media selector but cancel63 # open media selector but cancel
64 self.reveal_toolbar()64 self.main_view.open_toolbar()
65 add_button = self.album_view.get_toolbar_add_button()65 add_button = self.album_view.get_toolbar_add_button()
66 self.click_item(add_button)66 self.click_item(add_button)
67 self.ensure_media_selector_is_fully_open()67 self.ensure_media_selector_is_fully_open()
@@ -74,7 +74,7 @@
74 self.assertThat(num_photos, Equals(num_photos_start))74 self.assertThat(num_photos, Equals(num_photos_start))
7575
76 # open media selector and add a photo76 # open media selector and add a photo
77 self.reveal_toolbar()77 self.main_view.open_toolbar()
78 add_button = self.album_view.get_toolbar_add_button()78 add_button = self.album_view.get_toolbar_add_button()
79 self.click_item(add_button)79 self.click_item(add_button)
80 self.ensure_media_selector_is_fully_open()80 self.ensure_media_selector_is_fully_open()
@@ -89,7 +89,7 @@
89 Eventually(Equals(num_photos_start + 1)))89 Eventually(Equals(num_photos_start + 1)))
9090
91 def test_add_photo_to_new_album(self):91 def test_add_photo_to_new_album(self):
92 self.reveal_toolbar()92 self.main_view.open_toolbar()
93 add_button = self.albums_view.get_toolbar_add_button()93 add_button = self.albums_view.get_toolbar_add_button()
94 self.click_item(add_button)94 self.click_item(add_button)
95 self.ui_update()95 self.ui_update()
9696
=== modified file 'tests/autopilot/gallery_app/tests/test_albums_view.py'
--- tests/autopilot/gallery_app/tests/test_albums_view.py 2013-06-26 08:59:08 +0000
+++ tests/autopilot/gallery_app/tests/test_albums_view.py 2013-08-08 12:38:17 +0000
@@ -43,7 +43,7 @@
43 2"""43 2"""
44 self.compare_number_of_albums(1)44 self.compare_number_of_albums(1)
4545
46 self.reveal_toolbar()46 self.main_view.open_toolbar()
47 add_button = self.albums_view.get_toolbar_add_button()47 add_button = self.albums_view.get_toolbar_add_button()
48 self.click_item(add_button)48 self.click_item(add_button)
4949
5050
=== modified file 'tests/autopilot/gallery_app/tests/test_events_view.py'
--- tests/autopilot/gallery_app/tests/test_events_view.py 2013-07-04 08:37:56 +0000
+++ tests/autopilot/gallery_app/tests/test_events_view.py 2013-08-08 12:38:17 +0000
@@ -10,10 +10,9 @@
1010
11from __future__ import absolute_import11from __future__ import absolute_import
1212
13from testtools.matchers import Equals13from testtools.matchers import Equals, Is
14from autopilot.matchers import Eventually14from autopilot.matchers import Eventually
1515
16from gallery_app.emulators.events_view import EventsView
17from gallery_app.tests import GalleryTestCase16from gallery_app.tests import GalleryTestCase
1817
19from os.path import exists18from os.path import exists
@@ -22,10 +21,6 @@
22class TestEventsView(GalleryTestCase):21class TestEventsView(GalleryTestCase):
23 """Tests the main gallery features"""22 """Tests the main gallery features"""
2423
25 @property
26 def events_view(self):
27 return EventsView(self.app)
28
29 def setUp(self):24 def setUp(self):
30 self.ARGS = []25 self.ARGS = []
31 # This is needed to wait for the application to start.26 # This is needed to wait for the application to start.
@@ -35,16 +30,15 @@
35 def tearDown(self):30 def tearDown(self):
36 super(TestEventsView, self).tearDown()31 super(TestEventsView, self).tearDown()
3732
33 def get_events_view(self):
34 return self.gallery_utils.select_single_retry("EventsOverview",
35 objectName="organicEventView")
36
38 def enable_select_mode(self):37 def enable_select_mode(self):
39 self.reveal_toolbar()38 self.main_view.open_toolbar().click_button("selectButton")
40 self.click_select_icon()
41
42 def click_select_icon(self):
43 select_icon = self.events_view.get_toolbar_select_button()
44 self.click_item(select_icon)
4539
46 def click_first_photo(self):40 def click_first_photo(self):
47 first_photo = self.events_view.get_first_image_in_event_view()41 first_photo = self.gallery_utils.get_first_image_in_event_view()
48 self.click_item(first_photo)42 self.click_item(first_photo)
4943
50 def get_delete_dialog(self):44 def get_delete_dialog(self):
@@ -52,51 +46,51 @@
52 self.assertThat(delete_dialog.opacity, Eventually(Equals(1)))46 self.assertThat(delete_dialog.opacity, Eventually(Equals(1)))
53 return delete_dialog47 return delete_dialog
5448
55 def click_delete_action(self):
56 trash_button = self.events_view.get_toolbar_delete_button()
57 self.click_item(trash_button)
58
59 def test_select_button_cancel(self):49 def test_select_button_cancel(self):
60 """Clicking the cancel button after clicking the select button must50 """Clicking the cancel button after clicking the select button must
61 hide the toolbar automatically."""51 hide the toolbar automatically."""
52 events_view = self.get_events_view()
53 self.assertFalse(events_view.inSelectionMode)
54
62 self.enable_select_mode()55 self.enable_select_mode()
56 self.assertTrue(events_view.inSelectionMode)
6357
64 cancel_icon = self.events_view.get_toolbar_cancel_icon()58 cancel_icon = self.gallery_utils.get_toolbar_cancel_icon()
65 self.click_item(cancel_icon)59 self.click_item(cancel_icon)
6660
67 toolbar = self.events_view.get_toolbar()61 toolbar = self.main_view.get_toolbar()
68 self.assertThat(toolbar.active, Eventually(Equals(False)))62 self.assertThat(toolbar.opened, Eventually(Equals(False)))
63 self.assertFalse(events_view.inSelectionMode)
6964
70 def test_delete_a_photo(self):65 def test_delete_a_photo(self):
71 """Selecting a photo must make the delete button clickable."""66 """Selecting a photo must make the delete button clickable."""
72 number_of_photos = self.events_view.number_of_photos_in_events()67 number_of_photos = self.gallery_utils.number_of_photos_in_events()
73 self.enable_select_mode()68 self.enable_select_mode()
74 self.click_first_photo()69 self.click_first_photo()
75 self.click_delete_action()70 self.main_view.open_toolbar().click_button("deleteButton")
7671
77 delete_dialog = self.get_delete_dialog()72 cancel_item = self.gallery_utils.get_delete_dialog_cancel_button()
78
79 cancel_item = self.events_view.get_delete_dialog_cancel_button()
80 self.click_item(cancel_item)73 self.click_item(cancel_item)
8174
82 self.assertThat(lambda: exists(self.sample_file),75 self.assertThat(lambda: exists(self.sample_file),
83 Eventually(Equals(True)))76 Eventually(Equals(True)))
8477
85 new_number_of_photos = self.events_view.number_of_photos_in_events()78 new_number_of_photos = self.gallery_utils.number_of_photos_in_events()
86 self.assertThat(new_number_of_photos, Equals(number_of_photos))79 self.assertThat(new_number_of_photos, Equals(number_of_photos))
8780
88 self.click_delete_action()81 self.assertThat(lambda: self.gallery_utils.get_delete_dialog(),
8982 Eventually(Is(None)))
90 delete_dialog = self.get_delete_dialog()83
9184 self.main_view.open_toolbar().click_button("deleteButton")
92 delete_item = self.events_view.get_delete_dialog_delete_button()85
86 delete_item = self.gallery_utils.get_delete_dialog_delete_button()
93 self.click_item(delete_item)87 self.click_item(delete_item)
9488
95 self.assertThat(lambda: exists(self.sample_file),89 self.assertThat(lambda: exists(self.sample_file),
96 Eventually(Equals(False)))90 Eventually(Equals(False)))
9791
98 self.ui_update()92 self.ui_update()
99 new_number_of_photos = self.events_view.number_of_photos_in_events()93 new_number_of_photos = self.gallery_utils.number_of_photos_in_events()
100 self.assertThat(new_number_of_photos, Equals(number_of_photos - 1))94 self.assertThat(new_number_of_photos, Equals(number_of_photos - 1))
10195
102 def test_adding_a_video(self):96 def test_adding_a_video(self):
10397
=== modified file 'tests/autopilot/gallery_app/tests/test_photo_viewer.py'
--- tests/autopilot/gallery_app/tests/test_photo_viewer.py 2013-07-04 12:03:51 +0000
+++ tests/autopilot/gallery_app/tests/test_photo_viewer.py 2013-08-08 12:38:17 +0000
@@ -34,7 +34,7 @@
34 self.ARGS = []34 self.ARGS = []
35 super(TestPhotoViewerBase, self).setUp()35 super(TestPhotoViewerBase, self).setUp()
36 self.open_first_photo()36 self.open_first_photo()
37 self.reveal_toolbar()37 self.main_view.open_toolbar()
3838
39 def open_first_photo(self):39 def open_first_photo(self):
40 self.assertThat(lambda: self.photo_viewer.number_of_photos_in_events(),40 self.assertThat(lambda: self.photo_viewer.number_of_photos_in_events(),
@@ -75,32 +75,26 @@
75 self.pointing_device.move_to_object(trash_button)75 self.pointing_device.move_to_object(trash_button)
76 self.pointing_device.click()76 self.pointing_device.click()
7777
78 delete_dialog = self.get_delete_dialog()
79
80 cancel_item = self.photo_viewer.get_delete_popover_cancel_item()78 cancel_item = self.photo_viewer.get_delete_popover_cancel_item()
81 self.click_item(cancel_item)79 self.click_item(cancel_item)
8280
83 self.assertThat(lambda: exists(self.sample_file),81 self.assertThat(lambda: exists(self.sample_file),
84 Eventually(Equals(True)))82 Eventually(Equals(True)))
8583
86 self.reveal_toolbar()84 self.main_view.open_toolbar()
8785
88 self.pointing_device.move_to_object(trash_button)86 self.pointing_device.move_to_object(trash_button)
89 self.pointing_device.click()87 self.pointing_device.click()
9088
91 delete_dialog = self.get_delete_dialog()
92
93 delete_item = self.photo_viewer.get_delete_popover_delete_item()89 delete_item = self.photo_viewer.get_delete_popover_delete_item()
94 self.click_item(delete_item)90 self.click_item(delete_item)
9591
96 self.assertThat(lambda: exists(self.sample_file),92 self.assertThat(lambda: exists(self.sample_file),
97 Eventually(Equals(False)))93 Eventually(Equals(False)))
9894
99 self.reveal_toolbar()95 self.main_view.open_toolbar()
100 self.pointing_device.click_object(trash_button)96 self.pointing_device.click_object(trash_button)
10197
102 delete_dialog = self.get_delete_dialog()
103
104 delete_item = self.photo_viewer.get_delete_popover_delete_item()98 delete_item = self.photo_viewer.get_delete_popover_delete_item()
105 self.click_item(delete_item)99 self.click_item(delete_item)
106100
@@ -240,7 +234,7 @@
240 is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight234 is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight
241 self.assertThat(is_landscape, Equals(False))235 self.assertThat(is_landscape, Equals(False))
242236
243 self.reveal_toolbar()237 self.main_view.open_toolbar()
244 self.click_edit_button()238 self.click_edit_button()
245 self.click_undo_item()239 self.click_undo_item()
246240
@@ -249,7 +243,7 @@
249 is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight243 is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight
250 self.assertThat(is_landscape, Equals(True))244 self.assertThat(is_landscape, Equals(True))
251245
252 self.reveal_toolbar()246 self.main_view.open_toolbar()
253 self.click_edit_button()247 self.click_edit_button()
254 self.click_redo_item()248 self.click_redo_item()
255249
@@ -258,10 +252,10 @@
258 is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight252 is_landscape = opened_photo.paintedWidth > opened_photo.paintedHeight
259 self.assertThat(is_landscape, Equals(False))253 self.assertThat(is_landscape, Equals(False))
260254
261 self.reveal_toolbar()255 self.main_view.open_toolbar()
262 self.click_edit_button()256 self.click_edit_button()
263 self.click_rotate_item()257 self.click_rotate_item()
264 self.reveal_toolbar()258 self.main_view.open_toolbar()
265 self.click_edit_button()259 self.click_edit_button()
266 self.click_revert_item()260 self.click_revert_item()
267261
@@ -287,7 +281,7 @@
287281
288 self.click_rotate_item()282 self.click_rotate_item()
289283
290 self.reveal_toolbar()284 self.main_view.open_toolbar()
291 self.click_edit_button()285 self.click_edit_button()
292 undo_item = self.photo_viewer.get_undo_menu_item()286 undo_item = self.photo_viewer.get_undo_menu_item()
293 redo_item = self.photo_viewer.get_redo_menu_item()287 redo_item = self.photo_viewer.get_redo_menu_item()
@@ -299,7 +293,7 @@
299293
300 self.click_undo_item()294 self.click_undo_item()
301295
302 self.reveal_toolbar()296 self.main_view.open_toolbar()
303 self.click_edit_button()297 self.click_edit_button()
304 undo_item = self.photo_viewer.get_undo_menu_item()298 undo_item = self.photo_viewer.get_undo_menu_item()
305 redo_item = self.photo_viewer.get_redo_menu_item()299 redo_item = self.photo_viewer.get_redo_menu_item()
@@ -311,7 +305,7 @@
311305
312 self.click_redo_item()306 self.click_redo_item()
313307
314 self.reveal_toolbar()308 self.main_view.open_toolbar()
315 self.click_edit_button()309 self.click_edit_button()
316 undo_item = self.photo_viewer.get_undo_menu_item()310 undo_item = self.photo_viewer.get_undo_menu_item()
317 redo_item = self.photo_viewer.get_redo_menu_item()311 redo_item = self.photo_viewer.get_redo_menu_item()
@@ -323,7 +317,7 @@
323317
324 self.click_revert_item()318 self.click_revert_item()
325319
326 self.reveal_toolbar()320 self.main_view.open_toolbar()
327 self.click_edit_button()321 self.click_edit_button()
328 undo_item = self.photo_viewer.get_undo_menu_item()322 undo_item = self.photo_viewer.get_undo_menu_item()
329 redo_item = self.photo_viewer.get_redo_menu_item()323 redo_item = self.photo_viewer.get_redo_menu_item()
@@ -333,12 +327,10 @@
333 self.assertThat(redo_item.enabled, Eventually(Equals(False)))327 self.assertThat(redo_item.enabled, Eventually(Equals(False)))
334 self.assertThat(revert_item.enabled, Eventually(Equals(False)))328 self.assertThat(revert_item.enabled, Eventually(Equals(False)))
335329
336 # disabled the test, as with the current implementation the UI is 330 self.click_enhance_item()
337 # blocked. This causes troubles on jenkins331
338 #self.click_enhance_item()332 self.main_view.open_toolbar()
339333 self.click_edit_button()
340 #self.reveal_toolbar()334
341 #self.click_edit_button()335 revert_item = self.photo_viewer.get_revert_menu_item()
342336 self.assertThat(lambda: revert_item.enabled, Eventually(Equals(True)))
343 #revert_item = self.photo_viewer.get_revert_menu_item()
344 #self.assertThat(lambda: revert_item.enabled, Eventually(Equals(True)))
345337
=== modified file 'tests/autopilot/gallery_app/tests/test_photos_view.py'
--- tests/autopilot/gallery_app/tests/test_photos_view.py 2013-07-02 08:47:23 +0000
+++ tests/autopilot/gallery_app/tests/test_photos_view.py 2013-08-08 12:38:17 +0000
@@ -45,7 +45,7 @@
45 self.ensure_tabs_dont_move()45 self.ensure_tabs_dont_move()
4646
47 def enable_select_mode(self):47 def enable_select_mode(self):
48 self.reveal_toolbar()48 self.main_view.open_toolbar()
49 self.click_select_icon()49 self.click_select_icon()
5050
51 def click_select_icon(self):51 def click_select_icon(self):
@@ -88,8 +88,6 @@
88 self.click_first_photo()88 self.click_first_photo()
89 self.click_delete_action()89 self.click_delete_action()
9090
91 delete_dialog = self.get_delete_dialog()
92
93 cancel_item = self.photos_view.get_delete_dialog_cancel_button()91 cancel_item = self.photos_view.get_delete_dialog_cancel_button()
94 self.click_item(cancel_item)92 self.click_item(cancel_item)
9593
@@ -101,8 +99,6 @@
10199
102 self.click_delete_action()100 self.click_delete_action()
103101
104 delete_dialog = self.get_delete_dialog()
105
106 delete_item = self.photos_view.get_delete_dialog_delete_button()102 delete_item = self.photos_view.get_delete_dialog_delete_button()
107 self.click_item(delete_item)103 self.click_item(delete_item)
108104
109105
=== modified file 'tests/autopilot/gallery_app/tests/test_picker_mode.py'
--- tests/autopilot/gallery_app/tests/test_picker_mode.py 2013-06-26 08:59:08 +0000
+++ tests/autopilot/gallery_app/tests/test_picker_mode.py 2013-08-08 12:38:17 +0000
@@ -16,9 +16,6 @@
16from gallery_app.emulators.picker_mode import PickerMode16from gallery_app.emulators.picker_mode import PickerMode
17from gallery_app.tests import GalleryTestCase17from gallery_app.tests import GalleryTestCase
1818
19from os.path import exists
20from time import sleep
21
2219
23class TestPickerMode(GalleryTestCase):20class TestPickerMode(GalleryTestCase):
2421

Subscribers

People subscribed via source and target branches