Merge lp:~renatofilho/address-book-app/autopilot-and-sdk-1.3 into lp:address-book-app
- autopilot-and-sdk-1.3
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 490 |
Proposed branch: | lp:~renatofilho/address-book-app/autopilot-and-sdk-1.3 |
Merge into: | lp:address-book-app |
Prerequisite: | lp:~fboucault/address-book-app/converged_bottom_edge |
Diff against target: |
587 lines (+126/-70) 13 files modified
src/imports/ABContactEditorPage.qml (+2/-0) src/imports/ABContactListPage.qml (+2/-0) src/imports/ABContactViewPage.qml (+4/-0) src/imports/BottomEdge.qml (+11/-1) tests/autopilot/address_book_app/__init__.py (+50/-30) tests/autopilot/address_book_app/address_book/_contact_view_page.py (+1/-7) tests/autopilot/address_book_app/address_book/_sim_card_import_page.py (+2/-2) tests/autopilot/address_book_app/pages/_ab_contact_list_page.py (+26/-7) tests/autopilot/address_book_app/tests/__init__.py (+2/-2) tests/autopilot/address_book_app/tests/test_add_contact.py (+8/-5) tests/autopilot/address_book_app/tests/test_create_new_from_uri.py (+7/-5) tests/autopilot/address_book_app/tests/test_delete_contact.py (+1/-1) tests/autopilot/address_book_app/tests/test_edit_contact.py (+10/-10) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/autopilot-and-sdk-1.3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Ubuntu Phablet Team | Pending | ||
Review via email: mp+272833@code.launchpad.net |
Commit message
Update autopilot test to new SDK 1.3
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
- 506. By Renato Araujo Oliveira Filho
-
Fix autopilot test for single column app.
- 507. By Renato Araujo Oliveira Filho
-
Fixed delete contacts autopilot test.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:506
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:507
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 508. By Renato Araujo Oliveira Filho
-
Wait contact view page became active to return it.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:508
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 509. By Renato Araujo Oliveira Filho
-
Fix edit contact test.
- 510. By Renato Araujo Oliveira Filho
-
Renamed ContactListPage 'bottomEdgePage
Loaded' to 'bottomEdgePage Opened' . Set it to true only if the botom edge page is fully loaded.
- 511. By Renato Araujo Oliveira Filho
-
More fixes for autopilot tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:510
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:511
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 512. By Renato Araujo Oliveira Filho
-
autopilot fixes.
- 513. By Renato Araujo Oliveira Filho
-
Updated autopilo tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:513
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 514. By Renato Araujo Oliveira Filho
-
Parent branch merged.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:514
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 515. By Renato Araujo Oliveira Filho
-
Update autopilot tests to use the UITK API.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:515
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 516. By Renato Araujo Oliveira Filho
-
Replaced from 'Label' to new SDK type 'UCLabel'
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:516
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'src/imports/ABContactEditorPage.qml' | |||
2 | --- src/imports/ABContactEditorPage.qml 2015-10-20 03:38:29 +0000 | |||
3 | +++ src/imports/ABContactEditorPage.qml 2015-10-20 03:38:29 +0000 | |||
4 | @@ -27,6 +27,7 @@ | |||
5 | 27 | 27 | ||
6 | 28 | head.backAction: Action { | 28 | head.backAction: Action { |
7 | 29 | objectName: "cancel" | 29 | objectName: "cancel" |
8 | 30 | name: "cancel" | ||
9 | 30 | 31 | ||
10 | 31 | text: i18n.tr("Cancel") | 32 | text: i18n.tr("Cancel") |
11 | 32 | iconName: "back" | 33 | iconName: "back" |
12 | @@ -38,6 +39,7 @@ | |||
13 | 38 | head.actions: [ | 39 | head.actions: [ |
14 | 39 | Action { | 40 | Action { |
15 | 40 | objectName: "save" | 41 | objectName: "save" |
16 | 42 | name: "save" | ||
17 | 41 | 43 | ||
18 | 42 | text: i18n.tr("Save") | 44 | text: i18n.tr("Save") |
19 | 43 | iconName: "ok" | 45 | iconName: "ok" |
20 | 44 | 46 | ||
21 | === modified file 'src/imports/ABContactListPage.qml' | |||
22 | --- src/imports/ABContactListPage.qml 2015-10-20 03:38:29 +0000 | |||
23 | +++ src/imports/ABContactListPage.qml 2015-10-20 03:38:29 +0000 | |||
24 | @@ -39,6 +39,7 @@ | |||
25 | 39 | property Page contactViewPage: null | 39 | property Page contactViewPage: null |
26 | 40 | property Page contactEditorPage: null | 40 | property Page contactEditorPage: null |
27 | 41 | 41 | ||
28 | 42 | readonly property bool bottomEdgePageOpened: bottomEdge.opened && bottomEdge.fullLoaded | ||
29 | 42 | readonly property bool isEmpty: (contactList.count === 0) | 43 | readonly property bool isEmpty: (contactList.count === 0) |
30 | 43 | readonly property bool allowToQuit: (application.callbackApplication.length > 0) | 44 | readonly property bool allowToQuit: (application.callbackApplication.length > 0) |
31 | 44 | readonly property var contactModel: contactList.listModel ? contactList.listModel : null | 45 | readonly property var contactModel: contactList.listModel ? contactList.listModel : null |
32 | @@ -574,6 +575,7 @@ | |||
33 | 574 | 575 | ||
34 | 575 | BottomEdge { | 576 | BottomEdge { |
35 | 576 | id: bottomEdge | 577 | id: bottomEdge |
36 | 578 | objectName: "bottomEdge" | ||
37 | 577 | 579 | ||
38 | 578 | anchors.fill: parent | 580 | anchors.fill: parent |
39 | 579 | contentComponent: pageStack.columns == 1 ? editorPageBottomEdge : emptyContact | 581 | contentComponent: pageStack.columns == 1 ? editorPageBottomEdge : emptyContact |
40 | 580 | 582 | ||
41 | === modified file 'src/imports/ABContactViewPage.qml' | |||
42 | --- src/imports/ABContactViewPage.qml 2015-10-20 03:38:29 +0000 | |||
43 | +++ src/imports/ABContactViewPage.qml 2015-10-20 03:38:29 +0000 | |||
44 | @@ -33,6 +33,8 @@ | |||
45 | 33 | head.actions: [ | 33 | head.actions: [ |
46 | 34 | Action { | 34 | Action { |
47 | 35 | objectName: "share" | 35 | objectName: "share" |
48 | 36 | name: "share" | ||
49 | 37 | |||
50 | 36 | text: i18n.tr("Share") | 38 | text: i18n.tr("Share") |
51 | 37 | iconName: "share" | 39 | iconName: "share" |
52 | 38 | onTriggered: { | 40 | onTriggered: { |
53 | @@ -44,6 +46,8 @@ | |||
54 | 44 | }, | 46 | }, |
55 | 45 | Action { | 47 | Action { |
56 | 46 | objectName: "edit" | 48 | objectName: "edit" |
57 | 49 | name: "edit" | ||
58 | 50 | |||
59 | 47 | text: i18n.tr("Edit") | 51 | text: i18n.tr("Edit") |
60 | 48 | iconName: "edit" | 52 | iconName: "edit" |
61 | 49 | onTriggered: { | 53 | onTriggered: { |
62 | 50 | 54 | ||
63 | === modified file 'src/imports/BottomEdge.qml' | |||
64 | --- src/imports/BottomEdge.qml 2015-10-20 03:38:29 +0000 | |||
65 | +++ src/imports/BottomEdge.qml 2015-10-20 03:38:29 +0000 | |||
66 | @@ -20,10 +20,13 @@ | |||
67 | 20 | Item { | 20 | Item { |
68 | 21 | id: bottomEdge | 21 | id: bottomEdge |
69 | 22 | 22 | ||
70 | 23 | readonly property bool fullLoaded: bottomEdgeLoader.status == Loader.Ready | ||
71 | 24 | property bool opened: false | ||
72 | 23 | property Component contentComponent | 25 | property Component contentComponent |
73 | 24 | property Item content: bottomEdgeLoader.item | 26 | property Item content: bottomEdgeLoader.item |
74 | 25 | property string iconName | 27 | property string iconName |
75 | 26 | property Item flickable | 28 | property Item flickable |
76 | 29 | |||
77 | 27 | signal openBegin | 30 | signal openBegin |
78 | 28 | signal openEnd | 31 | signal openEnd |
79 | 29 | signal clicked | 32 | signal clicked |
80 | @@ -82,6 +85,7 @@ | |||
81 | 82 | 85 | ||
82 | 83 | BottomEdgeHint { | 86 | BottomEdgeHint { |
83 | 84 | id: bottomEdgeHint | 87 | id: bottomEdgeHint |
84 | 88 | |||
85 | 85 | anchors.bottom: bottomEdgeBody.top | 89 | anchors.bottom: bottomEdgeBody.top |
86 | 86 | iconName: bottomEdge.iconName | 90 | iconName: bottomEdge.iconName |
87 | 87 | onClicked: bottomEdge.clicked() | 91 | onClicked: bottomEdge.clicked() |
88 | @@ -170,6 +174,7 @@ | |||
89 | 170 | script: { | 174 | script: { |
90 | 171 | bottomEdgeLoader.active = false; | 175 | bottomEdgeLoader.active = false; |
91 | 172 | bottomEdgeLoader.active = true; | 176 | bottomEdgeLoader.active = true; |
92 | 177 | bottomEdge.opened = false | ||
93 | 173 | } | 178 | } |
94 | 174 | } | 179 | } |
95 | 175 | } | 180 | } |
96 | @@ -200,7 +205,11 @@ | |||
97 | 200 | duration: UbuntuAnimation.FastDuration | 205 | duration: UbuntuAnimation.FastDuration |
98 | 201 | } | 206 | } |
99 | 202 | ScriptAction { | 207 | ScriptAction { |
101 | 203 | script: bottomEdge.openEnd() | 208 | script: { |
102 | 209 | bottomEdge.opened = true | ||
103 | 210 | bottomEdge.openEnd() | ||
104 | 211 | } | ||
105 | 212 | |||
106 | 204 | } | 213 | } |
107 | 205 | } | 214 | } |
108 | 206 | } | 215 | } |
109 | @@ -208,6 +217,7 @@ | |||
110 | 208 | 217 | ||
111 | 209 | MouseArea { | 218 | MouseArea { |
112 | 210 | id: bottomEdgeDragArea | 219 | id: bottomEdgeDragArea |
113 | 220 | objectName: "bottomEdgeDragArea" | ||
114 | 211 | 221 | ||
115 | 212 | property real previousY: -1 | 222 | property real previousY: -1 |
116 | 213 | property string dragDirection: "None" | 223 | property string dragDirection: "None" |
117 | 214 | 224 | ||
118 | === modified file 'tests/autopilot/address_book_app/__init__.py' | |||
119 | --- tests/autopilot/address_book_app/__init__.py 2015-10-20 03:38:29 +0000 | |||
120 | +++ tests/autopilot/address_book_app/__init__.py 2015-10-20 03:38:29 +0000 | |||
121 | @@ -32,7 +32,6 @@ | |||
122 | 32 | from address_book_app import pages | 32 | from address_book_app import pages |
123 | 33 | from address_book_app import address_book | 33 | from address_book_app import address_book |
124 | 34 | 34 | ||
125 | 35 | |||
126 | 36 | logger = logging.getLogger(__name__) | 35 | logger = logging.getLogger(__name__) |
127 | 37 | 36 | ||
128 | 38 | 37 | ||
129 | @@ -65,30 +64,18 @@ | |||
130 | 65 | # ContactListPage is the only page that can appears multiple times | 64 | # ContactListPage is the only page that can appears multiple times |
131 | 66 | # Ex.: During the pick mode we alway push a new contactListPage, to | 65 | # Ex.: During the pick mode we alway push a new contactListPage, to |
132 | 67 | # preserve the current application status. | 66 | # preserve the current application status. |
141 | 68 | contact_list_pages = self.select_many( | 67 | return self.wait_select_single(pages.ABContactListPage, |
142 | 69 | pages.ABContactListPage, objectName='contactListPage') | 68 | objectName='contactListPage', pickMode=False) |
135 | 70 | |||
136 | 71 | # alway return the page without pickMode | ||
137 | 72 | for p in contact_list_pages: | ||
138 | 73 | if not p.pickMode: | ||
139 | 74 | return p | ||
140 | 75 | return None | ||
143 | 76 | 69 | ||
144 | 77 | def get_contact_edit_page(self): | 70 | def get_contact_edit_page(self): |
145 | 78 | # We can have two contact editor page because of bottom edge page | 71 | # We can have two contact editor page because of bottom edge page |
146 | 79 | # but we will return only the active one | 72 | # but we will return only the active one |
155 | 80 | list_page = self.get_contact_list_page() | 73 | return self.wait_select_single(objectName="contactEditorPage", active=True) |
148 | 81 | list_page.bottomEdgePageLoaded.wait_for(True) | ||
149 | 82 | contact_editor_pages = self.select_many( | ||
150 | 83 | pages.ABContactEditorPage, objectName="contactEditorPage") | ||
151 | 84 | for p in contact_editor_pages: | ||
152 | 85 | if p.active: | ||
153 | 86 | return p | ||
154 | 87 | raise exceptions.StateNotFoundError('contactEditorPage not found') | ||
156 | 88 | 74 | ||
157 | 89 | def get_contact_view_page(self): | 75 | def get_contact_view_page(self): |
158 | 90 | return self.wait_select_single(pages.ABContactViewPage, | 76 | return self.wait_select_single(pages.ABContactViewPage, |
160 | 91 | objectName="contactViewPage") | 77 | objectName="contactViewPage", |
161 | 78 | active=True) | ||
162 | 92 | 79 | ||
163 | 93 | def get_contact_list_pick_page(self): | 80 | def get_contact_list_pick_page(self): |
164 | 94 | contact_list_pages = self.select_many( | 81 | contact_list_pages = self.select_many( |
165 | @@ -100,10 +87,10 @@ | |||
166 | 100 | 87 | ||
167 | 101 | def get_share_page(self): | 88 | def get_share_page(self): |
168 | 102 | return self.wait_select_single("ContactSharePage", | 89 | return self.wait_select_single("ContactSharePage", |
170 | 103 | objectName="contactSharePage") | 90 | objectName="contactSharePage", |
171 | 91 | active=True) | ||
172 | 104 | 92 | ||
173 | 105 | def start_import_contacts(self): | 93 | def start_import_contacts(self): |
174 | 106 | self.open_header() | ||
175 | 107 | view = self.get_contact_list_view() | 94 | view = self.get_contact_list_view() |
176 | 108 | if view.count > 0: | 95 | if view.count > 0: |
177 | 109 | self.click_action_button("importFromSimHeaderButton") | 96 | self.click_action_button("importFromSimHeaderButton") |
178 | @@ -114,19 +101,37 @@ | |||
179 | 114 | self.pointing_device.click_object(import_buttom) | 101 | self.pointing_device.click_object(import_buttom) |
180 | 115 | 102 | ||
181 | 116 | return self.wait_select_single(address_book.SIMCardImportPage, | 103 | return self.wait_select_single(address_book.SIMCardImportPage, |
183 | 117 | objectName="simCardImportPage") | 104 | objectName="simCardImportPage", |
184 | 105 | active=True) | ||
185 | 118 | 106 | ||
186 | 119 | def get_contact_list_view(self): | 107 | def get_contact_list_view(self): |
187 | 120 | """ | 108 | """ |
189 | 121 | Returns a ContactListView iobject for the current window | 109 | Returns a ContactListView object for the current window |
190 | 122 | """ | 110 | """ |
191 | 123 | return self.wait_select_single("ContactListView", | 111 | return self.wait_select_single("ContactListView", |
192 | 124 | objectName="contactListView") | 112 | objectName="contactListView") |
193 | 125 | 113 | ||
197 | 126 | def get_button(self, buttonName): | 114 | def get_action(self, action_name): |
198 | 127 | actionbar = self.select_single('ActionBar', objectName='headerActionBar') | 115 | actionbars = self.select_many('ActionBar', objectName='headerActionBar') |
199 | 128 | return actionbar._get_action_button(buttonName) | 116 | for actionbar in actionbars: |
200 | 117 | object_name = action_name + "_action_button" | ||
201 | 118 | try: | ||
202 | 119 | button = actionbar.select_single(objectName=object_name) | ||
203 | 120 | if button: | ||
204 | 121 | return button | ||
205 | 122 | except introspection.dbus.StateNotFoundError: | ||
206 | 123 | continue | ||
207 | 124 | return None | ||
208 | 129 | 125 | ||
209 | 126 | def click_action_button(self, action_name): | ||
210 | 127 | actionbars = self.select_many('ActionBar', objectName='headerActionBar') | ||
211 | 128 | for actionbar in actionbars: | ||
212 | 129 | try: | ||
213 | 130 | actionbar.click_action_button(action_name) | ||
214 | 131 | return | ||
215 | 132 | except ubuntuuitoolkit.ToolkitException: | ||
216 | 133 | continue | ||
217 | 134 | raise exceptions.StateNotFoundError('Action %s not found.' % action_name) | ||
218 | 130 | 135 | ||
219 | 131 | def open_header(self): | 136 | def open_header(self): |
220 | 132 | header = self.get_header() | 137 | header = self.get_header() |
221 | @@ -153,22 +158,36 @@ | |||
222 | 153 | """ | 158 | """ |
223 | 154 | Press the 'Cancel' button | 159 | Press the 'Cancel' button |
224 | 155 | """ | 160 | """ |
227 | 156 | header = self.open_header() | 161 | buttons = self.select_many(objectName='customBackButton') |
228 | 157 | header.click_custom_back_button() | 162 | for button in buttons: |
229 | 163 | if button.enabled and button.visible: | ||
230 | 164 | self.pointing_device.click_object(button) | ||
231 | 165 | return | ||
232 | 166 | |||
233 | 167 | #self.click_action_button("customBackButton") | ||
234 | 158 | 168 | ||
235 | 159 | def save(self): | 169 | def save(self): |
236 | 160 | """ | 170 | """ |
237 | 161 | Press the 'Save' button | 171 | Press the 'Save' button |
238 | 162 | """ | 172 | """ |
239 | 163 | bottom_swipe_page = self.get_contact_list_page() | ||
240 | 164 | self.click_action_button("save") | 173 | self.click_action_button("save") |
242 | 165 | bottom_swipe_page.isCollapsed.wait_for(True) | 174 | |
243 | 175 | def edit(self): | ||
244 | 176 | """ | ||
245 | 177 | Press the 'Save' button | ||
246 | 178 | """ | ||
247 | 179 | self.click_action_button("edit") | ||
248 | 180 | |||
249 | 181 | def delete(self): | ||
250 | 182 | """ | ||
251 | 183 | Press the 'Delete' button | ||
252 | 184 | """ | ||
253 | 185 | self.click_action_button("delete") | ||
254 | 166 | 186 | ||
255 | 167 | def confirm_import(self): | 187 | def confirm_import(self): |
256 | 168 | """ | 188 | """ |
257 | 169 | Press the 'confirm' button | 189 | Press the 'confirm' button |
258 | 170 | """ | 190 | """ |
259 | 171 | self.open_header() | ||
260 | 172 | self.click_action_button("confirmImport") | 191 | self.click_action_button("confirmImport") |
261 | 173 | 192 | ||
262 | 174 | def get_toolbar(self): | 193 | def get_toolbar(self): |
263 | @@ -182,4 +201,5 @@ | |||
264 | 182 | """ | 201 | """ |
265 | 183 | bottom_swipe_page = self.get_contact_list_page() | 202 | bottom_swipe_page = self.get_contact_list_page() |
266 | 184 | bottom_swipe_page.reveal_bottom_edge_page() | 203 | bottom_swipe_page.reveal_bottom_edge_page() |
267 | 204 | |||
268 | 185 | return self.get_contact_edit_page() | 205 | return self.get_contact_edit_page() |
269 | 186 | 206 | ||
270 | === modified file 'tests/autopilot/address_book_app/address_book/_contact_view_page.py' | |||
271 | --- tests/autopilot/address_book_app/address_book/_contact_view_page.py 2015-05-11 14:21:03 +0000 | |||
272 | +++ tests/autopilot/address_book_app/address_book/_contact_view_page.py 2015-10-20 03:38:29 +0000 | |||
273 | @@ -19,10 +19,4 @@ | |||
274 | 19 | 19 | ||
275 | 20 | class ContactViewPage(_common.PageWithHeader): | 20 | class ContactViewPage(_common.PageWithHeader): |
276 | 21 | """Autopilot helper for the ContactView page.""" | 21 | """Autopilot helper for the ContactView page.""" |
284 | 22 | 22 | pass | |
278 | 23 | def go_to_edit_contact(self): | ||
279 | 24 | self.get_header().click_action_button('edit') | ||
280 | 25 | return self.get_root_instance().select_single( | ||
281 | 26 | _contact_editor_page.ContactEditorPage, | ||
282 | 27 | objectName='contactEditorPage', | ||
283 | 28 | active=True) | ||
285 | 29 | 23 | ||
286 | === modified file 'tests/autopilot/address_book_app/address_book/_sim_card_import_page.py' | |||
287 | --- tests/autopilot/address_book_app/address_book/_sim_card_import_page.py 2015-05-12 15:43:25 +0000 | |||
288 | +++ tests/autopilot/address_book_app/address_book/_sim_card_import_page.py 2015-10-20 03:38:29 +0000 | |||
289 | @@ -72,7 +72,7 @@ | |||
290 | 72 | """Return a list with the names of the contacts.""" | 72 | """Return a list with the names of the contacts.""" |
291 | 73 | contact_delegates = self._get_sorted_contact_delegates() | 73 | contact_delegates = self._get_sorted_contact_delegates() |
292 | 74 | name_labels = [ | 74 | name_labels = [ |
294 | 75 | delegate.select_single('Label', objectName='nameLabel') for | 75 | delegate.select_single('UCLabel', objectName='nameLabel') for |
295 | 76 | delegate in contact_delegates | 76 | delegate in contact_delegates |
296 | 77 | ] | 77 | ] |
297 | 78 | return [label.text for label in name_labels] | 78 | return [label.text for label in name_labels] |
298 | @@ -96,6 +96,6 @@ | |||
299 | 96 | contact = self._get_contact_delegate(index) | 96 | contact = self._get_contact_delegate(index) |
300 | 97 | self.pointing_device.click_object(contact) | 97 | self.pointing_device.click_object(contact) |
301 | 98 | contacts.append(contact.select_single( | 98 | contacts.append(contact.select_single( |
303 | 99 | 'Label', objectName='nameLabel').text) | 99 | 'UCLabel', objectName='nameLabel').text) |
304 | 100 | 100 | ||
305 | 101 | return contacts | 101 | return contacts |
306 | 102 | 102 | ||
307 | === modified file 'tests/autopilot/address_book_app/pages/_ab_contact_list_page.py' | |||
308 | --- tests/autopilot/address_book_app/pages/_ab_contact_list_page.py 2015-05-13 13:25:18 +0000 | |||
309 | +++ tests/autopilot/address_book_app/pages/_ab_contact_list_page.py 2015-10-20 03:38:29 +0000 | |||
310 | @@ -21,9 +21,9 @@ | |||
311 | 21 | 21 | ||
312 | 22 | import autopilot.logging | 22 | import autopilot.logging |
313 | 23 | import ubuntuuitoolkit | 23 | import ubuntuuitoolkit |
314 | 24 | |||
315 | 25 | import address_book_app.address_book as address_book | 24 | import address_book_app.address_book as address_book |
316 | 26 | 25 | ||
317 | 26 | from autopilot.introspection import dbus | ||
318 | 27 | from address_book_app.pages import ABContactViewPage | 27 | from address_book_app.pages import ABContactViewPage |
319 | 28 | 28 | ||
320 | 29 | 29 | ||
321 | @@ -32,7 +32,7 @@ | |||
322 | 32 | log_action_debug = autopilot.logging.log_action(logging.debug) | 32 | log_action_debug = autopilot.logging.log_action(logging.debug) |
323 | 33 | 33 | ||
324 | 34 | 34 | ||
326 | 35 | class ABContactListPage(address_book.PageWithHeader, address_book.PageWithBottomEdge): | 35 | class ABContactListPage(address_book.PageWithHeader): |
327 | 36 | 36 | ||
328 | 37 | """Autopilot helper for the Contact List page.""" | 37 | """Autopilot helper for the Contact List page.""" |
329 | 38 | 38 | ||
330 | @@ -46,8 +46,10 @@ | |||
331 | 46 | """ | 46 | """ |
332 | 47 | contact_delegate = self._get_contact_delegate(index) | 47 | contact_delegate = self._get_contact_delegate(index) |
333 | 48 | self.pointing_device.click_object(contact_delegate) | 48 | self.pointing_device.click_object(contact_delegate) |
334 | 49 | # WORKAROUND: give some time to the view became available | ||
335 | 50 | time.sleep(5.0) | ||
336 | 49 | return self.get_root_instance().select_single( | 51 | return self.get_root_instance().select_single( |
338 | 50 | ABContactViewPage, objectName='contactViewPage') | 52 | ABContactViewPage, objectName='contactViewPage', active=True) |
339 | 51 | 53 | ||
340 | 52 | def _get_contact_delegate(self, index): | 54 | def _get_contact_delegate(self, index): |
341 | 53 | contact_delegates = self._get_sorted_contact_delegates() | 55 | contact_delegates = self._get_sorted_contact_delegates() |
342 | @@ -108,9 +110,9 @@ | |||
343 | 108 | 'ContactListView', objectName='contactListView') | 110 | 'ContactListView', objectName='contactListView') |
344 | 109 | 111 | ||
345 | 110 | @log_action_info | 112 | @log_action_info |
349 | 111 | def delete_selected_contacts(self): | 113 | def delete_selected_contacts(self, main_window): |
350 | 112 | self.get_header().click_action_button('delete') | 114 | main_window.delete() |
351 | 113 | self.isCollapsed.wait_for(True) | 115 | self.bottomEdgePageOpened.wait_for(False) |
352 | 114 | dialog = self.get_root_instance().wait_select_single( | 116 | dialog = self.get_root_instance().wait_select_single( |
353 | 115 | address_book.RemoveContactsDialog, objectName='removeContactsDialog') | 117 | address_book.RemoveContactsDialog, objectName='removeContactsDialog') |
354 | 116 | dialog.confirm_removal() | 118 | dialog.confirm_removal() |
355 | @@ -119,7 +121,7 @@ | |||
356 | 119 | """Return a list with the names of the contacts.""" | 121 | """Return a list with the names of the contacts.""" |
357 | 120 | contact_delegates = self._get_sorted_contact_delegates() | 122 | contact_delegates = self._get_sorted_contact_delegates() |
358 | 121 | name_labels = [ | 123 | name_labels = [ |
360 | 122 | delegate.select_single('Label', objectName='nameLabel') for | 124 | delegate.select_single('UCLabel', objectName='nameLabel') for |
361 | 123 | delegate in contact_delegates | 125 | delegate in contact_delegates |
362 | 124 | ] | 126 | ] |
363 | 125 | return [label.text for label in name_labels] | 127 | return [label.text for label in name_labels] |
364 | @@ -136,3 +138,20 @@ | |||
365 | 136 | objectName='contactListView.importFromSimCardButton') | 138 | objectName='contactListView.importFromSimCardButton') |
366 | 137 | return import_from_sim_button.visible | 139 | return import_from_sim_button.visible |
367 | 138 | 140 | ||
368 | 141 | def reveal_bottom_edge_page(self): | ||
369 | 142 | """Bring the bottom edge page to the screen""" | ||
370 | 143 | self.bottomEdgePageOpened.wait_for(False) | ||
371 | 144 | try: | ||
372 | 145 | action_item = self.wait_select_single(objectName='bottomEdgeDragArea') | ||
373 | 146 | action_item.enabled.wait_for(True) | ||
374 | 147 | start_x = (action_item.globalRect.x + | ||
375 | 148 | (action_item.globalRect.width * 0.5)) | ||
376 | 149 | start_y = action_item.globalRect.y + (action_item.height * 0.2) | ||
377 | 150 | stop_y = start_y - (self.height * 0.7) | ||
378 | 151 | self.pointing_device.drag( | ||
379 | 152 | start_x, start_y, start_x, stop_y, rate=2) | ||
380 | 153 | #self pointer became invalid at this point | ||
381 | 154 | #self.bottomEdgePageOpened.wait_for(True) | ||
382 | 155 | except dbus.StateNotFoundError: | ||
383 | 156 | logger.error('ButtomEdge element not found.') | ||
384 | 157 | raise | ||
385 | 139 | 158 | ||
386 | === modified file 'tests/autopilot/address_book_app/tests/__init__.py' | |||
387 | --- tests/autopilot/address_book_app/tests/__init__.py 2015-04-14 22:19:01 +0000 | |||
388 | +++ tests/autopilot/address_book_app/tests/__init__.py 2015-10-20 03:38:29 +0000 | |||
389 | @@ -169,12 +169,12 @@ | |||
390 | 169 | list_page = self.main_window.get_contact_list_page() | 169 | list_page = self.main_window.get_contact_list_page() |
391 | 170 | list_page.open_contact(index) | 170 | list_page.open_contact(index) |
392 | 171 | 171 | ||
393 | 172 | self.assertThat(list_page.visible, Eventually(Equals(False))) | ||
394 | 173 | view_page = self.main_window.get_contact_view_page() | 172 | view_page = self.main_window.get_contact_view_page() |
395 | 174 | self.assertThat(view_page.visible, Eventually(Equals(True))) | 173 | self.assertThat(view_page.visible, Eventually(Equals(True))) |
396 | 175 | 174 | ||
397 | 176 | # Edit contact | 175 | # Edit contact |
399 | 177 | edit_page = view_page.go_to_edit_contact() | 176 | self.main_window.edit() |
400 | 177 | edit_page = self.main_window.get_contact_edit_page() | ||
401 | 178 | self.assertThat(edit_page.visible, Eventually(Equals(True))) | 178 | self.assertThat(edit_page.visible, Eventually(Equals(True))) |
402 | 179 | 179 | ||
403 | 180 | return edit_page | 180 | return edit_page |
404 | 181 | 181 | ||
405 | === modified file 'tests/autopilot/address_book_app/tests/test_add_contact.py' | |||
406 | --- tests/autopilot/address_book_app/tests/test_add_contact.py 2015-05-12 15:43:25 +0000 | |||
407 | +++ tests/autopilot/address_book_app/tests/test_add_contact.py 2015-10-20 03:38:29 +0000 | |||
408 | @@ -36,14 +36,17 @@ | |||
409 | 36 | contact_editor = self.app.main_window.go_to_add_contact() | 36 | contact_editor = self.app.main_window.go_to_add_contact() |
410 | 37 | 37 | ||
411 | 38 | # Check if the contact list disapear and contact editor appears | 38 | # Check if the contact list disapear and contact editor appears |
413 | 39 | self.assertThat(list_page.visible, Eventually(Equals(False))) | 39 | #FIXME: list_page became an invalid pointer after push a new page |
414 | 40 | #self.assertThat(list_page.bottomEdgePageOpened, Eventually(Equals(True))) | ||
415 | 40 | self.assertThat(contact_editor.visible, Eventually(Equals(True))) | 41 | self.assertThat(contact_editor.visible, Eventually(Equals(True))) |
416 | 42 | self.assertThat(contact_editor.active, Eventually(Equals(True))) | ||
417 | 41 | 43 | ||
418 | 42 | # cancel new contact without save | 44 | # cancel new contact without save |
419 | 43 | self.app.main_window.cancel() | 45 | self.app.main_window.cancel() |
420 | 44 | 46 | ||
421 | 45 | # Check if the contact list is visible again | 47 | # Check if the contact list is visible again |
422 | 46 | self.assertThat(list_page.visible, Eventually(Equals(True))) | 48 | self.assertThat(list_page.visible, Eventually(Equals(True))) |
423 | 49 | self.assertThat(list_page.bottomEdgePageOpened, Eventually(Equals(False))) | ||
424 | 47 | 50 | ||
425 | 48 | # Check if the contact list still empty | 51 | # Check if the contact list still empty |
426 | 49 | list_view = self.app.main_window.get_contact_list_view() | 52 | list_view = self.app.main_window.get_contact_list_view() |
427 | @@ -115,11 +118,11 @@ | |||
428 | 115 | # Check if they have the correct label | 118 | # Check if they have the correct label |
429 | 116 | for idx in range(3): | 119 | for idx in range(3): |
430 | 117 | email_type = view_page.select_single( | 120 | email_type = view_page.select_single( |
432 | 118 | "Label", | 121 | "UCLabel", |
433 | 119 | objectName="type_email_" + str(idx)) | 122 | objectName="type_email_" + str(idx)) |
434 | 120 | 123 | ||
435 | 121 | email_label = view_page.select_single( | 124 | email_label = view_page.select_single( |
437 | 122 | "Label", | 125 | "UCLabel", |
438 | 123 | objectName="label_emailAddress_" + str(idx) + ".0") | 126 | objectName="label_emailAddress_" + str(idx) + ".0") |
439 | 124 | 127 | ||
440 | 125 | self.assertThat(emails[email_label.text], Equals(email_type.text)) | 128 | self.assertThat(emails[email_label.text], Equals(email_type.text)) |
441 | @@ -166,11 +169,11 @@ | |||
442 | 166 | # Check if they have the correct label | 169 | # Check if they have the correct label |
443 | 167 | for idx in range(5): | 170 | for idx in range(5): |
444 | 168 | phone_type = view_page.select_single( | 171 | phone_type = view_page.select_single( |
446 | 169 | "Label", | 172 | "UCLabel", |
447 | 170 | objectName="type_phoneNumber_" + str(idx)) | 173 | objectName="type_phoneNumber_" + str(idx)) |
448 | 171 | 174 | ||
449 | 172 | phone_label = view_page.select_single( | 175 | phone_label = view_page.select_single( |
451 | 173 | "Label", | 176 | "UCLabel", |
452 | 174 | objectName="label_phoneNumber_" + str(idx) + ".0") | 177 | objectName="label_phoneNumber_" + str(idx) + ".0") |
453 | 175 | 178 | ||
454 | 176 | self.assertThat(phones[phone_label.text], Equals(phone_type.text)) | 179 | self.assertThat(phones[phone_label.text], Equals(phone_type.text)) |
455 | 177 | 180 | ||
456 | === modified file 'tests/autopilot/address_book_app/tests/test_create_new_from_uri.py' | |||
457 | --- tests/autopilot/address_book_app/tests/test_create_new_from_uri.py 2014-09-02 19:23:05 +0000 | |||
458 | +++ tests/autopilot/address_book_app/tests/test_create_new_from_uri.py 2015-10-20 03:38:29 +0000 | |||
459 | @@ -23,16 +23,17 @@ | |||
460 | 23 | 23 | ||
461 | 24 | def test_save_new_contact(self): | 24 | def test_save_new_contact(self): |
462 | 25 | list_page = self.app.main_window.get_contact_list_page() | 25 | list_page = self.app.main_window.get_contact_list_page() |
464 | 26 | list_page.isReady.wait_for(True) | 26 | #FIXME: contacts list object became invalid after push a new page |
465 | 27 | #list_page.bottomEdgePageOpened.wait_for(True) | ||
466 | 27 | 28 | ||
467 | 28 | edit_page = self.app.main_window.get_contact_edit_page() | 29 | edit_page = self.app.main_window.get_contact_edit_page() |
468 | 29 | self.assertThat(edit_page.visible, Eventually(Equals(True))) | 30 | self.assertThat(edit_page.visible, Eventually(Equals(True))) |
469 | 30 | 31 | ||
470 | 31 | # add name to the contact | 32 | # add name to the contact |
472 | 32 | firstNameField = self.app.main_window.wait_select_single( | 33 | firstNameField = edit_page.wait_select_single( |
473 | 33 | "TextInputDetail", | 34 | "TextInputDetail", |
474 | 34 | objectName="firstName") | 35 | objectName="firstName") |
476 | 35 | lastNameField = self.app.main_window.wait_select_single( | 36 | lastNameField = edit_page.wait_select_single( |
477 | 36 | "TextInputDetail", | 37 | "TextInputDetail", |
478 | 37 | objectName="lastName") | 38 | objectName="lastName") |
479 | 38 | 39 | ||
480 | @@ -43,6 +44,7 @@ | |||
481 | 43 | self.app.main_window.save() | 44 | self.app.main_window.save() |
482 | 44 | 45 | ||
483 | 45 | # open contact view | 46 | # open contact view |
484 | 47 | list_page = self.app.main_window.get_contact_list_page() | ||
485 | 46 | list_page.open_contact(0) | 48 | list_page.open_contact(0) |
486 | 47 | view_page = self.app.main_window.get_contact_view_page() | 49 | view_page = self.app.main_window.get_contact_view_page() |
487 | 48 | self.assertThat(view_page.visible, Eventually(Equals(True))) | 50 | self.assertThat(view_page.visible, Eventually(Equals(True))) |
488 | @@ -53,10 +55,10 @@ | |||
489 | 53 | objectName="phones") | 55 | objectName="phones") |
490 | 54 | self.assertThat(phone_group.detailsCount, Eventually(Equals(1))) | 56 | self.assertThat(phone_group.detailsCount, Eventually(Equals(1))) |
491 | 55 | phone_type = view_page.select_single( | 57 | phone_type = view_page.select_single( |
493 | 56 | "Label", | 58 | "UCLabel", |
494 | 57 | objectName="type_phoneNumber_0") | 59 | objectName="type_phoneNumber_0") |
495 | 58 | phone_label = view_page.select_single( | 60 | phone_label = view_page.select_single( |
497 | 59 | "Label", | 61 | "UCLabel", |
498 | 60 | objectName="label_phoneNumber_0.0") | 62 | objectName="label_phoneNumber_0.0") |
499 | 61 | self.assertThat(phone_label.text, Eventually(Equals("1234567890"))) | 63 | self.assertThat(phone_label.text, Eventually(Equals("1234567890"))) |
500 | 62 | self.assertThat(phone_type.text, Eventually(Equals("Mobile"))) | 64 | self.assertThat(phone_type.text, Eventually(Equals("Mobile"))) |
501 | 63 | 65 | ||
502 | === modified file 'tests/autopilot/address_book_app/tests/test_delete_contact.py' | |||
503 | --- tests/autopilot/address_book_app/tests/test_delete_contact.py 2014-09-02 19:23:05 +0000 | |||
504 | +++ tests/autopilot/address_book_app/tests/test_delete_contact.py 2015-10-20 03:38:29 +0000 | |||
505 | @@ -69,6 +69,6 @@ | |||
506 | 69 | if self.action == "cancel": | 69 | if self.action == "cancel": |
507 | 70 | self.app.main_window.cancel() | 70 | self.app.main_window.cancel() |
508 | 71 | elif self.action == "delete": | 71 | elif self.action == "delete": |
510 | 72 | list_page.delete_selected_contacts() | 72 | list_page.delete_selected_contacts(self.app.main_window) |
511 | 73 | 73 | ||
512 | 74 | self.assertEqual(list_page.get_contacts(), self.expected_result) | 74 | self.assertEqual(list_page.get_contacts(), self.expected_result) |
513 | 75 | 75 | ||
514 | === modified file 'tests/autopilot/address_book_app/tests/test_edit_contact.py' | |||
515 | --- tests/autopilot/address_book_app/tests/test_edit_contact.py 2015-05-12 15:43:25 +0000 | |||
516 | +++ tests/autopilot/address_book_app/tests/test_edit_contact.py 2015-10-20 03:38:29 +0000 | |||
517 | @@ -59,7 +59,7 @@ | |||
518 | 59 | 59 | ||
519 | 60 | # check if the new value is correct | 60 | # check if the new value is correct |
520 | 61 | phone_label_1 = view_page.select_single( | 61 | phone_label_1 = view_page.select_single( |
522 | 62 | "Label", | 62 | "UCLabel", |
523 | 63 | objectName="label_phoneNumber_1.0") | 63 | objectName="label_phoneNumber_1.0") |
524 | 64 | self.assertThat(phone_label_1.text, | 64 | self.assertThat(phone_label_1.text, |
525 | 65 | Eventually(Equals(self.PHONE_NUMBERS[1]))) | 65 | Eventually(Equals(self.PHONE_NUMBERS[1]))) |
526 | @@ -89,14 +89,14 @@ | |||
527 | 89 | 89 | ||
528 | 90 | # check if we have onlye one phone | 90 | # check if we have onlye one phone |
529 | 91 | view_page = list_page.open_contact(0) | 91 | view_page = list_page.open_contact(0) |
531 | 92 | phone_group = view_page.select_single( | 92 | phone_group = self.main_window.wait_select_single( |
532 | 93 | "ContactDetailGroupWithTypeView", | 93 | "ContactDetailGroupWithTypeView", |
533 | 94 | objectName="phones") | 94 | objectName="phones") |
534 | 95 | self.assertThat(phone_group.detailsCount, Eventually(Equals(1))) | 95 | self.assertThat(phone_group.detailsCount, Eventually(Equals(1))) |
535 | 96 | 96 | ||
536 | 97 | # check if the new value is correct | 97 | # check if the new value is correct |
539 | 98 | phone_label_1 = view_page.select_single( | 98 | phone_label_1 = phone_group.wait_select_single( |
540 | 99 | "Label", | 99 | "UCLabel", |
541 | 100 | objectName="label_phoneNumber_0.0") | 100 | objectName="label_phoneNumber_0.0") |
542 | 101 | self.assertThat(phone_label_1.text, | 101 | self.assertThat(phone_label_1.text, |
543 | 102 | Eventually(Equals(self.PHONE_NUMBERS[1]))) | 102 | Eventually(Equals(self.PHONE_NUMBERS[1]))) |
544 | @@ -119,14 +119,14 @@ | |||
545 | 119 | self.assertThat(view_page.visible, Eventually(Equals(True))) | 119 | self.assertThat(view_page.visible, Eventually(Equals(True))) |
546 | 120 | 120 | ||
547 | 121 | # check if we have a new email | 121 | # check if we have a new email |
549 | 122 | email_group = view_page.select_single( | 122 | email_group = self.main_window.select_single( |
550 | 123 | "ContactDetailGroupWithTypeView", | 123 | "ContactDetailGroupWithTypeView", |
551 | 124 | objectName="emails") | 124 | objectName="emails") |
552 | 125 | self.assertThat(email_group.detailsCount, Eventually(Equals(1))) | 125 | self.assertThat(email_group.detailsCount, Eventually(Equals(1))) |
553 | 126 | 126 | ||
554 | 127 | # check if the new value is correct | 127 | # check if the new value is correct |
557 | 128 | email_label_1 = view_page.select_single( | 128 | email_label_1 = email_group.select_single( |
558 | 129 | "Label", | 129 | "UCLabel", |
559 | 130 | objectName="label_emailAddress_0.0") | 130 | objectName="label_emailAddress_0.0") |
560 | 131 | self.assertThat(email_label_1.text, | 131 | self.assertThat(email_label_1.text, |
561 | 132 | Eventually(Equals("fulano@internet.com.br"))) | 132 | Eventually(Equals("fulano@internet.com.br"))) |
562 | @@ -146,7 +146,7 @@ | |||
563 | 146 | 146 | ||
564 | 147 | # check if the email list is empty | 147 | # check if the email list is empty |
565 | 148 | view_page = self.app.main_window.get_contact_view_page() | 148 | view_page = self.app.main_window.get_contact_view_page() |
567 | 149 | emails_group = view_page.select_single( | 149 | emails_group = self.main_window.select_single( |
568 | 150 | "ContactDetailGroupWithTypeView", | 150 | "ContactDetailGroupWithTypeView", |
569 | 151 | objectName="emails") | 151 | objectName="emails") |
570 | 152 | self.assertThat(emails_group.detailsCount, Eventually(Equals(0))) | 152 | self.assertThat(emails_group.detailsCount, Eventually(Equals(0))) |
571 | @@ -168,7 +168,7 @@ | |||
572 | 168 | 168 | ||
573 | 169 | # check if is possible to save a contact without name | 169 | # check if is possible to save a contact without name |
574 | 170 | self.app.main_window.save() | 170 | self.app.main_window.save() |
576 | 171 | accept_button = self.app.main_window.get_button("save") | 171 | accept_button = self.app.main_window.get_action("save") |
577 | 172 | self.assertThat(accept_button.enabled, Eventually(Equals(False))) | 172 | self.assertThat(accept_button.enabled, Eventually(Equals(False))) |
578 | 173 | 173 | ||
579 | 174 | # Cancel edit | 174 | # Cancel edit |
580 | @@ -213,6 +213,6 @@ | |||
581 | 213 | 213 | ||
582 | 214 | # check if the type was saved correct | 214 | # check if the type was saved correct |
583 | 215 | im_type = view_page.select_single( | 215 | im_type = view_page.select_single( |
585 | 216 | "Label", | 216 | "UCLabel", |
586 | 217 | objectName="type_onlineAccount_0") | 217 | objectName="type_onlineAccount_0") |
587 | 218 | self.assertThat(im_type.text, Eventually(Equals("Aim"))) | 218 | self.assertThat(im_type.text, Eventually(Equals("Aim"))) |
FAILED: Continuous integration, rev:505 jenkins. qa.ubuntu. com/job/ address- book-app- ci/939/ jenkins. qa.ubuntu. com/job/ address- book-app- vivid-i386- ci/242 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 4420 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-mako/ 3596 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 4417 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 4417/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 23774
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/address- book-app- ci/939/ rebuild
http://