Merge lp:~carla-sella/music-app/show_albums_sheet into lp:music-app/trusty

Proposed by Carla Sella
Status: Merged
Approved by: Victor Thompson
Approved revision: 265
Merged at revision: 261
Proposed branch: lp:~carla-sella/music-app/show_albums_sheet
Merge into: lp:music-app/trusty
Diff against target: 89 lines (+48/-1)
3 files modified
MusicAlbums.qml (+2/-0)
tests/autopilot/music_app/emulators.py (+24/-0)
tests/autopilot/music_app/tests/test_music.py (+22/-1)
To merge this branch: bzr merge lp:~carla-sella/music-app/show_albums_sheet
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Nicholas Skaggs (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+196785@code.launchpad.net

Commit message

Autopilot test for music app.

Description of the change

Added test_show_albums_sheet.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
262. By Carla Sella <email address hidden>

Fixed pep8 error.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Carla, remember to run pyflakes to :-)

+ pyflakes .
./tests/autopilot/music_app/tests/test_music.py:13: 'NotEquals' imported but unused
./tests/autopilot/music_app/tests/test_music.py:209: local variable 'albumstab' is assigned to but never used
./debian/music-app-autopilot/usr/lib/python2.7/dist-packages/music_app/tests/test_music.py:13: 'NotEquals' imported but unused
./debian/music-app

Should be an easy fix.

review: Needs Fixing
Revision history for this message
Carla Sella (carla-sella) wrote :

I fixed everything now.

263. By Carla Sella <email address hidden>

Ran pyflakes on tests.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
264. By Carla Sella <email address hidden>

Deleted redundant asserts.

265. By Carla Sella <email address hidden>

Fixed asserts.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) :
review: Approve
Revision history for this message
Victor Thompson (vthompson) :
review: Approve
Revision history for this message
Carla Sella (carla-sella) wrote :

Closed bug ##1253447.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'MusicAlbums.qml'
--- MusicAlbums.qml 2013-11-23 21:02:25 +0000
+++ MusicAlbums.qml 2013-11-27 21:14:45 +0000
@@ -103,6 +103,7 @@
103 }103 }
104 Label {104 Label {
105 id: albumArtist105 id: albumArtist
106 objectName: "albums-albumartist"
106 anchors.bottom: parent.bottom107 anchors.bottom: parent.bottom
107 anchors.bottomMargin: units.gu(1)108 anchors.bottomMargin: units.gu(1)
108 anchors.left: parent.left109 anchors.left: parent.left
@@ -187,6 +188,7 @@
187 }188 }
188 Label {189 Label {
189 id: albumArtist190 id: albumArtist
191 objectName: "albumsheet-albumartist"
190 wrapMode: Text.NoWrap192 wrapMode: Text.NoWrap
191 maximumLineCount: 1193 maximumLineCount: 1
192 fontSize: "small"194 fontSize: "small"
193195
=== modified file 'tests/autopilot/music_app/emulators.py'
--- tests/autopilot/music_app/emulators.py 2013-11-01 19:52:31 +0000
+++ tests/autopilot/music_app/emulators.py 2013-11-27 21:14:45 +0000
@@ -81,3 +81,27 @@
8181
82 def get_back_button(self):82 def get_back_button(self):
83 return self.select_single("*", objectName="nowPlayingBackButtonObject")83 return self.select_single("*", objectName="nowPlayingBackButtonObject")
84
85 def get_albumstab(self):
86 return self.select_single("Tab", objectName="albumstab")
87
88 def get_albums_albumartist_list(self):
89 return self.select_many("Label", objectName="albums-albumartist")
90
91 def get_albums_albumartist(self, artistName):
92 albumartistList = self.get_albums_albumartist_list()
93 for item in albumartistList:
94 if item.text == artistName:
95 return item
96
97 def get_album_sheet_artist(self):
98 return self.select_single("Label", objectName="albumsheet-albumartist")
99
100 def close_buttons(self):
101 return self.select_many("Button", text="close")
102
103 def get_album_sheet_close_button(self):
104 closebuttons = self.close_buttons()
105 for item in closebuttons:
106 if item.enabled:
107 return item
84108
=== modified file 'tests/autopilot/music_app/tests/test_music.py'
--- tests/autopilot/music_app/tests/test_music.py 2013-11-22 16:58:47 +0000
+++ tests/autopilot/music_app/tests/test_music.py 2013-11-27 21:14:45 +0000
@@ -10,7 +10,7 @@
10from __future__ import absolute_import10from __future__ import absolute_import
1111
12from autopilot.matchers import Eventually12from autopilot.matchers import Eventually
13from testtools.matchers import Equals, LessThan13from testtools.matchers import Equals, Is, Not, LessThan
1414
15from music_app.tests import MusicTestCase15from music_app.tests import MusicTestCase
1616
@@ -198,3 +198,24 @@
198 Eventually(Equals(False)))198 Eventually(Equals(False)))
199 forward = not forward199 forward = not forward
200 count += 1200 count += 1
201
202 def test_show_albums_sheet(self):
203 """tests navigating to the Albums tab and displaying the album sheet"""
204
205 artistName = "Benjamin Kerensa"
206
207 # switch to albums tab
208 self.main_view.switch_to_tab("albumstab")
209
210 #select album
211 albumartist = self.main_view.get_albums_albumartist(artistName)
212 self.pointing_device.click_object(albumartist)
213
214 #get album sheet album artist
215 sheet_albumartist = self.main_view.get_album_sheet_artist()
216 self.assertThat(sheet_albumartist.text, Eventually(Equals(artistName)))
217
218 # click on close button to close album sheet
219 closebutton = self.main_view.get_album_sheet_close_button()
220 self.pointing_device.click_object(closebutton)
221 self.assertThat(self.main_view.get_albumstab(), Not(Is(None)))

Subscribers

People subscribed via source and target branches

to status/vote changes: