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
1=== modified file 'tests/autopilot/music_app/tests/test_music.py'
2--- tests/autopilot/music_app/tests/test_music.py 2013-11-16 19:36:00 +0000
3+++ tests/autopilot/music_app/tests/test_music.py 2013-11-22 16:59:15 +0000
4@@ -116,22 +116,28 @@
5 first_genre_item = self.main_view.get_first_genre_item()
6 self.pointing_device.click_object(first_genre_item)
7
8+ playbutton = self.main_view.get_now_playing_play_button()
9+
10+ """ Pause track """
11+ self.pointing_device.click_object(playbutton)
12+ self.assertThat(self.main_view.isPlaying, Eventually(Equals(False)))
13+
14+ """ Repeat is off """
15 repeatbutton = self.main_view.get_repeat_button()
16-
17- previousbutton = self.main_view.get_previous_button()
18-
19- title = lambda: self.main_view.currentTracktitle
20- artist = lambda: self.main_view.currentArtist
21- self.assertThat(title,
22- Eventually(Equals("Foss Yeaaaah! (Radio Edit)")))
23- self.assertThat(artist, Eventually(Equals("Benjamin Kerensa")))
24-
25- """ Track is playing, repeat is off"""
26- self.assertThat(self.main_view.isPlaying, Equals(True))
27 self.pointing_device.click_object(repeatbutton)
28+
29+ previousbutton = self.main_view.get_previous_button()
30+
31+ title = lambda: self.main_view.currentTracktitle
32+ artist = lambda: self.main_view.currentArtist
33+ self.assertThat(title,
34+ Eventually(Equals("Foss Yeaaaah! (Radio Edit)")))
35+ self.assertThat(artist, Eventually(Equals("Benjamin Kerensa")))
36+
37+ """ Select previous """
38 self.pointing_device.click_object(previousbutton)
39
40- """ Track is playing"""
41+ """ Track is playing """
42 self.assertThat(self.main_view.isPlaying, Eventually(Equals(True)))
43 self.assertThat(title, Eventually(Equals("TestMP3Title")))
44 self.assertThat(artist, Eventually(Equals("TestMP3Artist")))
45@@ -149,6 +155,8 @@
46
47 previousbutton = self.main_view.get_previous_button()
48
49+ playbutton = self.main_view.get_now_playing_play_button()
50+
51 title = lambda: self.main_view.currentTracktitle
52 artist = lambda: self.main_view.currentArtist
53 self.assertThat(title,
54@@ -180,5 +188,13 @@
55 self.main_view.currentArtist == "TestMP3Artist"):
56 break
57 else:
58+ """ Show toolbar if hidden """
59+ if (not self.main_view.toolbarShown):
60+ self.main_view.show_toolbar()
61+
62+ """ Pause track """
63+ self.pointing_device.click_object(playbutton)
64+ self.assertThat(self.main_view.isPlaying,
65+ Eventually(Equals(False)))
66 forward = not forward
67 count += 1

Subscribers

People subscribed via source and target branches

to status/vote changes: