Merge lp:~elopio/ubuntuone-testing/update-music into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Rick McBride
Approved revision: 76
Merged at revision: 74
Proposed branch: lp:~elopio/ubuntuone-testing/update-music
Merge into: lp:ubuntuone-testing
Diff against target: 48 lines (+11/-3)
1 file modified
ubuntuone/web/tests/sst/shared/actions/music.py (+11/-3)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/update-music
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+90173@code.launchpad.net

Commit message

Add waiting times to music actions.

Description of the change

Made some minor changes to keep music tests working.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/web/tests/sst/shared/actions/music.py'
2--- ubuntuone/web/tests/sst/shared/actions/music.py 2011-12-18 14:03:06 +0000
3+++ ubuntuone/web/tests/sst/shared/actions/music.py 2012-01-25 17:56:47 +0000
4@@ -21,12 +21,11 @@
5
6 def open():
7 """Open the music page and assert it's title."""
8- # TODO when the music player is released, then we have to uncomment the following line and delete the go_to,
9- # to access the tab properly.
10- #click_link(_get_music_link())
11+ click_link(_get_music_link())
12 go_to('music/player')
13 switch_to_window()
14 assert_page_title()
15+ _wait_for_action_to_complete()
16
17 def _get_music_link():
18 return get_element_by_css('#main-nav .music')
19@@ -139,6 +138,13 @@
20 current_song_album_element = get_element_by_css('.current-song .album')
21 return current_song_album_element.text
22
23+def clear_queue():
24+ _open_now_playing()
25+ click_button(_get_clear_queue_button())
26+
27+def _get_clear_queue_button():
28+ return get_element(css_class='clear')
29+
30 def assert_song_in_queue(song):
31 _open_now_playing()
32 _assert_song(song)
33@@ -185,6 +191,7 @@
34 def _open_artists():
35 if not _is_artists_open():
36 click_element(_get_artists_element())
37+ _wait_for_action_to_complete()
38
39 def _is_artists_open():
40 artists_element = _get_artists_element()
41@@ -224,6 +231,7 @@
42 def _open_albums():
43 if not _is_albums_open():
44 click_element(_get_albums_element())
45+ _wait_for_action_to_complete()
46
47 def _is_albums_open():
48 albums_element = _get_albums_element()

Subscribers

People subscribed via source and target branches