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

Proposed by Carla Sella
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 270
Merged at revision: 272
Proposed branch: lp:~carla-sella/music-app/add_album_to_queue
Merge into: lp:music-app/trusty
Diff against target: 55 lines (+41/-0)
1 file modified
tests/autopilot/music_app/tests/test_music.py (+41/-0)
To merge this branch: bzr merge lp:~carla-sella/music-app/add_album_to_queue
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+197964@code.launchpad.net

Commit message

Autopilot test for music app.

Description of the change

New test_add_album_to_queue_from_albums_sheet.
For fixing bug #1253449.

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)
269. 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: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

Please correct the "verity" spelling error. Otherwise, this is good. Thanks!

270. By Carla Sella <email address hidden>

Fixed mispelling.

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

I made the correction :).

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
Victor Thompson (vthompson) :
review: Approve
Revision history for this message
Nicholas Skaggs (nskaggs) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/music_app/tests/test_music.py'
2--- tests/autopilot/music_app/tests/test_music.py 2013-12-04 21:25:45 +0000
3+++ tests/autopilot/music_app/tests/test_music.py 2013-12-06 17:26:09 +0000
4@@ -11,6 +11,8 @@
5
6 from autopilot.matchers import Eventually
7 from testtools.matchers import Equals, Is, Not, LessThan, NotEquals
8+from testtools.matchers import GreaterThan
9+
10
11 from music_app.tests import MusicTestCase
12
13@@ -269,3 +271,42 @@
14 closebutton = self.main_view.get_album_sheet_close_button()
15 self.pointing_device.click_object(closebutton)
16 self.assertThat(self.main_view.get_albumstab(), Not(Is(None)))
17+
18+ def test_add_album_to_queue_from_albums_sheet(self):
19+
20+ trackTitle = "Foss Yeaaaah! (Radio Edit)"
21+ artistName = "Benjamin Kerensa"
22+
23+ # get number of tracks in queue before queuing a track
24+ initialtracksCount = self.main_view.get_queue_track_count()
25+
26+ # switch to albums tab
27+ self.main_view.switch_to_tab("albumstab")
28+
29+ #select album
30+ albumartist = self.main_view.get_albums_albumartist(artistName)
31+ self.pointing_device.click_object(albumartist)
32+
33+ #get album sheet album artist
34+ sheet_albumartist = self.main_view.get_album_sheet_artist()
35+ self.assertThat(sheet_albumartist.text, Eventually(Equals(artistName)))
36+
37+ #get track item to add to queue
38+ trackitem = self.main_view.get_album_sheet_listview_tracktitle(
39+ trackTitle)
40+ self.pointing_device.click_object(trackitem)
41+
42+ #Assert that a song form the album added to the list is playing
43+ self.assertThat(self.main_view.isPlaying, Eventually(Equals(True)))
44+
45+ # verify track queue count is greater than initial value
46+ endtracksCount = self.main_view.get_queue_track_count()
47+ self.assertThat(endtracksCount, GreaterThan(initialtracksCount))
48+
49+ #verify song's metadata matches the item added to the Now Playing view
50+ queueArtistName = self.main_view.get_queue_now_playing_artist(
51+ artistName)
52+ self.assertThat(str(queueArtistName.text), Equals(artistName))
53+ queueTrackTitle = self.main_view.get_queue_now_playing_title(
54+ trackTitle)
55+ self.assertThat(str(queueTrackTitle.text), Equals(trackTitle))

Subscribers

People subscribed via source and target branches

to status/vote changes: