play and enqueue action
-----------------------

You have to use the testing suite for these tests. see `media testing suite`_

.. _media testing suite: Testing/MediaTestingSuite

config file to use in media test suite : **default.conf**

**Starting**

1. in /media/TESTS/test-suite/*your-type*/ copy remove_test_source directory to remove_test
2. Remove elisa.db file (media scanner is running by default)
3. Launch Elisa : python elisa.py /media/TESTS/test-suite/config_file/default.conf
4. go in directory audio->Folders->*your-type*

**Single file tests**

1. Action : Go in directory test->'4 dirs 4 files', play LAST.mp3 (short file)
2. Result : You listen to the file, view the player. when the file is finish, the list is coming back
3. Action : Play First file go back while playing and activate second file
4. Result : The second file must be enqueued (check in Playlist menu)
5. Action : Activate second file again
6. Result : First file should stop playing and second one should start playing

**Bad media tests**

1. Action : Go in directory 'bad medias' and play the all files
2. Result : 'have to work' files must works and 'unredeable' must not crash Elisa.

**Playlist Simple Test**

REQUIRES AN UPDATE

1. Action : go in 'playlist test' directory' and press enter on 'play all'
2. Result : You must listen to the following sequence : sub-A, sub-B, 1, 2 ,A ,B , C
3. Result : at the end of the sequence, the main menu come back
4. Result : Check if 'play all' does not have down arrow.

1. Action : go in 'playlist test' directory' and press enter on 'play all', the player start.
2. Action : go back to the main menu
3. Result : You must listen to the following sequence : sub-A, sub-B, 1, 2 ,A ,B ,C with the menu always visible
4. Action : Hit enter several time in the playlist button
5. Result : The sequence should restart from the begining and in the correct order
 
1. Action : go in 'playlist test' directory' and press enter on 'play all'
2. Action : Hit "next track", "c" keyboard shortcut
3. Result : Playback starts at track 2 of the list
4. Action : Hit next until the end of the playlist
5. Result : Last file is reached, playback continues until the end of the file

1. Action : go in 'playlist test' directory' and press enter on 'play all'
2. Action : Hit previous track keyboard shortcut 'x'
3. Result : Nothing happens, you already are at beginning of playlist, playback of track 1 continues

1. Action : go in 'playlist test' directory' and press enter on 'play all'
2. Action : Hit "next track", "c" keyboard shortcut
3. Result : Playback starts at track 2 of the list
4. Action : Hit previous track keyboard shortcut 'x'
5. Result : Playback starts at track 1 of the list

**Big Playlist Test** 

REQUIRES AN UPDATE

1. Action : go in your media root, and press enter on 'play all' several time
2. Result : you will hear the first song each time (and the song doesn't restart at the beginning each time ? )
 
***Playlist and file removed***

REQUIRES AN UPDATE

1. Action : go in 'remove_test'->'file tests'->'tree files' and press enter on 'play all', the first song start.
2. Action : remove '02.ogg' file during playback
3. Result : at the end of the first song, the 03.mp3 must be played. 
4. Action : go in 'remove_test' and press enter on 'play all'. now, remove 'remove_test' directory
5. Result : you will hear the first song
6. Action : go (with the left arrow) at the end of the song
7. Result : The next song will be played
8. Action : Remove 'remove_test' directory
9. Result : Playlist will stop at the end of the current song without errors.
