From d6403961e778db1f0f6a5e45147770714449fa8c Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sun, 9 Jan 2022 18:48:55 +0100 Subject: Fixed MIDI controller bug --- midi_launchpad_mini_integrationtest.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'midi_launchpad_mini_integrationtest.py') 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) + -- cgit v1.2.3