feat: show no-WFB kiosk fallback only while video absent (#2)
Build Ground Station / build (push) Successful in 44s
Build Ground Station / build (push) Successful in 44s
This commit was merged in pull request #9.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package display
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestVideoPresenceTransitionsReportChange(t *testing.T) {
|
||||
presence := NewVideoPresence()
|
||||
|
||||
if presence.Active() {
|
||||
t.Fatal("video must be absent before any signal")
|
||||
}
|
||||
if !presence.SetActive(true) {
|
||||
t.Fatal("first video appearance must report a change")
|
||||
}
|
||||
if !presence.Active() {
|
||||
t.Fatal("video must be active after appearance")
|
||||
}
|
||||
if presence.SetActive(true) {
|
||||
t.Fatal("repeated appearance must not report a change")
|
||||
}
|
||||
if !presence.SetActive(false) {
|
||||
t.Fatal("video end must report a change")
|
||||
}
|
||||
if presence.Active() {
|
||||
t.Fatal("video must be inactive after end")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user