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
=== modified file 'ubuntuone/web/tests/sst/shared/actions/music.py'
--- ubuntuone/web/tests/sst/shared/actions/music.py 2011-12-18 14:03:06 +0000
+++ ubuntuone/web/tests/sst/shared/actions/music.py 2012-01-25 17:56:47 +0000
@@ -21,12 +21,11 @@
2121
22def open():22def open():
23 """Open the music page and assert it's title."""23 """Open the music page and assert it's title."""
24 # TODO when the music player is released, then we have to uncomment the following line and delete the go_to,24 click_link(_get_music_link())
25 # to access the tab properly.
26 #click_link(_get_music_link())
27 go_to('music/player')25 go_to('music/player')
28 switch_to_window()26 switch_to_window()
29 assert_page_title()27 assert_page_title()
28 _wait_for_action_to_complete()
3029
31def _get_music_link():30def _get_music_link():
32 return get_element_by_css('#main-nav .music')31 return get_element_by_css('#main-nav .music')
@@ -139,6 +138,13 @@
139 current_song_album_element = get_element_by_css('.current-song .album')138 current_song_album_element = get_element_by_css('.current-song .album')
140 return current_song_album_element.text139 return current_song_album_element.text
141140
141def clear_queue():
142 _open_now_playing()
143 click_button(_get_clear_queue_button())
144
145def _get_clear_queue_button():
146 return get_element(css_class='clear')
147
142def assert_song_in_queue(song):148def assert_song_in_queue(song):
143 _open_now_playing()149 _open_now_playing()
144 _assert_song(song)150 _assert_song(song)
@@ -185,6 +191,7 @@
185def _open_artists():191def _open_artists():
186 if not _is_artists_open():192 if not _is_artists_open():
187 click_element(_get_artists_element())193 click_element(_get_artists_element())
194 _wait_for_action_to_complete()
188195
189def _is_artists_open():196def _is_artists_open():
190 artists_element = _get_artists_element()197 artists_element = _get_artists_element()
@@ -224,6 +231,7 @@
224def _open_albums():231def _open_albums():
225 if not _is_albums_open():232 if not _is_albums_open():
226 click_element(_get_albums_element())233 click_element(_get_albums_element())
234 _wait_for_action_to_complete()
227235
228def _is_albums_open():236def _is_albums_open():
229 albums_element = _get_albums_element()237 albums_element = _get_albums_element()

Subscribers

People subscribed via source and target branches