Add framework for playing game sounds at arbitrary times during the match.

This commit is contained in:
Patrick Fairbank
2019-04-12 18:40:35 -07:00
parent 3f48e4fb92
commit adb0bbada1
6 changed files with 40 additions and 10 deletions

View File

@@ -56,6 +56,7 @@ func TestAudienceDisplayWebsocket(t *testing.T) {
web.arena.AllianceStations["B3"].Bypass = true
web.arena.StartMatch()
web.arena.Update()
web.arena.Update()
messages := readWebsocketMultiple(t, ws, 3)
screen, ok := messages["audienceDisplayMode"]
if assert.True(t, ok) {
@@ -63,7 +64,7 @@ func TestAudienceDisplayWebsocket(t *testing.T) {
}
sound, ok := messages["playSound"]
if assert.True(t, ok) {
assert.Equal(t, "match-warmup", sound)
assert.Equal(t, "match-start", sound)
}
_, ok = messages["matchTime"]
assert.True(t, ok)