aboutsummaryrefslogtreecommitdiffstats
path: root/midi_launchpad_mini_integrationtest.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-09 18:48:55 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-09 18:48:55 +0100
commitd6403961e778db1f0f6a5e45147770714449fa8c (patch)
tree6c5f5c5820ac5f6b2b4b5072496c5d2f22f0148f /midi_launchpad_mini_integrationtest.py
parentc2d40c6dc0c14edd96bf9832d097347b15f672e3 (diff)
Fixed MIDI controller bug
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)
+