Merge lp:~rhuddie/gallery-app/photo_selector into lp:gallery-app
- photo_selector
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 958 |
Proposed branch: | lp:~rhuddie/gallery-app/photo_selector |
Merge into: | lp:gallery-app |
Diff against target: |
45 lines (+27/-0) 2 files modified
tests/autopilot/gallery_app/emulators/picker_screen.py (+13/-0) tests/autopilot/gallery_app/tests/test_picker_mode.py (+14/-0) |
To merge this branch: | bzr merge lp:~rhuddie/gallery-app/photo_selector |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Arthur Mello (community) | Approve | ||
Leo Arias (community) | code review | Approve | |
VĂctor R. Ruiz | Pending | ||
Javier Collado | Pending | ||
Review via email: mp+208761@code.launchpad.net |
Commit message
A new emulator method for selecting a specific photo from the picker view. A new test is also added to use this method and then click on the Pick button.
Description of the change
A new emulator method for selecting a specific photo from the picker view. A new test is also added to use this method and then click on the Pick button.
- 922. By Richard Huddie
-
fix review comments
Leo Arias (elopio) : | # |
- 923. By Richard Huddie
-
merge from trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:923
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://
- 924. By Richard Huddie
-
update image path to use thumbnailer
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:923
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://
- 925. By Richard Huddie
-
renamed test data file
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:923
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://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:923
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://
- 926. By Richard Huddie
-
changed test to use existing sample file
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:923
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:923
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:926
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:926
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 927. By Richard Huddie
-
use wait_select_single for selecting QQuickImage item
- 928. By Richard Huddie
-
merge from trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:927
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:928
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 929. By Richard Huddie
-
creat file path based on sample dir
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:929
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Arthur Mello (artmello) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:929
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Richard Huddie (rhuddie) wrote : | # |
Are there any related MPs required for this MP to build/function as expected? Please list
No
Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes
Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes - mako
Did you successfully run all tests found in your component's Test Plan (https:/
Yes - mako
If you changed the UI, was the change specified/approved by design?
No UI changes. - Test code changes only
If you changed the packaging (debian), did you subscribe a core-dev to this MP?
No packaging changes.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:929
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://
Preview Diff
1 | === modified file 'tests/autopilot/gallery_app/emulators/picker_screen.py' |
2 | --- tests/autopilot/gallery_app/emulators/picker_screen.py 2013-08-19 13:58:55 +0000 |
3 | +++ tests/autopilot/gallery_app/emulators/picker_screen.py 2014-04-09 10:34:08 +0000 |
4 | @@ -32,3 +32,16 @@ |
5 | grid_view = self.grid_view() |
6 | return grid_view.select_many("OrganicItemInteraction")[0] |
7 | |
8 | + def _get_named_photo_element(self, photo_name): |
9 | + """ |
10 | + Return the ShapeItem container object for the named photo. |
11 | + This object can be clicked to enable the photo to be selected. |
12 | + """ |
13 | + photo_element = self.grid_view().wait_select_single('QQuickImage', |
14 | + source=photo_name) |
15 | + return photo_element.get_parent() |
16 | + |
17 | + def select_named_photo(self, photo_name): |
18 | + """Select the named photo from the picker view.""" |
19 | + photo_element = self._get_named_photo_element(photo_name) |
20 | + self.pointing_device.click_object(photo_element) |
21 | |
22 | === modified file 'tests/autopilot/gallery_app/tests/test_picker_mode.py' |
23 | --- tests/autopilot/gallery_app/tests/test_picker_mode.py 2014-04-08 16:47:21 +0000 |
24 | +++ tests/autopilot/gallery_app/tests/test_picker_mode.py 2014-04-09 10:34:08 +0000 |
25 | @@ -55,6 +55,20 @@ |
26 | self.assertThat(pick_button.enabled, Eventually(Equals(False))) |
27 | self.assertThat(first_events_media.isSelected, Eventually(Equals(False))) |
28 | |
29 | + def test_pick_named_photo(self): |
30 | + """Select a named photo and press Pick button.""" |
31 | + self.picker_view.switch_to_tab('photosTab') |
32 | + pick_button = self.picker_view.pick_button() |
33 | + self.assertFalse(pick_button.enabled) |
34 | + |
35 | + # create the image location path based on sample location |
36 | + image_path = 'image://thumbnailer/{}/sample02.jpg'.format( |
37 | + self.sample_destination_dir) |
38 | + self.picker_view.select_named_photo(image_path) |
39 | + |
40 | + self.assertTrue(pick_button.enabled) |
41 | + self.click_item(pick_button) |
42 | + |
43 | @unittest.skip("Temporarily disable as it fails in some cases, supposedly due to problems with the infrastructure") |
44 | def test_selection_synchronisation(self): |
45 | """Checks if the selection is the same for both views""" |
Please:
- change the double quotes on strings to single quotes.
- change "Returns" to "Return", and finish your sentences with a period as per pep257.
- add information about the return type on get_named_photo
And I've seen one more detail that will help hiding the implementation details a little, which might be usefule in case of an implementation detail.
Make get_named_photo private, naming it something like _get_named_ photo_element( )
And make a new public method
def select_photo(self, name): view.get_ named_photo( image:/ /gallery- thumbnail/ /tmp/gallery- ap_sd/new_ user.png' ) pointing_ device. click_object( photo)
photo_element = self.picker_
'
self.