Merge lp:~nskaggs/music-app/fix-shuffle-test into lp:music-app/trusty

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Victor Thompson
Approved revision: no longer in the source branch.
Merged at revision: 239
Proposed branch: lp:~nskaggs/music-app/fix-shuffle-test
Merge into: lp:music-app/trusty
Diff against target: 47 lines (+4/-6)
2 files modified
MusicToolbar.qml (+3/-3)
tests/autopilot/music_app/tests/test_music.py (+1/-3)
To merge this branch: bzr merge lp:~nskaggs/music-app/fix-shuffle-test
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Music App Developers Pending
Review via email: mp+195129@code.launchpad.net

Commit message

Enable test for shuffle mode

Description of the change

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: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

This branch works as-is on my nexus4 and passes here, so :-)

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Victor, let's push this in and remove your mp, https://code.launchpad.net/~vthompson/music-app/fix-shuffle-test/+merge/193722, or you can make the change there.. Whatever works.

Revision history for this message
Victor Thompson (vthompson) wrote :

Sounds good

Revision history for this message
Victor Thompson (vthompson) :
review: Approve
239. By Nicholas Skaggs

Enable test for shuffle mode.

Approved by Victor Thompson, Ubuntu Phone Apps Jenkins Bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MusicToolbar.qml'
2--- MusicToolbar.qml 2013-10-15 19:50:20 +0000
3+++ MusicToolbar.qml 2013-11-13 20:30:32 +0000
4@@ -787,11 +787,11 @@
5
6 onClicked: {
7 // Invert shuffle settings
8- Settings.setSetting("shuffle", !(Settings.getSetting("shuffle") === "1"))
9+ mainView.random = !mainView.random
10+ shuffleIcon.opacity = mainView.random ? 1 : .4
11+ Settings.setSetting("shuffle", mainView.random)
12 console.debug("Shuffle:", Settings.getSetting("shuffle") === "1")
13
14- mainView.random = Settings.getSetting("shuffle") === "1"
15- shuffleIcon.opacity = Settings.getSetting("shuffle") === "1" ? 1 : .4
16 }
17 }
18 }
19
20=== modified file 'tests/autopilot/music_app/tests/test_music.py'
21--- tests/autopilot/music_app/tests/test_music.py 2013-11-01 19:52:31 +0000
22+++ tests/autopilot/music_app/tests/test_music.py 2013-11-13 20:30:32 +0000
23@@ -10,7 +10,6 @@
24 from __future__ import absolute_import
25
26 from autopilot.matchers import Eventually
27-from unittest import skip
28 from testtools.matchers import Equals, LessThan
29
30 from music_app.tests import MusicTestCase
31@@ -137,7 +136,6 @@
32 self.assertThat(title, Eventually(Equals("TestMP3Title")))
33 self.assertThat(artist, Eventually(Equals("TestMP3Artist")))
34
35- @skip('Test needs work')
36 def test_shuffle(self):
37 """ Test shuffle (Music Library must exist) """
38
39@@ -165,7 +163,7 @@
40 forward = True
41 count = 0
42 while True:
43- self.assertThat(count, LessThan(10))
44+ self.assertThat(count, LessThan(100))
45 if forward:
46 self.pointing_device.click_object(forwardbutton)
47 else:

Subscribers

People subscribed via source and target branches

to status/vote changes: