-
Notifications
You must be signed in to change notification settings - Fork 2
Home
duganchen edited this page Jul 21, 2020
·
4 revisions
Quetzalcoatl 2 is has a Model View Presenter architecture, with the Presenter in a separate library called the Controller. Generally speaking, the Presenter is placed behind both the main window and the QAbstractItemModel subclasses. The plan is to have QTest integration-test the Presenter by spinning up instances of MPD.
This has unfortunately turned out to be somewhat brittle. You need to wait for a certain amount of time between starting that instance of MPD and connecting to it, and there seems to be no way to determine how much time apart from trial and error. It's obviously going to be system-dependent.
Nevertheless, here are some things to test:
- attempting to connect when MPD is not running
- attempting to connect to a Unix socket path that doesn't exist
- connecting successfully
- The connection was lost (and make sure you can reconnect!)
- An update was completed
- The queue was modified
- The list of stored playlists changed
- The player state changed from "not playing" to "playing"
- "Random" was toggled
- Repeat" was toggled
- Songs in the queue were selected
- The queue was saved (error conditions?)
- A song in the queue was double-clicked on
- The song progress slider was dragged
- "Playlists" node is expanded and a playlist is doubleclicked
- "Genres" node is expanded until the user double-clicks on a song in "All Songs"
- "Genres" node is expanded until the user double clicks on a song under an album
- "Albums" node is expanded until the user double clicks on a song
- "Artists" node is expanded until the user double clicks on a song under "All Songs"
- "Albums" node is expanded until the user double clicks on a song
- "/" node is expanded until the user double clicks on a song
- "Songs" node is expanded and the user double clicks on a song
- Songs are dragged around in the playlist
- Songs are dragged from the database to the playlist