Commit 59a85d8e authored by Tranter Madi's avatar Tranter Madi 🌧
Browse files

[autotest] Add test for PlayListEntry's play button

parent 3fd169f7
Pipeline #62479 passed with stage
in 8 minutes and 12 seconds
......@@ -23,7 +23,6 @@ Item {
isSingleDiscAlbum: false
title: "hello"
isValid: true
isPlaying: MediaPlayList.IsPaused
isSelected: true
containsMouse: false
......@@ -98,6 +97,8 @@ Item {
mouseMove(playPauseButtonItem, playPauseButtonItem.width / 2, playPauseButtonItem.height / 2);
wait(300);
// play
playListEntry.isPlaying = MediaPlayList.NotPlaying
mouseClick(playPauseButtonItem);
compare(startPlaybackSpy.count, 1);
......@@ -105,6 +106,23 @@ Item {
compare(removeFromPlaylistSpy.count, 0);
compare(switchToTrackSpy.count, 1);
// pause
playListEntry.isPlaying = MediaPlayList.IsPlaying
mouseClick(playPauseButtonItem);
compare(startPlaybackSpy.count, 1);
compare(pausePlaybackSpy.count, 1);
compare(removeFromPlaylistSpy.count, 0);
compare(switchToTrackSpy.count, 1);
// resume
playListEntry.isPlaying = MediaPlayList.IsPaused
mouseClick(playPauseButtonItem);
compare(startPlaybackSpy.count, 2);
compare(pausePlaybackSpy.count, 1);
compare(removeFromPlaylistSpy.count, 0);
compare(switchToTrackSpy.count, 1);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment