Preview of U1 musicstore album
----------------------------------------------------
Test that the u1ms album preview is displayed correctly in the Dash.

Setup:
Network connectivity.

Actions:
1. Open the Dash and switch to the music lens.
2. Make sure some albums for purchase are displayed.
3. Right-click an album.
4. Repeat 1-2, but use Left-click in (3).

Expected Result:
Album preview should be displayed. It should display album cover, album title, album artist and year (as subtitle)
a list of tracks and 'Download' button. 'Download' button should display price and currency.


Preview of U1ms album - 'Download' action.
----------------------------------------------------
Test that 'Download' actions brings U1 music store.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms album.
2. Click 'Download' button.

Expected Result:
U1 music store website is opened, with selected album displayed.


U1ms album preview - built-in playback
----------------------------------------------------
Test that built-in playback via music-preview-player supports play/pause and resume for u1ms album tracks.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms album.
2. Click small play button next to a track.
3. As the track is played, hit pause / play a few times.

Expected Result:
Selected track is played by music-preview-player. Playback progress is reported in the Dash. Playback is paused/resumed
when hitting pause/play button.


U1ms album preview - end of playback with built-in playback
----------------------------------------------------
Test progress and playback state are reported correctly on end-of-playback when built-in playback is used.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms album.
2. Click small play button next to a track.
3. Wait for the playback to finish.

Expected Result:
Selected track is played by music-preview-player. Playback progress is reported in the Dash. When playback finishes,
the progress is reset.


U1ms album preview - song change with built-in playback
----------------------------------------------------
Test that song can be changed with built-in playback functionality and progress/state are reported accordingly.

Actions:
1. Open a preview of u1ms album.
2. Click small play button next to a track.
3. As the track is played, click small play button for another track.

Expected Result:
Selected track is played by music-preview-player. When another track is activated for playback then playback progress
is updated accrodingly to show play state and progress for only one track.

U1ms album preview - closing the preview during playback
----------------------------------------------------
Test that built-in playback stops when preview is closed.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms album.
2. Click small play button next to a track.
3. As the track is played, close the preview.

Expected Result:
Selected track is played by music-preview-player. Playback stops when the preview is closed.
Preview player process quits (verify with 'ps uax|grep music-preview-player').


U1ms album preview - switching to a different preview during playback
----------------------------------------------------
Test that built-in playback stops when switching to a different preview.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms album.
2. Click small play button next to a track.
3. As the track is played, switch to a different preview by clicking left/right arrows.

Expected Result:
Selected track is played by music-preview-player. Playback stops when preview of different album is displayed.


U1ms single track preview
----------------------------------------------------
Test that single track preview for u1ms track is displayed correctly in the Dash.

Setup:
Network connectivity.

1. Open the Dash and switch to the music lens.
2. Make sure some u1ms songs are displayed.
3. Right-click a song.

Expected Result:
Song preview should be displayed. It should display album cover, song title, album artist and year (as subtitle).
Only a single track should be displayed in the player area. 'Download' button should be displayed.


U1ms single track preview - 'Download' action
----------------------------------------------------
Test that 'Download' action for single track preview brings U1 music store.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms song.
2. Click 'Download' button.

Expected Result:
U1 music store website is opened, with selected song displayed.

U1ms album preview - playback stops on network error
----------------------------------------------------
Test playback state is set back to stop when network is not available.

Setup:
Network connectivity.

Actions:
1. Open a preview of u1ms album.
2. Login via ssh or switch to a VT and block outgoing network traffic, e.g. 
   `sudo iptables -A OUTPUT -p tcp --dport 80 -j DROP`.
3. Click small play button next to a track.

Expected Result:
Music doesn't play; the small play button next to a track indicates playing state.
After approximately 10 seconds the state is reset back to the default (not playing).
