Merge lp:~vthompson/music-app/fixes-1253480-1253788-ap-tests into lp:music-app/trusty

Proposed by Victor Thompson
Status: Merged
Approved by: Victor Thompson
Approved revision: 256
Merged at revision: 255
Proposed branch: lp:~vthompson/music-app/fixes-1253480-1253788-ap-tests
Merge into: lp:music-app/trusty
Diff against target: 67 lines (+28/-12)
1 file modified
tests/autopilot/music_app/tests/test_music.py (+28/-12)
To merge this branch: bzr merge lp:~vthompson/music-app/fixes-1253480-1253788-ap-tests
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nicholas Skaggs (community) Approve
Review via email: mp+196203@code.launchpad.net

Commit message

Fix shuffle and previous tests for when the play duration was over 5 seconds

Description of the change

The Shuffle and Previous track tests started failing due to a change that was made to skip to the beginning of the song instead of the previous track when the previous button was selected and the track's playing duration was over 5 seconds. These test updates pause the track in these instances so the song does not play past the 5 second mark.

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 :

Victor, can we test both the hitting the previous button at <5 and at >5 seconds?

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

I suppose we should add a test that intentionally hits the previous button
after 5 seconds. Do you think such a test needs to be introduced with this
merge? Or should we just file a bug to request a new test?

On Thu, Nov 21, 2013 at 7:48 PM, Nicholas Skaggs <
<email address hidden>> wrote:

> Victor, can we test both the hitting the previous button at <5 and at >5
> seconds?
> --
>
> https://code.launchpad.net/~vthompson/music-app/fixes-1253480-1253788-ap-tests/+merge/196203
> You are the owner of
> lp:~vthompson/music-app/fixes-1253480-1253788-ap-tests.
>

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

Let's just add it as a bug, and add it in another mp :-)

review: Approve
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
Victor Thompson (vthompson) wrote :

Toolbar collapsed after pause was hit, causing multiple failures when autopilot clicked outside the window, which caused a context menu to be opened.

256. By Victor Thompson

Update test for when toolbar collapses during shuffle test

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/music_app/tests/test_music.py'
--- tests/autopilot/music_app/tests/test_music.py 2013-11-16 19:36:00 +0000
+++ tests/autopilot/music_app/tests/test_music.py 2013-11-22 16:59:15 +0000
@@ -116,22 +116,28 @@
116 first_genre_item = self.main_view.get_first_genre_item()116 first_genre_item = self.main_view.get_first_genre_item()
117 self.pointing_device.click_object(first_genre_item)117 self.pointing_device.click_object(first_genre_item)
118118
119 playbutton = self.main_view.get_now_playing_play_button()
120
121 """ Pause track """
122 self.pointing_device.click_object(playbutton)
123 self.assertThat(self.main_view.isPlaying, Eventually(Equals(False)))
124
125 """ Repeat is off """
119 repeatbutton = self.main_view.get_repeat_button()126 repeatbutton = self.main_view.get_repeat_button()
120
121 previousbutton = self.main_view.get_previous_button()
122
123 title = lambda: self.main_view.currentTracktitle
124 artist = lambda: self.main_view.currentArtist
125 self.assertThat(title,
126 Eventually(Equals("Foss Yeaaaah! (Radio Edit)")))
127 self.assertThat(artist, Eventually(Equals("Benjamin Kerensa")))
128
129 """ Track is playing, repeat is off"""
130 self.assertThat(self.main_view.isPlaying, Equals(True))
131 self.pointing_device.click_object(repeatbutton)127 self.pointing_device.click_object(repeatbutton)
128
129 previousbutton = self.main_view.get_previous_button()
130
131 title = lambda: self.main_view.currentTracktitle
132 artist = lambda: self.main_view.currentArtist
133 self.assertThat(title,
134 Eventually(Equals("Foss Yeaaaah! (Radio Edit)")))
135 self.assertThat(artist, Eventually(Equals("Benjamin Kerensa")))
136
137 """ Select previous """
132 self.pointing_device.click_object(previousbutton)138 self.pointing_device.click_object(previousbutton)
133139
134 """ Track is playing"""140 """ Track is playing """
135 self.assertThat(self.main_view.isPlaying, Eventually(Equals(True)))141 self.assertThat(self.main_view.isPlaying, Eventually(Equals(True)))
136 self.assertThat(title, Eventually(Equals("TestMP3Title")))142 self.assertThat(title, Eventually(Equals("TestMP3Title")))
137 self.assertThat(artist, Eventually(Equals("TestMP3Artist")))143 self.assertThat(artist, Eventually(Equals("TestMP3Artist")))
@@ -149,6 +155,8 @@
149155
150 previousbutton = self.main_view.get_previous_button()156 previousbutton = self.main_view.get_previous_button()
151157
158 playbutton = self.main_view.get_now_playing_play_button()
159
152 title = lambda: self.main_view.currentTracktitle160 title = lambda: self.main_view.currentTracktitle
153 artist = lambda: self.main_view.currentArtist161 artist = lambda: self.main_view.currentArtist
154 self.assertThat(title,162 self.assertThat(title,
@@ -180,5 +188,13 @@
180 self.main_view.currentArtist == "TestMP3Artist"):188 self.main_view.currentArtist == "TestMP3Artist"):
181 break189 break
182 else:190 else:
191 """ Show toolbar if hidden """
192 if (not self.main_view.toolbarShown):
193 self.main_view.show_toolbar()
194
195 """ Pause track """
196 self.pointing_device.click_object(playbutton)
197 self.assertThat(self.main_view.isPlaying,
198 Eventually(Equals(False)))
183 forward = not forward199 forward = not forward
184 count += 1200 count += 1

Subscribers

People subscribed via source and target branches

to status/vote changes: