aboutsummaryrefslogtreecommitdiffstats
path: root/midi_launchpad_mini_integrationtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'midi_launchpad_mini_integrationtest.py')
-rw-r--r--midi_launchpad_mini_integrationtest.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/midi_launchpad_mini_integrationtest.py b/midi_launchpad_mini_integrationtest.py
index 35ac087..615ef49 100644
--- a/midi_launchpad_mini_integrationtest.py
+++ b/midi_launchpad_mini_integrationtest.py
@@ -345,3 +345,24 @@ def test_initializationMessages(uut, midiWrapperMock):
sentMessagesSet = set(midiWrapperMock.sentMessages)
assert sentMessagesSet == expectedMessages
+def test_playingFeedbackWhenChangingSong(uut, midiWrapperMock, soloTool, playerMock):
+ nextSongButton = 119
+ previousSongButton = 118
+ playPauseButton = 112
+ songs = [
+ "test.flac",
+ "test.mp3"
+ ]
+ for s in songs:
+ soloTool.addSong(s)
+ uut.connect()
+
+ soloTool.setSong(0)
+ soloTool.play()
+ assert playerMock.state == PlayerMock.PLAYING
+ assert midiWrapperMock.getLatestMessage() == (playPauseButton, LED_GREEN, 0)
+
+ soloTool.nextSong()
+ assert playerMock.state == PlayerMock.STOPPED
+ assert midiWrapperMock.getLatestMessage() == (playPauseButton, LED_YELLOW, 0)
+