Merge lp:~bfiller/gallery-app/gallery-app-share-handler into lp:gallery-app
- gallery-app-share-handler
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Bill Filler |
Approved revision: | 933 |
Merged at revision: | 1008 |
Proposed branch: | lp:~bfiller/gallery-app/gallery-app-share-handler |
Merge into: | lp:gallery-app |
Diff against target: |
357 lines (+80/-96) 4 files modified
po/gallery-app.pot (+33/-37) rc/qml/MediaViewer/MediaViewer.qml (+25/-55) tests/autopilot/gallery_app/emulators/photo_viewer.py (+9/-4) tests/autopilot/gallery_app/tests/test_photo_viewer.py (+13/-0) |
To merge this branch: | bzr merge lp:~bfiller/gallery-app/gallery-app-share-handler |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bill Filler (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+225355@code.launchpad.net |
This proposal supersedes a proposal from 2014-06-20.
Commit message
Switch to using the content-hub for sharing. When selecting the share action, the ContentPeerPicker will be shown with a list of apps that provide sharing.
Description of the change
Switch to using the content-hub for sharing. When selecting the share action, the ContentPeerPicker will be shown with a list of apps that provide sharing.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:929
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:931
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 932. By Bill Filler
-
fix import
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:932
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 933. By Bill Filler
-
fix test
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:933
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Bill Filler (bfiller) wrote : | # |
went through the test plan, all working
Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
yes
Did you successfully run all tests found in your component's Test Plan (https:/
yes
Did CI run pass? If not, please explain why.
yes
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
yes
Preview Diff
1 | === modified file 'po/gallery-app.pot' | |||
2 | --- po/gallery-app.pot 2014-05-09 19:52:57 +0000 | |||
3 | +++ po/gallery-app.pot 2014-07-02 22:11:28 +0000 | |||
4 | @@ -8,7 +8,7 @@ | |||
5 | 8 | msgstr "" | 8 | msgstr "" |
6 | 9 | "Project-Id-Version: gallery-app\n" | 9 | "Project-Id-Version: gallery-app\n" |
7 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
9 | 11 | "POT-Creation-Date: 2014-05-09 16:45-0300\n" | 11 | "POT-Creation-Date: 2014-06-05 11:23-0400\n" |
10 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
11 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
13 | @@ -17,7 +17,7 @@ | |||
14 | 17 | "Content-Type: text/plain; charset=UTF-8\n" | 17 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 18 | "Content-Transfer-Encoding: 8bit\n" | 18 | "Content-Transfer-Encoding: 8bit\n" |
16 | 19 | 19 | ||
18 | 20 | #: desktop/gallery-app.desktop.in:3 rc/qml/MediaViewer/PopupPhotoViewer.qml:65 | 20 | #: desktop/gallery-app.desktop.in:3 rc/qml/MediaViewer/PopupPhotoViewer.qml:64 |
19 | 21 | msgid "Gallery" | 21 | msgid "Gallery" |
20 | 22 | msgstr "" | 22 | msgstr "" |
21 | 23 | 23 | ||
22 | @@ -34,16 +34,16 @@ | |||
23 | 34 | msgstr "" | 34 | msgstr "" |
24 | 35 | 35 | ||
25 | 36 | #: rc/qml/AlbumEditor/AlbumEditMenu.qml:50 | 36 | #: rc/qml/AlbumEditor/AlbumEditMenu.qml:50 |
30 | 37 | #: rc/qml/AlbumViewer/AlbumViewer.qml:439 | 37 | #: rc/qml/AlbumViewer/AlbumViewer.qml:438 |
31 | 38 | #: rc/qml/MediaViewer/MediaViewer.qml:488 | 38 | #: rc/qml/MediaViewer/MediaViewer.qml:479 |
32 | 39 | #: rc/qml/MediaViewer/MediaViewer.qml:494 | 39 | #: rc/qml/MediaViewer/MediaViewer.qml:485 |
33 | 40 | #: rc/qml/MediaViewer/MediaViewer.qml:548 rc/qml/Utility/EditingHUD.qml:67 | 40 | #: rc/qml/MediaViewer/MediaViewer.qml:538 rc/qml/Utility/EditingHUD.qml:67 |
34 | 41 | #: rc/qml/Utility/SelectionToolbarAction.qml:51 | 41 | #: rc/qml/Utility/SelectionToolbarAction.qml:51 |
35 | 42 | msgid "Delete" | 42 | msgid "Delete" |
36 | 43 | msgstr "" | 43 | msgstr "" |
37 | 44 | 44 | ||
38 | 45 | #: rc/qml/AlbumEditor/AlbumEditor.qml:40 | 45 | #: rc/qml/AlbumEditor/AlbumEditor.qml:40 |
40 | 46 | #: rc/qml/Components/MediaSelector.qml:90 rc/qml/PickerScreen.qml:114 | 46 | #: rc/qml/Components/MediaSelector.qml:92 rc/qml/PickerScreen.qml:114 |
41 | 47 | #: rc/qml/Utility/SelectionToolbarAction.qml:66 | 47 | #: rc/qml/Utility/SelectionToolbarAction.qml:66 |
42 | 48 | msgid "Cancel" | 48 | msgid "Cancel" |
43 | 49 | msgstr "" | 49 | msgstr "" |
44 | @@ -68,42 +68,42 @@ | |||
45 | 68 | msgid "Red" | 68 | msgid "Red" |
46 | 69 | msgstr "" | 69 | msgstr "" |
47 | 70 | 70 | ||
49 | 71 | #: rc/qml/AlbumViewer/AlbumViewer.qml:84 | 71 | #: rc/qml/AlbumViewer/AlbumViewer.qml:90 |
50 | 72 | msgid "Album" | 72 | msgid "Album" |
51 | 73 | msgstr "" | 73 | msgstr "" |
52 | 74 | 74 | ||
54 | 75 | #: rc/qml/AlbumViewer/AlbumViewer.qml:428 | 75 | #: rc/qml/AlbumViewer/AlbumViewer.qml:427 |
55 | 76 | msgid "Add to album" | 76 | msgid "Add to album" |
56 | 77 | msgstr "" | 77 | msgstr "" |
57 | 78 | 78 | ||
61 | 79 | #: rc/qml/AlbumViewer/AlbumViewer.qml:434 | 79 | #: rc/qml/AlbumViewer/AlbumViewer.qml:433 |
62 | 80 | #: rc/qml/MediaViewer/MediaViewer.qml:483 | 80 | #: rc/qml/MediaViewer/MediaViewer.qml:474 |
63 | 81 | #: rc/qml/MediaViewer/MediaViewer.qml:538 rc/qml/Utility/EditingHUD.qml:77 | 81 | #: rc/qml/MediaViewer/MediaViewer.qml:528 rc/qml/Utility/EditingHUD.qml:77 |
64 | 82 | #: rc/qml/Utility/SelectionToolbarAction.qml:44 | 82 | #: rc/qml/Utility/SelectionToolbarAction.qml:44 |
65 | 83 | msgid "Add" | 83 | msgid "Add" |
66 | 84 | msgstr "" | 84 | msgstr "" |
67 | 85 | 85 | ||
71 | 86 | #: rc/qml/AlbumViewer/AlbumViewer.qml:448 | 86 | #: rc/qml/AlbumViewer/AlbumViewer.qml:447 |
72 | 87 | #: rc/qml/MediaViewer/MediaViewer.qml:512 | 87 | #: rc/qml/MediaViewer/MediaViewer.qml:502 |
73 | 88 | #: rc/qml/MediaViewer/MediaViewer.qml:567 | 88 | #: rc/qml/MediaViewer/MediaViewer.qml:557 |
74 | 89 | msgid "Back" | 89 | msgid "Back" |
75 | 90 | msgstr "" | 90 | msgstr "" |
76 | 91 | 91 | ||
78 | 92 | #: rc/qml/AlbumsOverview.qml:186 rc/qml/Components/PopupAlbumPicker.qml:91 | 92 | #: rc/qml/AlbumsOverview.qml:197 rc/qml/Components/PopupAlbumPicker.qml:91 |
79 | 93 | msgid "Add new album" | 93 | msgid "Add new album" |
80 | 94 | msgstr "" | 94 | msgstr "" |
81 | 95 | 95 | ||
83 | 96 | #: rc/qml/AlbumsOverview.qml:204 rc/qml/Utility/PhotosToolbarActions.qml:46 | 96 | #: rc/qml/AlbumsOverview.qml:215 rc/qml/Utility/PhotosToolbarActions.qml:46 |
84 | 97 | msgid "Camera" | 97 | msgid "Camera" |
85 | 98 | msgstr "" | 98 | msgstr "" |
86 | 99 | 99 | ||
87 | 100 | #: rc/qml/Components/DeleteDialog.qml:36 | 100 | #: rc/qml/Components/DeleteDialog.qml:36 |
89 | 101 | #: rc/qml/MediaViewer/MediaViewer.qml:297 | 101 | #: rc/qml/MediaViewer/MediaViewer.qml:288 |
90 | 102 | msgid "Yes" | 102 | msgid "Yes" |
91 | 103 | msgstr "" | 103 | msgstr "" |
92 | 104 | 104 | ||
93 | 105 | #: rc/qml/Components/DeleteDialog.qml:45 | 105 | #: rc/qml/Components/DeleteDialog.qml:45 |
95 | 106 | #: rc/qml/MediaViewer/MediaViewer.qml:308 | 106 | #: rc/qml/MediaViewer/MediaViewer.qml:299 |
96 | 107 | msgid "No" | 107 | msgid "No" |
97 | 108 | msgstr "" | 108 | msgstr "" |
98 | 109 | 109 | ||
99 | @@ -115,8 +115,8 @@ | |||
100 | 115 | msgid "Delete album + contents" | 115 | msgid "Delete album + contents" |
101 | 116 | msgstr "" | 116 | msgstr "" |
102 | 117 | 117 | ||
105 | 118 | #: rc/qml/Components/MediaSelector.qml:56 | 118 | #: rc/qml/Components/MediaSelector.qml:59 |
106 | 119 | #: rc/qml/Components/MediaSelector.qml:78 | 119 | #: rc/qml/Components/MediaSelector.qml:80 |
107 | 120 | msgid "Add to Album" | 120 | msgid "Add to Album" |
108 | 121 | msgstr "" | 121 | msgstr "" |
109 | 122 | 122 | ||
110 | @@ -128,21 +128,21 @@ | |||
111 | 128 | msgid "Loading…" | 128 | msgid "Loading…" |
112 | 129 | msgstr "" | 129 | msgstr "" |
113 | 130 | 130 | ||
115 | 131 | #: rc/qml/MainScreen.qml:80 | 131 | #: rc/qml/MainScreen.qml:96 |
116 | 132 | msgid "Albums" | 132 | msgid "Albums" |
117 | 133 | msgstr "" | 133 | msgstr "" |
118 | 134 | 134 | ||
120 | 135 | #: rc/qml/MainScreen.qml:97 rc/qml/MainScreen.qml:120 | 135 | #: rc/qml/MainScreen.qml:113 rc/qml/MainScreen.qml:136 |
121 | 136 | #: rc/qml/PickerScreen.qml:54 | 136 | #: rc/qml/PickerScreen.qml:54 |
122 | 137 | msgid "Events" | 137 | msgid "Events" |
123 | 138 | msgstr "" | 138 | msgstr "" |
124 | 139 | 139 | ||
126 | 140 | #: rc/qml/MainScreen.qml:118 rc/qml/MainScreen.qml:162 | 140 | #: rc/qml/MainScreen.qml:134 rc/qml/MainScreen.qml:178 |
127 | 141 | #: rc/qml/Utility/PhotosToolbarActions.qml:33 | 141 | #: rc/qml/Utility/PhotosToolbarActions.qml:33 |
128 | 142 | msgid "Select" | 142 | msgid "Select" |
129 | 143 | msgstr "" | 143 | msgstr "" |
130 | 144 | 144 | ||
132 | 145 | #: rc/qml/MainScreen.qml:130 rc/qml/MainScreen.qml:164 | 145 | #: rc/qml/MainScreen.qml:146 rc/qml/MainScreen.qml:180 |
133 | 146 | #: rc/qml/PickerScreen.qml:74 | 146 | #: rc/qml/PickerScreen.qml:74 |
134 | 147 | msgid "Photos" | 147 | msgid "Photos" |
135 | 148 | msgstr "" | 148 | msgstr "" |
136 | @@ -172,37 +172,33 @@ | |||
137 | 172 | msgid "Revert to original" | 172 | msgid "Revert to original" |
138 | 173 | msgstr "" | 173 | msgstr "" |
139 | 174 | 174 | ||
145 | 175 | #: rc/qml/MediaViewer/MediaViewer.qml:234 | 175 | #: rc/qml/MediaViewer/MediaViewer.qml:277 rc/qml/PhotosOverview.qml:75 |
141 | 176 | msgid "Configure Facebook for photo sharing..." | ||
142 | 177 | msgstr "" | ||
143 | 178 | |||
144 | 179 | #: rc/qml/MediaViewer/MediaViewer.qml:286 rc/qml/PhotosOverview.qml:75 | ||
146 | 180 | msgid "Delete a photo" | 176 | msgid "Delete a photo" |
147 | 181 | msgstr "" | 177 | msgstr "" |
148 | 182 | 178 | ||
150 | 183 | #: rc/qml/MediaViewer/MediaViewer.qml:464 | 179 | #: rc/qml/MediaViewer/MediaViewer.qml:455 |
151 | 184 | msgid "Edit" | 180 | msgid "Edit" |
152 | 185 | msgstr "" | 181 | msgstr "" |
153 | 186 | 182 | ||
155 | 187 | #: rc/qml/MediaViewer/MediaViewer.qml:475 | 183 | #: rc/qml/MediaViewer/MediaViewer.qml:466 |
156 | 188 | msgid "Add photo to album" | 184 | msgid "Add photo to album" |
157 | 189 | msgstr "" | 185 | msgstr "" |
158 | 190 | 186 | ||
160 | 191 | #: rc/qml/MediaViewer/MediaViewer.qml:501 | 187 | #: rc/qml/MediaViewer/MediaViewer.qml:492 |
161 | 192 | msgid "Share photo" | 188 | msgid "Share photo" |
162 | 193 | msgstr "" | 189 | msgstr "" |
163 | 194 | 190 | ||
166 | 195 | #: rc/qml/MediaViewer/MediaViewer.qml:507 | 191 | #: rc/qml/MediaViewer/MediaViewer.qml:498 |
167 | 196 | #: rc/qml/MediaViewer/MediaViewer.qml:558 rc/qml/Utility/EditingHUD.qml:72 | 192 | #: rc/qml/MediaViewer/MediaViewer.qml:548 rc/qml/Utility/EditingHUD.qml:72 |
168 | 197 | #: rc/qml/Utility/SelectionToolbarAction.qml:58 | 193 | #: rc/qml/Utility/SelectionToolbarAction.qml:58 |
169 | 198 | msgid "Share" | 194 | msgid "Share" |
170 | 199 | msgstr "" | 195 | msgstr "" |
171 | 200 | 196 | ||
173 | 201 | #: rc/qml/MediaViewer/MediaViewer.qml:525 | 197 | #: rc/qml/MediaViewer/MediaViewer.qml:515 |
174 | 202 | msgid "Pause" | 198 | msgid "Pause" |
175 | 203 | msgstr "" | 199 | msgstr "" |
176 | 204 | 200 | ||
178 | 205 | #: rc/qml/MediaViewer/MediaViewer.qml:525 | 201 | #: rc/qml/MediaViewer/MediaViewer.qml:515 |
179 | 206 | msgid "Play" | 202 | msgid "Play" |
180 | 207 | msgstr "" | 203 | msgstr "" |
181 | 208 | 204 | ||
182 | 209 | 205 | ||
183 | === modified file 'rc/qml/MediaViewer/MediaViewer.qml' | |||
184 | --- rc/qml/MediaViewer/MediaViewer.qml 2014-06-17 03:23:39 +0000 | |||
185 | +++ rc/qml/MediaViewer/MediaViewer.qml 2014-07-02 22:11:28 +0000 | |||
186 | @@ -23,7 +23,7 @@ | |||
187 | 23 | import Ubuntu.Components 0.1 | 23 | import Ubuntu.Components 0.1 |
188 | 24 | import Ubuntu.Components.Popups 0.1 | 24 | import Ubuntu.Components.Popups 0.1 |
189 | 25 | import Ubuntu.Components.ListItems 0.1 as ListItem | 25 | import Ubuntu.Components.ListItems 0.1 as ListItem |
191 | 26 | import Ubuntu.Components.Extras 0.1 | 26 | import Ubuntu.Content 0.1 |
192 | 27 | import "../Components" | 27 | import "../Components" |
193 | 28 | import "../Utility" | 28 | import "../Utility" |
194 | 29 | import "../../js/Gallery.js" as Gallery | 29 | import "../../js/Gallery.js" as Gallery |
195 | @@ -224,42 +224,32 @@ | |||
196 | 224 | !editHUD.actionActive | 224 | !editHUD.actionActive |
197 | 225 | 225 | ||
198 | 226 | Component { | 226 | Component { |
213 | 227 | id: shareConfigurePopover | 227 | id: contentItemComp |
214 | 228 | 228 | ContentItem {} | |
201 | 229 | ActionSelectionPopover { | ||
202 | 230 | objectName: "shareConfigurePopover" | ||
203 | 231 | visible: false | ||
204 | 232 | actions: ActionList { | ||
205 | 233 | Action { | ||
206 | 234 | text: i18n.tr("Configure Facebook for photo sharing...") | ||
207 | 235 | onTriggered: { | ||
208 | 236 | Qt.openUrlExternally("settings:///system/online-accounts"); | ||
209 | 237 | } | ||
210 | 238 | } | ||
211 | 239 | } | ||
212 | 240 | } | ||
215 | 241 | } | 229 | } |
216 | 242 | 230 | ||
235 | 243 | FacebookAccount { | 231 | Rectangle { |
236 | 244 | id: facebook | 232 | id: sharePicker |
237 | 245 | 233 | anchors.fill: parent | |
238 | 246 | property ActionSelectionPopover _lastPopover: null | 234 | visible: false |
239 | 247 | 235 | ||
240 | 248 | function configureOrStartSharing(button) { | 236 | ContentPeerPicker { |
241 | 249 | if (_lastPopover) { | 237 | objectName: "sharePicker" |
242 | 250 | PopupUtils.close(_lastPopover); | 238 | anchors.fill: parent |
243 | 251 | _lastPopover = null; | 239 | visible: parent.visible |
244 | 252 | } else { | 240 | contentType: galleryPhotoViewer.media.type === MediaSource.Video ? ContentType.Videos : ContentType.Pictures |
245 | 253 | if (facebook.id == -1) { | 241 | handler: ContentHandler.Share |
246 | 254 | _lastPopover = PopupUtils.open(shareConfigurePopover, button); | 242 | |
247 | 255 | } else { | 243 | onPeerSelected: { |
248 | 256 | sharePanel.fileToShare = viewerWrapper.media.path; | 244 | parent.visible = false; |
249 | 257 | sharePanel.userAccountId = facebook.id; | 245 | var curTransfer = peer.request(); |
250 | 258 | sharePanel.visible = true; | 246 | if (curTransfer.state === ContentTransfer.InProgress) |
251 | 259 | viewerWrapper.tools.opened = false; | 247 | { |
252 | 260 | _lastPopover = null; | 248 | curTransfer.items = [ contentItemComp.createObject(parent, {"url": viewerWrapper.media.path}) ]; |
253 | 249 | curTransfer.state = ContentTransfer.Charged; | ||
254 | 261 | } | 250 | } |
255 | 262 | } | 251 | } |
256 | 252 | onCancelPressed: parent.visible = false; | ||
257 | 263 | } | 253 | } |
258 | 264 | } | 254 | } |
259 | 265 | 255 | ||
260 | @@ -546,7 +536,7 @@ | |||
261 | 546 | text: i18n.tr("Share photo") | 536 | text: i18n.tr("Share photo") |
262 | 547 | iconSource: "../../img/share.png" | 537 | iconSource: "../../img/share.png" |
263 | 548 | onTriggered: { | 538 | onTriggered: { |
265 | 549 | facebook.configureOrStartSharing(photoShareButton); | 539 | sharePicker.visible = true; |
266 | 550 | } | 540 | } |
267 | 551 | } | 541 | } |
268 | 552 | text: i18n.tr("Share") | 542 | text: i18n.tr("Share") |
269 | @@ -602,7 +592,7 @@ | |||
270 | 602 | text: i18n.tr("Share") | 592 | text: i18n.tr("Share") |
271 | 603 | iconSource: "../../img/share.png" | 593 | iconSource: "../../img/share.png" |
272 | 604 | onTriggered: { | 594 | onTriggered: { |
274 | 605 | facebook.configureOrStartSharing(videoShareButton); | 595 | sharePicker.visible = true; |
275 | 606 | } | 596 | } |
276 | 607 | } | 597 | } |
277 | 608 | 598 | ||
278 | @@ -617,24 +607,4 @@ | |||
279 | 617 | } | 607 | } |
280 | 618 | } | 608 | } |
281 | 619 | } | 609 | } |
282 | 620 | |||
283 | 621 | Loader { | ||
284 | 622 | id: sharePanel | ||
285 | 623 | anchors.fill: parent | ||
286 | 624 | visible: false | ||
287 | 625 | sourceComponent: (fileToShare !== "" && userAccountId !== "") ? component_sharePanel : null | ||
288 | 626 | |||
289 | 627 | property string fileToShare | ||
290 | 628 | property string userAccountId | ||
291 | 629 | |||
292 | 630 | Component { | ||
293 | 631 | id: component_sharePanel | ||
294 | 632 | Share { | ||
295 | 633 | fileToShare: sharePanel.fileToShare | ||
296 | 634 | userAccountId: sharePanel.userAccountId | ||
297 | 635 | onUploadCompleted: sharePanel.visible = false; | ||
298 | 636 | onCanceled: sharePanel.visible = false; | ||
299 | 637 | } | ||
300 | 638 | } | ||
301 | 639 | } | ||
302 | 640 | } | 610 | } |
303 | 641 | 611 | ||
304 | === modified file 'tests/autopilot/gallery_app/emulators/photo_viewer.py' | |||
305 | --- tests/autopilot/gallery_app/emulators/photo_viewer.py 2014-06-13 13:57:20 +0000 | |||
306 | +++ tests/autopilot/gallery_app/emulators/photo_viewer.py 2014-07-02 22:11:28 +0000 | |||
307 | @@ -29,10 +29,15 @@ | |||
308 | 29 | return self.app.wait_select_single("PopupAlbumPicker", | 29 | return self.app.wait_select_single("PopupAlbumPicker", |
309 | 30 | objectName="popupAlbumPicker") | 30 | objectName="popupAlbumPicker") |
310 | 31 | 31 | ||
315 | 32 | def get_share_dialog(self): | 32 | def get_content_peer_picker_cancel_button(self): |
316 | 33 | """Returns the photo viewer share dialog.""" | 33 | """Returns the ContentPeerPicker cancel button.""" |
317 | 34 | return self.app.wait_select_single("SharePopover", | 34 | return self.app.wait_select_single("Button", |
318 | 35 | objectName="sharePopover") | 35 | objectName="contentPeerPickerCancelButton") |
319 | 36 | |||
320 | 37 | def get_share_peer_picker(self): | ||
321 | 38 | """Returns the photo viewer share picker.""" | ||
322 | 39 | return self.app.wait_select_single("ContentPeerPicker", | ||
323 | 40 | objectName="sharePicker") | ||
324 | 36 | 41 | ||
325 | 37 | def get_photo_edit_dialog(self): | 42 | def get_photo_edit_dialog(self): |
326 | 38 | """Returns the photo edit dialog.""" | 43 | """Returns the photo edit dialog.""" |
327 | 39 | 44 | ||
328 | === modified file 'tests/autopilot/gallery_app/tests/test_photo_viewer.py' | |||
329 | --- tests/autopilot/gallery_app/tests/test_photo_viewer.py 2014-05-20 15:19:35 +0000 | |||
330 | +++ tests/autopilot/gallery_app/tests/test_photo_viewer.py 2014-07-02 22:11:28 +0000 | |||
331 | @@ -10,6 +10,8 @@ | |||
332 | 10 | 10 | ||
333 | 11 | from testtools.matchers import Equals, NotEquals, GreaterThan, Is | 11 | from testtools.matchers import Equals, NotEquals, GreaterThan, Is |
334 | 12 | from autopilot.matchers import Eventually | 12 | from autopilot.matchers import Eventually |
335 | 13 | from testtools import skipIf | ||
336 | 14 | from autopilot.platform import model | ||
337 | 13 | 15 | ||
338 | 14 | from gallery_app.emulators.photo_viewer import PhotoViewer | 16 | from gallery_app.emulators.photo_viewer import PhotoViewer |
339 | 15 | from gallery_app.emulators.media_viewer import MediaViewer | 17 | from gallery_app.emulators.media_viewer import MediaViewer |
340 | @@ -109,6 +111,17 @@ | |||
341 | 109 | photo_viewer = self.photo_viewer.get_main_photo_viewer() | 111 | photo_viewer = self.photo_viewer.get_main_photo_viewer() |
342 | 110 | self.assertThat(photo_viewer.visible, Eventually(Equals(False))) | 112 | self.assertThat(photo_viewer.visible, Eventually(Equals(False))) |
343 | 111 | 113 | ||
344 | 114 | @skipIf(model() == 'Desktop', 'Share not supported on desktop') | ||
345 | 115 | def test_share_button(self): | ||
346 | 116 | """Clicking the share button must show the ContentPeerPicker.""" | ||
347 | 117 | photo_viewer = self.photo_viewer.get_main_photo_viewer() | ||
348 | 118 | self.main_view.open_toolbar().click_button("shareButton") | ||
349 | 119 | share_picker = self.photo_viewer.get_share_peer_picker() | ||
350 | 120 | self.assertThat(share_picker.visible, Eventually(Equals(True))) | ||
351 | 121 | cancel_button = self.photo_viewer.get_content_peer_picker_cancel_button() | ||
352 | 122 | self.click_item(cancel_button) | ||
353 | 123 | self.assertThat(share_picker.visible, Eventually(Equals(False))) | ||
354 | 124 | |||
355 | 112 | def delete_one_picture(self): | 125 | def delete_one_picture(self): |
356 | 113 | self.main_view.open_toolbar().click_button("deleteButton") | 126 | self.main_view.open_toolbar().click_button("deleteButton") |
357 | 114 | self.get_delete_dialog() | 127 | self.get_delete_dialog() |
FAILED: Continuous integration, rev:929 jenkins. qa.ubuntu. com/job/ gallery- app-ci/ 876/ jenkins. qa.ubuntu. com/job/ gallery- app-utopic- amd64-ci/ 51 jenkins. qa.ubuntu. com/job/ gallery- app-utopic- armhf-ci/ 51 jenkins. qa.ubuntu. com/job/ gallery- app-utopic- armhf-ci/ 51/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ gallery- app-utopic- i386-ci/ 51 jenkins. qa.ubuntu. com/job/ generic- click-autopilot -utopic- touch/103 jenkins. qa.ubuntu. com/job/ generic- mediumtests- utopic/ 961 jenkins. qa.ubuntu. com/job/ generic- click-autopilot -runner- mako/254 jenkins. qa.ubuntu. com/job/ generic- click-builder- utopic- armhf/143 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 8676 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-utopic/ 829 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/1104 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- amd64/1104/ artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/gallery- app-ci/ 876/rebuild
http://