Merge lp:~om26er/address-book-app/abook_navigation_favorites into lp:address-book-app
- abook_navigation_favorites
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~om26er/address-book-app/abook_navigation_favorites |
Merge into: | lp:address-book-app |
Prerequisite: | lp:~renatofilho/address-book-app/new-favorite-list |
Diff against target: |
726 lines (+446/-35) 15 files modified
src/imports/ContactView/ContactDetailFavoriteView.qml (+1/-0) src/imports/Ubuntu/Contacts/ContactListView.qml (+2/-0) tests/autopilot/address_book_app/emulators/__init__.py (+12/-0) tests/autopilot/address_book_app/emulators/contact_list_page.py (+145/-26) tests/autopilot/address_book_app/emulators/contact_view.py (+57/-0) tests/autopilot/address_book_app/emulators/main_window.py (+27/-3) tests/autopilot/address_book_app/helpers.py (+74/-0) tests/autopilot/address_book_app/tests/__init__.py (+17/-6) tests/autopilot/address_book_app/tests/test_add_contact.py (+4/-0) tests/autopilot/address_book_app/tests/test_contactlist.py (+4/-0) tests/autopilot/address_book_app/tests/test_delete_contact.py (+1/-0) tests/autopilot/address_book_app/tests/test_edit_contact.py (+4/-0) tests/autopilot/address_book_app/tests/test_favorites.py (+96/-0) tests/autopilot/address_book_app/tests/test_multiple_pick_mode.py (+1/-0) tests/autopilot/address_book_app/tests/test_single_pick_mode.py (+1/-0) |
To merge this branch: | bzr merge lp:~om26er/address-book-app/abook_navigation_favorites |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Allan LeSage | Pending | ||
Ubuntu Phablet Team | Pending | ||
Review via email: mp+211431@code.launchpad.net |
This proposal supersedes a proposal from 2014-03-17.
Commit message
autopilot: add tests for favoriting contacts, using the new dummy backend service
Description of the change
Note: I only fixed the code to use the dummy backend service, no other changes are from me.
Depends on lp:~renatofilho/address-book-service/dummy-mode to be merged.
- 163. By Omer Akram
-
remove syncevolution dep
PS Jenkins bot (ps-jenkins) wrote : | # |
- 164. By Omer Akram
-
remove unused test code, fix things
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:164
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 165. By Omer Akram
-
make dummy backend code reusable by other test cases
- 166. By Omer Akram
-
add docstrings for new tests
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:165
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:166
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 167. By Omer Akram
-
make starting of dummy backend a reusable helper for other apps to consume
- 168. By Omer Akram
-
adapt autopilot tests to UI changes in trunk
- 169. By Omer Akram
-
merge trunk
Unmerged revisions
- 169. By Omer Akram
-
merge trunk
- 168. By Omer Akram
-
adapt autopilot tests to UI changes in trunk
- 167. By Omer Akram
-
make starting of dummy backend a reusable helper for other apps to consume
- 166. By Omer Akram
-
add docstrings for new tests
- 165. By Omer Akram
-
make dummy backend code reusable by other test cases
- 164. By Omer Akram
-
remove unused test code, fix things
- 163. By Omer Akram
-
remove syncevolution dep
- 162. By Omer Akram
-
fix pep8 and pyflakes warnings for test_favorite, did not touch other modules
- 161. By Omer Akram
-
remove unused test code
- 160. By Omer Akram
-
don't use memory backend for favorite tests, use the new dummy backend from the service
Preview Diff
1 | === modified file 'src/imports/ContactView/ContactDetailFavoriteView.qml' | |||
2 | --- src/imports/ContactView/ContactDetailFavoriteView.qml 2014-02-25 21:52:58 +0000 | |||
3 | +++ src/imports/ContactView/ContactDetailFavoriteView.qml 2014-03-26 22:14:30 +0000 | |||
4 | @@ -28,6 +28,7 @@ | |||
5 | 28 | 28 | ||
6 | 29 | Icon { | 29 | Icon { |
7 | 30 | id: icon | 30 | id: icon |
8 | 31 | objectName: 'favoriteIcon' | ||
9 | 31 | 32 | ||
10 | 32 | anchors.fill: parent | 33 | anchors.fill: parent |
11 | 33 | name: root.detail && root.detail.favorite ? "favorite-selected" : "favorite-unselected" | 34 | name: root.detail && root.detail.favorite ? "favorite-selected" : "favorite-unselected" |
12 | 34 | 35 | ||
13 | === modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml' | |||
14 | --- src/imports/Ubuntu/Contacts/ContactListView.qml 2014-02-25 20:20:21 +0000 | |||
15 | +++ src/imports/Ubuntu/Contacts/ContactListView.qml 2014-03-26 22:14:30 +0000 | |||
16 | @@ -57,6 +57,7 @@ | |||
17 | 57 | anchors.fill: parent | 57 | anchors.fill: parent |
18 | 58 | Label { | 58 | Label { |
19 | 59 | id: lblAll | 59 | id: lblAll |
20 | 60 | objectName: "labelAll" | ||
21 | 60 | 61 | ||
22 | 61 | anchors { | 62 | anchors { |
23 | 62 | top: parent.top | 63 | top: parent.top |
24 | @@ -84,6 +85,7 @@ | |||
25 | 84 | 85 | ||
26 | 85 | Label { | 86 | Label { |
27 | 86 | id: lblFavourites | 87 | id: lblFavourites |
28 | 88 | objectName: "labelFavorite" | ||
29 | 87 | 89 | ||
30 | 88 | anchors { | 90 | anchors { |
31 | 89 | top: parent.top | 91 | top: parent.top |
32 | 90 | 92 | ||
33 | === modified file 'tests/autopilot/address_book_app/emulators/__init__.py' | |||
34 | --- tests/autopilot/address_book_app/emulators/__init__.py 2013-07-09 18:42:30 +0000 | |||
35 | +++ tests/autopilot/address_book_app/emulators/__init__.py 2014-03-26 22:14:30 +0000 | |||
36 | @@ -4,3 +4,15 @@ | |||
37 | 4 | # This program is free software: you can redistribute it and/or modify it | 4 | # This program is free software: you can redistribute it and/or modify it |
38 | 5 | # under the terms of the GNU General Public License version 3, as published | 5 | # under the terms of the GNU General Public License version 3, as published |
39 | 6 | # by the Free Software Foundation. | 6 | # by the Free Software Foundation. |
40 | 7 | |||
41 | 8 | |||
42 | 9 | def get_nearest_parent_matching_type(child, desired_type): | ||
43 | 10 | """Climb down the widget tree, return first instance of desired_type""" | ||
44 | 11 | while type(child).__name__ != desired_type: | ||
45 | 12 | parent = child.get_parent() | ||
46 | 13 | if type(child).__name__ == 'AddressBookApp': | ||
47 | 14 | # we reached the root and found nothing | ||
48 | 15 | return None | ||
49 | 16 | else: | ||
50 | 17 | child = parent | ||
51 | 18 | return child | ||
52 | 7 | 19 | ||
53 | === modified file 'tests/autopilot/address_book_app/emulators/contact_list_page.py' | |||
54 | --- tests/autopilot/address_book_app/emulators/contact_list_page.py 2014-02-13 16:44:12 +0000 | |||
55 | +++ tests/autopilot/address_book_app/emulators/contact_list_page.py 2014-03-26 22:14:30 +0000 | |||
56 | @@ -1,20 +1,24 @@ | |||
57 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- |
58 | 2 | |||
59 | 3 | """ ContactListPage emulator for Addressbook App tests """ | ||
60 | 4 | |||
61 | 5 | # Copyright 2014 Canonical | 2 | # Copyright 2014 Canonical |
62 | 6 | # | 3 | # |
63 | 7 | # This program is free software: you can redistribute it and/or modify it | 4 | # This program is free software: you can redistribute it and/or modify it |
64 | 8 | # under the terms of the GNU General Public License version 3, as published | 5 | # under the terms of the GNU General Public License version 3, as published |
65 | 9 | # by the Free Software Foundation. | 6 | # by the Free Software Foundation. |
66 | 10 | 7 | ||
67 | 8 | """ ContactListPage emulator for Addressbook App tests """ | ||
68 | 9 | |||
69 | 11 | import logging | 10 | import logging |
70 | 11 | from time import sleep | ||
71 | 12 | 12 | ||
72 | 13 | from autopilot import logging as autopilot_logging | ||
73 | 13 | from autopilot.introspection.dbus import StateNotFoundError | 14 | from autopilot.introspection.dbus import StateNotFoundError |
74 | 15 | from autopilot.matchers import Eventually | ||
75 | 16 | from testtools.matchers import GreaterThan | ||
76 | 14 | from ubuntuuitoolkit import emulators as uitk | 17 | from ubuntuuitoolkit import emulators as uitk |
77 | 15 | 18 | ||
80 | 16 | LOGGER = logging.getLogger(__name__) | 19 | from address_book_app.emulators import get_nearest_parent_matching_type |
81 | 17 | from time import sleep | 20 | |
82 | 21 | logger = logging.getLogger(__name__) | ||
83 | 18 | 22 | ||
84 | 19 | 23 | ||
85 | 20 | class ContactListPage(uitk.UbuntuUIToolkitEmulatorBase): | 24 | class ContactListPage(uitk.UbuntuUIToolkitEmulatorBase): |
86 | @@ -27,9 +31,12 @@ | |||
87 | 27 | super(ContactListPage, self).__init__(*args) | 31 | super(ContactListPage, self).__init__(*args) |
88 | 28 | 32 | ||
89 | 29 | def get_contacts(self): | 33 | def get_contacts(self): |
93 | 30 | """ | 34 | """Returns a list of ContactDelegate objects. |
94 | 31 | Returns a list of ContactDelegate objects and populate | 35 | |
95 | 32 | self.selection_marks | 36 | Also populate self.selection_marks. |
96 | 37 | |||
97 | 38 | :return: The list of ContactDelegate objects. | ||
98 | 39 | |||
99 | 33 | """ | 40 | """ |
100 | 34 | sleep(1) | 41 | sleep(1) |
101 | 35 | self.contacts = self.select_many("ContactDelegate") | 42 | self.contacts = self.select_many("ContactDelegate") |
102 | @@ -41,10 +48,12 @@ | |||
103 | 41 | self.selection_marks.append(mark) | 48 | self.selection_marks.append(mark) |
104 | 42 | return self.contacts | 49 | return self.contacts |
105 | 43 | 50 | ||
106 | 51 | @autopilot_logging.log_action(logger.info) | ||
107 | 44 | def select_contacts_by_index(self, indices): | 52 | def select_contacts_by_index(self, indices): |
111 | 45 | """ Select contacts corresponding to the list of index in indices | 53 | """Select contacts corresponding to the list of index in indices. |
112 | 46 | 54 | ||
113 | 47 | :param indices: List of integers | 55 | :param indices: List of integer indices of contacts to select. |
114 | 56 | |||
115 | 48 | """ | 57 | """ |
116 | 49 | self.deselect_all() | 58 | self.deselect_all() |
117 | 50 | 59 | ||
118 | @@ -53,8 +62,9 @@ | |||
119 | 53 | self.selected_marks.append(self.selection_marks[idx]) | 62 | self.selected_marks.append(self.selection_marks[idx]) |
120 | 54 | self.pointing_device.click_object(self.selection_marks[idx]) | 63 | self.pointing_device.click_object(self.selection_marks[idx]) |
121 | 55 | 64 | ||
122 | 65 | @autopilot_logging.log_action(logger.info) | ||
123 | 56 | def deselect_all(self): | 66 | def deselect_all(self): |
125 | 57 | """Deselect every contacts""" | 67 | """Deselect every contact.""" |
126 | 58 | contacts = self.select_many("ContactDelegate") | 68 | contacts = self.select_many("ContactDelegate") |
127 | 59 | self.selected_marks = [] | 69 | self.selected_marks = [] |
128 | 60 | for contact in contacts: | 70 | for contact in contacts: |
129 | @@ -63,28 +73,137 @@ | |||
130 | 63 | objectName="selectionMark") | 73 | objectName="selectionMark") |
131 | 64 | self.pointing_device.click_object(mark) | 74 | self.pointing_device.click_object(mark) |
132 | 65 | 75 | ||
133 | 76 | @autopilot_logging.log_action(logger.info) | ||
134 | 66 | def click_button(self, objectname): | 77 | def click_button(self, objectname): |
135 | 67 | """Press a button that matches objectname | 78 | """Press a button that matches objectname |
136 | 68 | 79 | ||
138 | 69 | :param objectname: Name of the object | 80 | :param objectname: The name of the object. |
139 | 81 | :raise StateNotFoundError: When a matching button is not found. | ||
140 | 82 | |||
141 | 70 | """ | 83 | """ |
153 | 71 | try: | 84 | button = self.select_single("Button", |
154 | 72 | buttons = self.select_many("Button", | 85 | objectName=objectname, |
155 | 73 | objectName=objectname) | 86 | visible=True) |
156 | 74 | for button in buttons: | 87 | self.pointing_device.click_object(button) |
146 | 75 | if button.visible: | ||
147 | 76 | self.pointing_device.click_object(button) | ||
148 | 77 | except StateNotFoundError: | ||
149 | 78 | LOGGER.error( | ||
150 | 79 | 'Button with objectName "{0}" not found.'.format(objectname) | ||
151 | 80 | ) | ||
152 | 81 | raise | ||
157 | 82 | 88 | ||
158 | 89 | @autopilot_logging.log_action(logger.info) | ||
159 | 83 | def cancel(self): | 90 | def cancel(self): |
161 | 84 | """Press the cancel button displayed when pick mode is enabled""" | 91 | """Press the cancel button displayed when pick mode is enabled.""" |
162 | 85 | self.click_button("DialogButtons.rejectButton") | 92 | self.click_button("DialogButtons.rejectButton") |
163 | 86 | 93 | ||
164 | 94 | @autopilot_logging.log_action(logger.info) | ||
165 | 87 | def delete(self): | 95 | def delete(self): |
167 | 88 | """Press the delete button displayed when pick mode is enabled""" | 96 | """Press the delete button displayed when pick mode is enabled.""" |
168 | 89 | self.click_button("DialogButtons.acceptButton") | 97 | self.click_button("DialogButtons.acceptButton") |
169 | 90 | self.get_contacts() | 98 | self.get_contacts() |
170 | 99 | |||
171 | 100 | def get_contact_by_name(self, | ||
172 | 101 | contact_name, | ||
173 | 102 | parent_delegate_type='ContactDelegate'): | ||
174 | 103 | """Find a label with text matching contact name. | ||
175 | 104 | |||
176 | 105 | :param contact_name: The name of the contact, e.g. 'Fulano de Tal'. | ||
177 | 106 | :param parent_delegate_type: 'ContactDelegate' or 'FavoriteDelegate'. | ||
178 | 107 | :return: The label for a matching contact. | ||
179 | 108 | :raises StateNotFoundError: If the contact_name is not found. | ||
180 | 109 | |||
181 | 110 | """ | ||
182 | 111 | try: | ||
183 | 112 | assert(lambda: len(self.select_many("Label", | ||
184 | 113 | text=contact_name)), | ||
185 | 114 | Eventually(GreaterThan(0))) | ||
186 | 115 | contact_name_labels = self.select_many( | ||
187 | 116 | "Label", | ||
188 | 117 | text=contact_name) | ||
189 | 118 | for contact_name_label in contact_name_labels: | ||
190 | 119 | # we could have a contact or a favorite | ||
191 | 120 | if get_nearest_parent_matching_type( | ||
192 | 121 | contact_name_label, | ||
193 | 122 | parent_delegate_type): | ||
194 | 123 | return contact_name_label | ||
195 | 124 | raise StateNotFoundError('Label') | ||
196 | 125 | except StateNotFoundError: | ||
197 | 126 | logger.error("Contact {} not found.".format(contact_name)) | ||
198 | 127 | raise | ||
199 | 128 | |||
200 | 129 | def get_favorite_by_name(self, contact_name): | ||
201 | 130 | """Find a label with text matching contact name under Favorites. | ||
202 | 131 | |||
203 | 132 | :param contact_name: Name of the contact, e.g. 'Fulano de Tal'. | ||
204 | 133 | :return: The label for the metching favorite. | ||
205 | 134 | :raises StateNotFoundError: If the contact_name is not found. | ||
206 | 135 | |||
207 | 136 | """ | ||
208 | 137 | return self.get_contact_by_name(contact_name).visible | ||
209 | 138 | |||
210 | 139 | @autopilot_logging.log_action(logger.info) | ||
211 | 140 | def click_contact_by_name(self, | ||
212 | 141 | contact_name, | ||
213 | 142 | parent_delegate_type='ContactDelegate'): | ||
214 | 143 | """Click a contact with label matching the given contact name. | ||
215 | 144 | |||
216 | 145 | :param contact_name: Name of a contact, e.g. 'Fulano de Tal'. | ||
217 | 146 | :param parent_delegate_type: 'ContactDelegate' or 'FavoriteDelegate'. | ||
218 | 147 | :raises StateNotFoundError: If the contact_name is not found. | ||
219 | 148 | |||
220 | 149 | """ | ||
221 | 150 | contact_name_label = self.get_contact_by_name( | ||
222 | 151 | contact_name, parent_delegate_type) | ||
223 | 152 | self.pointing_device.click_object(contact_name_label) | ||
224 | 153 | |||
225 | 154 | @autopilot_logging.log_action(logger.info) | ||
226 | 155 | def open_contact_view_by_contact_name(self, contact_name): | ||
227 | 156 | """Open the contact view page for a contact with the given name. | ||
228 | 157 | |||
229 | 158 | :param contact_name: The name of the contact, e.g. 'Abe Lincoln'. | ||
230 | 159 | :return: The ContactView for the contact. | ||
231 | 160 | :raises StateNotFoundError: If the name is not found. | ||
232 | 161 | |||
233 | 162 | """ | ||
234 | 163 | self.click_contact_by_name(contact_name) | ||
235 | 164 | |||
236 | 165 | @autopilot_logging.log_action(logger.info) | ||
237 | 166 | def click_favorite_by_name(self, | ||
238 | 167 | contact_name): | ||
239 | 168 | """Click a favorite with label matching the given contact name. | ||
240 | 169 | |||
241 | 170 | :param contact_name: Name of a contact, e.g. 'Fulano de Tal' | ||
242 | 171 | :raises StateNotFoundError: If the contact_name is not found. | ||
243 | 172 | |||
244 | 173 | """ | ||
245 | 174 | contact_name_label = self.get_favorite_by_name( | ||
246 | 175 | contact_name) | ||
247 | 176 | self.pointing_device.click_object(contact_name_label) | ||
248 | 177 | |||
249 | 178 | @autopilot_logging.log_action(logger.info) | ||
250 | 179 | def open_contact_view_by_favorite_name(self, favorite_name): | ||
251 | 180 | """Open the contact view page for a favorite with the given name. | ||
252 | 181 | |||
253 | 182 | :param favorite_name: The name of the favorite, e.g. 'Abe Lincoln'. | ||
254 | 183 | :return: The ContactView for the contact. | ||
255 | 184 | :raises StateNotFoundError: If the name is not found. | ||
256 | 185 | |||
257 | 186 | """ | ||
258 | 187 | self.click_favorite_by_name(favorite_name) | ||
259 | 188 | |||
260 | 189 | @autopilot_logging.log_action(logger.info) | ||
261 | 190 | def click_phone_number(self, phone_number): | ||
262 | 191 | """Click a label matching the given phone number. | ||
263 | 192 | |||
264 | 193 | :param phone_number: A phone number, e.g. '3321 1232'. | ||
265 | 194 | :raises StateNotFoundError: If the phone_number is not found. | ||
266 | 195 | |||
267 | 196 | """ | ||
268 | 197 | phone_number_label = self.wait_select_single('Label', | ||
269 | 198 | text=phone_number) | ||
270 | 199 | self.pointing_device.click_object(phone_number_label) | ||
271 | 200 | |||
272 | 201 | def contact_is_favorite(self, name): | ||
273 | 202 | """Is the given contact name a favorite? | ||
274 | 203 | |||
275 | 204 | :param contact_name: The name of a contact e.g. John. | ||
276 | 205 | :raises StateNotFoundError: If the contact name is not found. | ||
277 | 206 | :returns: Boolean. | ||
278 | 207 | |||
279 | 208 | """ | ||
280 | 209 | self.open_contact_view_by_contact_name(name) | ||
281 | 91 | 210 | ||
282 | === added file 'tests/autopilot/address_book_app/emulators/contact_view.py' | |||
283 | --- tests/autopilot/address_book_app/emulators/contact_view.py 1970-01-01 00:00:00 +0000 | |||
284 | +++ tests/autopilot/address_book_app/emulators/contact_view.py 2014-03-26 22:14:30 +0000 | |||
285 | @@ -0,0 +1,57 @@ | |||
286 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
287 | 2 | # Copyright 2014 Canonical | ||
288 | 3 | # | ||
289 | 4 | # This program is free software: you can redistribute it and/or modify it | ||
290 | 5 | # under the terms of the GNU General Public License version 3, as published | ||
291 | 6 | # by the Free Software Foundation. | ||
292 | 7 | |||
293 | 8 | """ ContactView emulator for Addressbook App tests """ | ||
294 | 9 | |||
295 | 10 | import logging | ||
296 | 11 | |||
297 | 12 | from autopilot import logging as autopilot_logging | ||
298 | 13 | from autopilot.introspection.dbus import StateNotFoundError | ||
299 | 14 | from ubuntuuitoolkit import emulators as uitk | ||
300 | 15 | |||
301 | 16 | logger = logging.getLogger(__name__) | ||
302 | 17 | |||
303 | 18 | |||
304 | 19 | class ContactView(uitk.UbuntuUIToolkitEmulatorBase): | ||
305 | 20 | """ContactView emulator class""" | ||
306 | 21 | |||
307 | 22 | def __init__(self, *args): | ||
308 | 23 | super(ContactView, self).__init__(*args) | ||
309 | 24 | |||
310 | 25 | @autopilot_logging.log_action(logger.info) | ||
311 | 26 | def click_button(self, objectname): | ||
312 | 27 | """Press a button that matches objectname. | ||
313 | 28 | |||
314 | 29 | :param objectname: The name of the object. | ||
315 | 30 | :raises StateNotFoundError: If the matching object is not found. | ||
316 | 31 | |||
317 | 32 | """ | ||
318 | 33 | buttons = self.select_single("Button", | ||
319 | 34 | objectName=objectname, | ||
320 | 35 | visible=True) | ||
321 | 36 | self.pointing_device.click_object(button) | ||
322 | 37 | |||
323 | 38 | @autopilot_logging.log_action(logger.info) | ||
324 | 39 | def cancel(self): | ||
325 | 40 | """Press the cancel button displayed when pick mode is enabled.""" | ||
326 | 41 | self.click_button("DialogButtons.rejectButton") | ||
327 | 42 | |||
328 | 43 | @autopilot_logging.log_action(logger.info) | ||
329 | 44 | def delete(self): | ||
330 | 45 | """Press the delete button displayed when pick mode is enabled.""" | ||
331 | 46 | self.click_button("DialogButtons.acceptButton") | ||
332 | 47 | self.get_contacts() | ||
333 | 48 | |||
334 | 49 | def favorite_icon(self): | ||
335 | 50 | return self.wait_select_single('Icon', objectName='favoriteIcon') | ||
336 | 51 | |||
337 | 52 | @autopilot_logging.log_action(logger.info) | ||
338 | 53 | def click_favorite_icon(self): | ||
339 | 54 | """Tap/click on the favorite icon to make a contact favorite.""" | ||
340 | 55 | favorite_icon = self.favorite_icon() | ||
341 | 56 | |||
342 | 57 | self.pointing_device.click_object(favorite_icon) | ||
343 | 0 | 58 | ||
344 | === modified file 'tests/autopilot/address_book_app/emulators/main_window.py' | |||
345 | --- tests/autopilot/address_book_app/emulators/main_window.py 2014-02-28 16:00:02 +0000 | |||
346 | +++ tests/autopilot/address_book_app/emulators/main_window.py 2014-03-26 22:14:30 +0000 | |||
347 | @@ -21,7 +21,7 @@ | |||
348 | 21 | 21 | ||
349 | 22 | def get_contact_list_page(self): | 22 | def get_contact_list_page(self): |
350 | 23 | return self. wait_select_single("ContactListPage", | 23 | return self. wait_select_single("ContactListPage", |
352 | 24 | objectName="contactListPage") | 24 | objectName="contactListPage") |
353 | 25 | 25 | ||
354 | 26 | def get_contact_edit_page(self): | 26 | def get_contact_edit_page(self): |
355 | 27 | return self.wait_select_single(ContactEditor, | 27 | return self.wait_select_single(ContactEditor, |
356 | @@ -43,7 +43,7 @@ | |||
357 | 43 | """ | 43 | """ |
358 | 44 | Returns a ContactListView iobject for the current window | 44 | Returns a ContactListView iobject for the current window |
359 | 45 | """ | 45 | """ |
361 | 46 | return self.wait_select_single( "ContactListView", | 46 | return self.wait_select_single("ContactListView", |
362 | 47 | objectName="contactListView") | 47 | objectName="contactListView") |
363 | 48 | 48 | ||
364 | 49 | def get_button(self, name): | 49 | def get_button(self, name): |
365 | @@ -53,7 +53,7 @@ | |||
366 | 53 | Arguments: | 53 | Arguments: |
367 | 54 | name: Name of the button | 54 | name: Name of the button |
368 | 55 | """ | 55 | """ |
370 | 56 | return self.wait_select_single( "Button", objectName=name) | 56 | return self.wait_select_single("Button", objectName=name) |
371 | 57 | 57 | ||
372 | 58 | def cancel(self): | 58 | def cancel(self): |
373 | 59 | """ | 59 | """ |
374 | @@ -67,6 +67,30 @@ | |||
375 | 67 | """ | 67 | """ |
376 | 68 | self.pointing_device.click_object(self.get_button("accept")) | 68 | self.pointing_device.click_object(self.get_button("accept")) |
377 | 69 | 69 | ||
378 | 70 | def _get_label(self, name): | ||
379 | 71 | """ | ||
380 | 72 | Returns a Label object matching 'name' | ||
381 | 73 | |||
382 | 74 | Arguments: | ||
383 | 75 | name: objectName of the label | ||
384 | 76 | """ | ||
385 | 77 | return self.wait_select_single('Label', objectName=name, visible=True) | ||
386 | 78 | |||
387 | 79 | def switch_to_favorites(self): | ||
388 | 80 | """ | ||
389 | 81 | switch to the favorite contacts view | ||
390 | 82 | """ | ||
391 | 83 | self.pointing_device.click_object(self._get_label('labelFavorite')) | ||
392 | 84 | |||
393 | 85 | def switch_to_all_contact(self): | ||
394 | 86 | """ | ||
395 | 87 | Switch to all contacts view | ||
396 | 88 | """ | ||
397 | 89 | self.pointing_device.click_object(self._get_label('labelAll')) | ||
398 | 90 | |||
399 | 91 | def are_favorites_shown(self): | ||
400 | 92 | return self.get_contact_list_view().showFavourites | ||
401 | 93 | |||
402 | 70 | @autopilot_logging.log_action(logger.info) | 94 | @autopilot_logging.log_action(logger.info) |
403 | 71 | def go_to_add_contact(self): | 95 | def go_to_add_contact(self): |
404 | 72 | """ | 96 | """ |
405 | 73 | 97 | ||
406 | === added file 'tests/autopilot/address_book_app/helpers.py' | |||
407 | --- tests/autopilot/address_book_app/helpers.py 1970-01-01 00:00:00 +0000 | |||
408 | +++ tests/autopilot/address_book_app/helpers.py 2014-03-26 22:14:30 +0000 | |||
409 | @@ -0,0 +1,74 @@ | |||
410 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
411 | 2 | # Copyright 2014 Canonical | ||
412 | 3 | # | ||
413 | 4 | # This program is free software: you can redistribute it and/or modify it | ||
414 | 5 | # under the terms of the GNU General Public License version 3, as published | ||
415 | 6 | # by the Free Software Foundation. | ||
416 | 7 | |||
417 | 8 | import subprocess | ||
418 | 9 | |||
419 | 10 | from autopilot.testcase import AutopilotTestCase | ||
420 | 11 | from autopilot.matchers import Eventually | ||
421 | 12 | from testtools.matchers import Equals | ||
422 | 13 | |||
423 | 14 | import dbus | ||
424 | 15 | |||
425 | 16 | DUMMY_BACKEND_ADDRESS = 'com.canonical.test.pim' | ||
426 | 17 | |||
427 | 18 | |||
428 | 19 | class DummyServiceBackendSetup(AutopilotTestCase): | ||
429 | 20 | |||
430 | 21 | def _set_contact_service_dummy_backend_environment_variables(self): | ||
431 | 22 | self.patch_environment( | ||
432 | 23 | 'CANONICAL_PIN_SERVICE_NAME', DUMMY_BACKEND_ADDRESS | ||
433 | 24 | ) | ||
434 | 25 | self.patch_environment( | ||
435 | 26 | 'FOLKS_BACKEND_PATH', self._get_dummy_backend_so_location() | ||
436 | 27 | ) | ||
437 | 28 | self.patch_environment('FOLKS_BACKENDS_ALLOWED', 'dummy') | ||
438 | 29 | self.patch_environment('FOLKS_PRIMARY_STORE', 'dummy') | ||
439 | 30 | |||
440 | 31 | def _get_dummy_backend_so_location(self): | ||
441 | 32 | output = subprocess.check_output( | ||
442 | 33 | ['locate', '/usr/lib', '--basename', 'dummy.so'] | ||
443 | 34 | ).split() | ||
444 | 35 | |||
445 | 36 | if len(output) is 1: | ||
446 | 37 | return output[0] | ||
447 | 38 | elif len(output) > 1: | ||
448 | 39 | for path in output: | ||
449 | 40 | if 'address-book-service' in path: | ||
450 | 41 | return path | ||
451 | 42 | else: | ||
452 | 43 | raise RuntimeError( | ||
453 | 44 | 'Dummy backend .so not found is address-book-service-dummy' | ||
454 | 45 | 'installed ?' | ||
455 | 46 | ) | ||
456 | 47 | |||
457 | 48 | def _get_address_book_service_binary_location(self): | ||
458 | 49 | output = subprocess.check_output( | ||
459 | 50 | ['locate', '/usr/lib', '--basename', 'address-book-service'] | ||
460 | 51 | ).split() | ||
461 | 52 | |||
462 | 53 | for path in output: | ||
463 | 54 | if 'address-book-service/address-book-service' in path: | ||
464 | 55 | return path | ||
465 | 56 | |||
466 | 57 | def _start_service_dummy_backend(self): | ||
467 | 58 | self.service = subprocess.Popen( | ||
468 | 59 | [self._get_address_book_service_binary_location()] | ||
469 | 60 | ) | ||
470 | 61 | self.addCleanup(self.service.kill) | ||
471 | 62 | |||
472 | 63 | self.assertThat( | ||
473 | 64 | lambda: self._is_dummy_backend_up(), Eventually(Equals(True)) | ||
474 | 65 | ) | ||
475 | 66 | |||
476 | 67 | def _is_dummy_backend_up(self): | ||
477 | 68 | interfaces = dbus.SessionBus().list_names() | ||
478 | 69 | |||
479 | 70 | return DUMMY_BACKEND_ADDRESS in interfaces | ||
480 | 71 | |||
481 | 72 | def ensure_dummy_service_backend_running(self): | ||
482 | 73 | self._set_contact_service_dummy_backend_environment_variables() | ||
483 | 74 | self._start_service_dummy_backend() | ||
484 | 0 | 75 | ||
485 | === modified file 'tests/autopilot/address_book_app/tests/__init__.py' | |||
486 | --- tests/autopilot/address_book_app/tests/__init__.py 2014-01-30 08:35:04 +0000 | |||
487 | +++ tests/autopilot/address_book_app/tests/__init__.py 2014-03-26 22:14:30 +0000 | |||
488 | @@ -18,6 +18,7 @@ | |||
489 | 18 | from testtools.matchers import Equals | 18 | from testtools.matchers import Equals |
490 | 19 | 19 | ||
491 | 20 | from address_book_app.emulators.main_window import MainWindow | 20 | from address_book_app.emulators.main_window import MainWindow |
492 | 21 | |||
493 | 21 | from ubuntuuitoolkit import emulators as toolkit_emulators | 22 | from ubuntuuitoolkit import emulators as toolkit_emulators |
494 | 22 | 23 | ||
495 | 23 | 24 | ||
496 | @@ -31,6 +32,7 @@ | |||
497 | 31 | VCARD_PATH_DEV = os.path.abspath("../data/vcard.vcf") | 32 | VCARD_PATH_DEV = os.path.abspath("../data/vcard.vcf") |
498 | 32 | ARGS = [] | 33 | ARGS = [] |
499 | 33 | PRELOAD_VCARD = False | 34 | PRELOAD_VCARD = False |
500 | 35 | QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
501 | 34 | 36 | ||
502 | 35 | def setUp(self): | 37 | def setUp(self): |
503 | 36 | self.pointing_device = toolkit_emulators.get_pointing_device() | 38 | self.pointing_device = toolkit_emulators.get_pointing_device() |
504 | @@ -45,8 +47,17 @@ | |||
505 | 45 | else: | 47 | else: |
506 | 46 | self.app_bin = AddressBookAppTestCase.DEFAULT_DEV_LOCATION | 48 | self.app_bin = AddressBookAppTestCase.DEFAULT_DEV_LOCATION |
507 | 47 | 49 | ||
509 | 48 | os.environ['QTCONTACTS_MANAGER_OVERRIDE'] = 'memory' | 50 | print "Running from: %s" % (self.app_bin) |
510 | 51 | # NOTE defeats favoriting: contacts don't show up in "Favorites" header | ||
511 | 52 | if AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY: | ||
512 | 53 | os.environ['QTCONTACTS_MANAGER_OVERRIDE'] = 'memory' | ||
513 | 54 | else: | ||
514 | 55 | try: | ||
515 | 56 | del(os.environ['QTCONTACTS_MANAGER_OVERRIDE']) | ||
516 | 57 | except KeyError: | ||
517 | 58 | pass | ||
518 | 49 | vcard_data = "" | 59 | vcard_data = "" |
519 | 60 | |||
520 | 50 | if AddressBookAppTestCase.PRELOAD_VCARD: | 61 | if AddressBookAppTestCase.PRELOAD_VCARD: |
521 | 51 | # Use vcard from source tree and fallback on installed vcard (from | 62 | # Use vcard from source tree and fallback on installed vcard (from |
522 | 52 | # address-book-app-autopilot package) | 63 | # address-book-app-autopilot package) |
523 | @@ -55,16 +66,16 @@ | |||
524 | 55 | else: | 66 | else: |
525 | 56 | vcard_data = AddressBookAppTestCase.VCARD_PATH_BIN | 67 | vcard_data = AddressBookAppTestCase.VCARD_PATH_BIN |
526 | 57 | 68 | ||
529 | 58 | os.environ["ADDRESS_BOOK_TEST_DATA"] = vcard_data | 69 | os.environ['ADDRESS_BOOK_TEST_DATA'] = vcard_data |
530 | 59 | if vcard_data != "": print "Using vcard %s" % vcard_data | 70 | if vcard_data != '': print 'Using vcard %s' % vcard_data |
531 | 60 | if os.path.exists(self.app_bin): | 71 | if os.path.exists(self.app_bin): |
533 | 61 | print "Running from: %s" % (self.app_bin) | 72 | print 'Running from: %s' % (self.app_bin) |
534 | 62 | self.launch_test_local() | 73 | self.launch_test_local() |
535 | 63 | elif os.path.exists(self.DEB_LOCALTION): | 74 | elif os.path.exists(self.DEB_LOCALTION): |
537 | 64 | print "Running from: %s" % (self.DEB_LOCALTION) | 75 | print 'Running from: %s' % (self.DEB_LOCALTION) |
538 | 65 | self.launch_test_installed() | 76 | self.launch_test_installed() |
539 | 66 | else: | 77 | else: |
541 | 67 | print "Running from click package: address-book-app" | 78 | print 'Running from click package: address-book-app' |
542 | 68 | self.launch_click_installed() | 79 | self.launch_click_installed() |
543 | 69 | 80 | ||
544 | 70 | AddressBookAppTestCase.ARGS = [] | 81 | AddressBookAppTestCase.ARGS = [] |
545 | 71 | 82 | ||
546 | === modified file 'tests/autopilot/address_book_app/tests/test_add_contact.py' | |||
547 | --- tests/autopilot/address_book_app/tests/test_add_contact.py 2014-02-28 15:36:09 +0000 | |||
548 | +++ tests/autopilot/address_book_app/tests/test_add_contact.py 2014-03-26 22:14:30 +0000 | |||
549 | @@ -20,6 +20,10 @@ | |||
550 | 20 | class TestAddContact(AddressBookAppTestCase): | 20 | class TestAddContact(AddressBookAppTestCase): |
551 | 21 | """ Tests the Add contact """ | 21 | """ Tests the Add contact """ |
552 | 22 | 22 | ||
553 | 23 | def setUp(self): | ||
554 | 24 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
555 | 25 | super(TestAddContact, self).setUp() | ||
556 | 26 | |||
557 | 23 | def test_go_to_add_contact(self): | 27 | def test_go_to_add_contact(self): |
558 | 24 | """Test to launch the add contact screen using emulator method""" | 28 | """Test to launch the add contact screen using emulator method""" |
559 | 25 | self.assertRaises( | 29 | self.assertRaises( |
560 | 26 | 30 | ||
561 | === modified file 'tests/autopilot/address_book_app/tests/test_contactlist.py' | |||
562 | --- tests/autopilot/address_book_app/tests/test_contactlist.py 2013-11-21 18:53:19 +0000 | |||
563 | +++ tests/autopilot/address_book_app/tests/test_contactlist.py 2014-03-26 22:14:30 +0000 | |||
564 | @@ -18,6 +18,10 @@ | |||
565 | 18 | class TestContactList(AddressBookAppTestCase): | 18 | class TestContactList(AddressBookAppTestCase): |
566 | 19 | """Tests the contact list features""" | 19 | """Tests the contact list features""" |
567 | 20 | 20 | ||
568 | 21 | def setUp(self): | ||
569 | 22 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
570 | 23 | super(TestContactList, self).setUp() | ||
571 | 24 | |||
572 | 21 | def test_contact_list(self): | 25 | def test_contact_list(self): |
573 | 22 | contact_list = self.main_window.get_contact_list_page() | 26 | contact_list = self.main_window.get_contact_list_page() |
574 | 23 | self.assertThat(contact_list.visible, Eventually(Equals(True))) | 27 | self.assertThat(contact_list.visible, Eventually(Equals(True))) |
575 | 24 | 28 | ||
576 | === modified file 'tests/autopilot/address_book_app/tests/test_delete_contact.py' | |||
577 | --- tests/autopilot/address_book_app/tests/test_delete_contact.py 2014-02-13 16:44:12 +0000 | |||
578 | +++ tests/autopilot/address_book_app/tests/test_delete_contact.py 2014-03-26 22:14:30 +0000 | |||
579 | @@ -40,6 +40,7 @@ | |||
580 | 40 | ] | 40 | ] |
581 | 41 | 41 | ||
582 | 42 | def setUp(self): | 42 | def setUp(self): |
583 | 43 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
584 | 43 | AddressBookAppTestCase.PRELOAD_VCARD = True | 44 | AddressBookAppTestCase.PRELOAD_VCARD = True |
585 | 44 | super(TestDeleteSelectContact, self).setUp() | 45 | super(TestDeleteSelectContact, self).setUp() |
586 | 45 | 46 | ||
587 | 46 | 47 | ||
588 | === modified file 'tests/autopilot/address_book_app/tests/test_edit_contact.py' | |||
589 | --- tests/autopilot/address_book_app/tests/test_edit_contact.py 2014-03-18 21:13:04 +0000 | |||
590 | +++ tests/autopilot/address_book_app/tests/test_edit_contact.py 2014-03-26 22:14:30 +0000 | |||
591 | @@ -17,6 +17,10 @@ | |||
592 | 17 | class TestEditContact(AddressBookAppTestCase): | 17 | class TestEditContact(AddressBookAppTestCase): |
593 | 18 | """Tests edit a contact""" | 18 | """Tests edit a contact""" |
594 | 19 | 19 | ||
595 | 20 | def setUp(self): | ||
596 | 21 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
597 | 22 | super(TestEditContact, self).setUp() | ||
598 | 23 | |||
599 | 20 | def test_add_new_phone(self): | 24 | def test_add_new_phone(self): |
600 | 21 | self.add_contact("Fulano", "de Tal", ["3321 2300"]) | 25 | self.add_contact("Fulano", "de Tal", ["3321 2300"]) |
601 | 22 | edit_page = self.edit_contact(0) | 26 | edit_page = self.edit_contact(0) |
602 | 23 | 27 | ||
603 | === added file 'tests/autopilot/address_book_app/tests/test_favorites.py' | |||
604 | --- tests/autopilot/address_book_app/tests/test_favorites.py 1970-01-01 00:00:00 +0000 | |||
605 | +++ tests/autopilot/address_book_app/tests/test_favorites.py 2014-03-26 22:14:30 +0000 | |||
606 | @@ -0,0 +1,96 @@ | |||
607 | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | ||
608 | 2 | # Copyright 2014 Canonical | ||
609 | 3 | # | ||
610 | 4 | # This program is free software: you can redistribute it and/or modify it | ||
611 | 5 | # under the terms of the GNU General Public License version 3, as published | ||
612 | 6 | # by the Free Software Foundation. | ||
613 | 7 | |||
614 | 8 | """Tests of favoriting contacts for the Addressbook App""" | ||
615 | 9 | |||
616 | 10 | from __future__ import absolute_import | ||
617 | 11 | |||
618 | 12 | import subprocess | ||
619 | 13 | |||
620 | 14 | from autopilot.introspection.dbus import StateNotFoundError | ||
621 | 15 | from autopilot.matchers import Eventually | ||
622 | 16 | from testtools.matchers import Equals | ||
623 | 17 | |||
624 | 18 | from address_book_app.helpers import DummyServiceBackendSetup | ||
625 | 19 | from address_book_app.tests import AddressBookAppTestCase | ||
626 | 20 | from address_book_app.emulators.contact_list_page import ContactListPage | ||
627 | 21 | from address_book_app.emulators.contact_view import ContactView | ||
628 | 22 | |||
629 | 23 | |||
630 | 24 | class TestFavorite(AddressBookAppTestCase, DummyServiceBackendSetup): | ||
631 | 25 | """Test for favoriting contacts""" | ||
632 | 26 | |||
633 | 27 | def setUp(self): | ||
634 | 28 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = False | ||
635 | 29 | AddressBookAppTestCase.PRELOAD_VCARD = True | ||
636 | 30 | self.ensure_dummy_service_backend_running() | ||
637 | 31 | super(TestFavorite, self).setUp() | ||
638 | 32 | |||
639 | 33 | def _add_contact_as_favorite(self, name): | ||
640 | 34 | contact_list_page = self.main_window.get_contact_list_page() | ||
641 | 35 | contact_list_page.open_contact_view_by_contact_name(name) | ||
642 | 36 | contact_view = self.main_window.get_contact_view_page() | ||
643 | 37 | contact_view.click_favorite_icon() | ||
644 | 38 | self.main_window.go_back() | ||
645 | 39 | self._ensure_favorites_shown() | ||
646 | 40 | |||
647 | 41 | return contact_list_page | ||
648 | 42 | |||
649 | 43 | def _ensure_favorites_shown(self): | ||
650 | 44 | if not self.main_window.are_favorites_shown(): | ||
651 | 45 | self.main_window.switch_to_favorites() | ||
652 | 46 | self.main_window.are_favorites_shown().wait_for(True) | ||
653 | 47 | |||
654 | 48 | def is_contact_favorite(self, name): | ||
655 | 49 | contact_list_page = self.main_window.get_contact_list_page() | ||
656 | 50 | contact_list_page.open_contact_view_by_contact_name(name) | ||
657 | 51 | |||
658 | 52 | contact_view = self.main_window.get_contact_view_page() | ||
659 | 53 | favorite_icon = contact_view.favorite_icon() | ||
660 | 54 | |||
661 | 55 | if favorite_icon.name == 'favorite-selected': | ||
662 | 56 | return True | ||
663 | 57 | else: | ||
664 | 58 | return False | ||
665 | 59 | |||
666 | 60 | def test_add_favorite(self): | ||
667 | 61 | """Ensure a contact can be made a favorite.""" | ||
668 | 62 | self._add_contact_as_favorite('teste test34') | ||
669 | 63 | |||
670 | 64 | self.assertTrue(self.is_contact_favorite('teste test34')) | ||
671 | 65 | |||
672 | 66 | def test_save_multiple_favorites(self): | ||
673 | 67 | """Ensure multiple contacts can be made favorites.""" | ||
674 | 68 | self._add_contact_as_favorite('teste test34') | ||
675 | 69 | self.assertTrue(self.is_contact_favorite('teste test34')) | ||
676 | 70 | |||
677 | 71 | self.main_window.go_back() | ||
678 | 72 | self.main_window.switch_to_all_contact() | ||
679 | 73 | |||
680 | 74 | contact_list_page = self._add_contact_as_favorite('teste teste2') | ||
681 | 75 | self.assertTrue(self.is_contact_favorite('teste teste2')) | ||
682 | 76 | |||
683 | 77 | def test_remove_favorite(self): | ||
684 | 78 | """Ensure an already favorite contact can be un-favorited.""" | ||
685 | 79 | contact_list_page = self._add_contact_as_favorite('teste test34') | ||
686 | 80 | contact_list_page.open_contact_view_by_contact_name('teste test34') | ||
687 | 81 | contact_view = self.main_window.get_contact_view_page() | ||
688 | 82 | contact_view.click_favorite_icon() | ||
689 | 83 | |||
690 | 84 | self.assertFalse(contact_list_page.get_favorite_by_name('teste test34')) | ||
691 | 85 | |||
692 | 86 | def test_delete_favorite(self): | ||
693 | 87 | """Ensure deleting a favorite contact also removes it from favorite | ||
694 | 88 | category.""" | ||
695 | 89 | contact_list_page = self._add_contact_as_favorite('teste test34') | ||
696 | 90 | contact_list_page.open_contact_view_by_contact_name('teste test34') | ||
697 | 91 | toolbar = self.main_window.open_toolbar() | ||
698 | 92 | toolbar.click_button('delete') | ||
699 | 93 | |||
700 | 94 | self.assertRaises( | ||
701 | 95 | StateNotFoundError, | ||
702 | 96 | lambda: contact_list_page.get_favorite_by_name('teste test34')) | ||
703 | 0 | 97 | ||
704 | === modified file 'tests/autopilot/address_book_app/tests/test_multiple_pick_mode.py' | |||
705 | --- tests/autopilot/address_book_app/tests/test_multiple_pick_mode.py 2013-12-13 19:31:33 +0000 | |||
706 | +++ tests/autopilot/address_book_app/tests/test_multiple_pick_mode.py 2014-03-26 22:14:30 +0000 | |||
707 | @@ -20,6 +20,7 @@ | |||
708 | 20 | 20 | ||
709 | 21 | def setUp(self): | 21 | def setUp(self): |
710 | 22 | self.ARGS.append("addressbook:///pick?single=false") | 22 | self.ARGS.append("addressbook:///pick?single=false") |
711 | 23 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
712 | 23 | AddressBookAppTestCase.PRELOAD_VCARD = True | 24 | AddressBookAppTestCase.PRELOAD_VCARD = True |
713 | 24 | super(TestMultiplePickerMode, self).setUp() | 25 | super(TestMultiplePickerMode, self).setUp() |
714 | 25 | 26 | ||
715 | 26 | 27 | ||
716 | === modified file 'tests/autopilot/address_book_app/tests/test_single_pick_mode.py' | |||
717 | --- tests/autopilot/address_book_app/tests/test_single_pick_mode.py 2013-12-13 19:31:33 +0000 | |||
718 | +++ tests/autopilot/address_book_app/tests/test_single_pick_mode.py 2014-03-26 22:14:30 +0000 | |||
719 | @@ -21,6 +21,7 @@ | |||
720 | 21 | def setUp(self): | 21 | def setUp(self): |
721 | 22 | AddressBookAppTestCase.ARGS.append("addressbook:///pick?single=true") | 22 | AddressBookAppTestCase.ARGS.append("addressbook:///pick?single=true") |
722 | 23 | AddressBookAppTestCase.PRELOAD_VCARD = True | 23 | AddressBookAppTestCase.PRELOAD_VCARD = True |
723 | 24 | AddressBookAppTestCase.QTCONTACTS_MANAGER_OVERRIDE_MEMORY = True | ||
724 | 24 | super(TestSinglePickerMode, self).setUp() | 25 | super(TestSinglePickerMode, self).setUp() |
725 | 25 | 26 | ||
726 | 26 | def test_select_single_contact(self): | 27 | def test_select_single_contact(self): |
FAILED: Continuous integration, rev:163 jenkins. qa.ubuntu. com/job/ address- book-app- ci/455/ jenkins. qa.ubuntu. com/job/ address- book-app- trusty- amd64-ci/ 165 jenkins. qa.ubuntu. com/job/ address- book-app- trusty- armhf-ci/ 165 jenkins. qa.ubuntu. com/job/ address- book-app- trusty- armhf-ci/ 165/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ address- book-app- trusty- i386-ci/ 165 jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 4001 jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/3586/ console jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-trusty/ 3493 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/4042 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/4042/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/3588 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/3588/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/5918/ console s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 4891
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/address- book-app- ci/455/ rebuild
http://