Esempio n. 1
0
func cmdAndAssert(key string, selectedPlaylist string, selectedTrack string, playlistPosition int) {
	cmd(key)
	if !ui.CuiAssertSelectedPlaylist(selectedPlaylist) {
		output.WriteString("Playlist '" + selectedPlaylist + "' not found on position " + strconv.Itoa(playlistPosition))
		cmd("q")
	}
	sleep()
}
Esempio n. 2
0
func assert(expectedPlaylist string, expectedTrack string) {
	if valid, actualPlaylist := ui.CuiAssertSelectedPlaylist(expectedPlaylist); !valid {
		output.WriteString(fmt.Sprintf("Playlist '%v' not found on position but '%v'", expectedPlaylist, actualPlaylist))
		cmd("q")
		panic("Boom!")
	}
	if expectedTrack != "" {
		if valid, actualTrack := ui.CuiAssertSelectedTrack(expectedTrack); !valid {
			output.WriteString(fmt.Sprintf("Track '%v' not found but '%v'", expectedTrack, actualTrack))
			cmd("q")
			panic("Boom!")
		}
	}
}