Merge lp:~vthompson/music-app/fix-1332570-test_next_previous into lp:music-app/trusty

Proposed by Victor Thompson
Status: Merged
Approved by: Victor Thompson
Approved revision: 501
Merged at revision: 499
Proposed branch: lp:~vthompson/music-app/fix-1332570-test_next_previous
Merge into: lp:music-app/trusty
Diff against target: 47 lines (+15/-0)
3 files modified
MusicToolbar.qml (+1/-0)
tests/autopilot/music_app/emulators.py (+11/-0)
tests/autopilot/music_app/tests/test_music.py (+3/-0)
To merge this branch: bzr merge lp:~vthompson/music-app/fix-1332570-test_next_previous
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+223985@code.launchpad.net

Commit message

* Update test_next_previous to seek to 0 before selecting previous

Description of the change

This appears to fail because the song isn't being paused quick enough after hitting the Next button. Thus, when Previous is being selected the time the track has been playing is over 5 seconds so the track starts over. This change causes the track to pause immediately (or close to immediately).

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)
500. By Victor Thompson

Seek to 0 prior to selecting previous

501. By Victor Thompson

Fix pep8

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Hopefully should resolve the issue :)

And passes on mako locally for me:
00:17:28.789 INFO testresult:46 - OK: music_app.tests.test_music.TestMainWindow.test_next_previous(with touch)

Ran 1 test in 78.110s
OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'MusicToolbar.qml'
--- MusicToolbar.qml 2014-05-23 15:00:21 +0000
+++ MusicToolbar.qml 2014-06-20 21:49:43 +0000
@@ -550,6 +550,7 @@
550 /* Progress bar */550 /* Progress bar */
551 Rectangle {551 Rectangle {
552 id: musicToolbarFullProgressBarContainer552 id: musicToolbarFullProgressBarContainer
553 objectName: "progressBarShape"
553 anchors.left: musicToolbarFullPositionLabel.right554 anchors.left: musicToolbarFullPositionLabel.right
554 anchors.leftMargin: units.gu(2)555 anchors.leftMargin: units.gu(2)
555 anchors.right: musicToolbarFullDurationLabel.left556 anchors.right: musicToolbarFullDurationLabel.left
556557
=== modified file 'tests/autopilot/music_app/emulators.py'
--- tests/autopilot/music_app/emulators.py 2014-05-23 15:00:21 +0000
+++ tests/autopilot/music_app/emulators.py 2014-06-20 21:49:43 +0000
@@ -39,6 +39,17 @@
39 sleep(2)39 sleep(2)
40 self.pointing_device.release()40 self.pointing_device.release()
4141
42 def seek_to_0(self):
43 # Get the progress bar object
44 progressBar = self.wait_select_single(
45 "*", objectName="progressBarShape")
46
47 # Move to the progress bar and get the position
48 self.pointing_device.move_to_object(progressBar)
49 x1, y1 = self.pointing_device.position()
50
51 self.pointing_device.drag(x1, y1, x1 - (progressBar.width / 2) + 1, y1)
52
42 def show_toolbar(self):53 def show_toolbar(self):
43 # Get the toolbar object and create a mouse54 # Get the toolbar object and create a mouse
44 toolbar = self.get_toolbar()55 toolbar = self.get_toolbar()
4556
=== modified file 'tests/autopilot/music_app/tests/test_music.py'
--- tests/autopilot/music_app/tests/test_music.py 2014-06-18 23:32:17 +0000
+++ tests/autopilot/music_app/tests/test_music.py 2014-06-20 21:49:43 +0000
@@ -203,6 +203,9 @@
203 nextArtist = self.player.currentMetaArtist203 nextArtist = self.player.currentMetaArtist
204 logger.debug("Next Song %s, %s" % (nextTitle, nextArtist))204 logger.debug("Next Song %s, %s" % (nextTitle, nextArtist))
205205
206 """ Seek to 0 """
207 self.main_view.seek_to_0()
208
206 """ Select previous """209 """ Select previous """
207 previousbutton = self.main_view.get_previous_button()210 previousbutton = self.main_view.get_previous_button()
208 self.pointing_device.click_object(previousbutton)211 self.pointing_device.click_object(previousbutton)

Subscribers

People subscribed via source and target branches

to status/vote changes: