0.2.66 - End Credits improvements / Gateway: 0.1.47 - End credits redesign
This commit is contained in:
@@ -270,23 +270,18 @@ func TestMaskMarkersWithholdsOnlyTheDisabledHalf(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The toggle a television is told to obey has to be one this build knows.
|
||||
func TestSpeedUpCreditsIsCatalogued(t *testing.T) {
|
||||
definition, ok := preferenceDefinitionFor("speedUpCredits")
|
||||
if !ok {
|
||||
t.Fatal("speedUpCredits is missing from the preference catalogue")
|
||||
}
|
||||
if definition.Kind != preferenceToggle {
|
||||
t.Fatalf("kind = %v, want a toggle", definition.Kind)
|
||||
}
|
||||
if definition.Default != true {
|
||||
t.Fatalf("default = %v, want true — the feature is that it happens unasked, and it "+
|
||||
"is visible and reversible in a way an automatic seek is not", definition.Default)
|
||||
// The credits pane is not a viewer preference any more, and this pins the removal from both
|
||||
// ends: the key is gone from the catalogue, and a document still carrying it — written by a
|
||||
// television or an operator before the removal — has it dropped rather than round-tripped.
|
||||
// Without the second half a stored `false` would survive every sync and quietly keep the
|
||||
// feature off on the one set that had turned it off.
|
||||
func TestSpeedUpCreditsIsNoLongerAPreference(t *testing.T) {
|
||||
if _, ok := preferenceDefinitionFor("speedUpCredits"); ok {
|
||||
t.Fatal("speedUpCredits is still in the preference catalogue")
|
||||
}
|
||||
|
||||
// An illegal value must come back as the default rather than reaching a player.
|
||||
normalised := normalizePreferences(map[string]any{"speedUpCredits": "sometimes"})
|
||||
if normalised["speedUpCredits"] != true {
|
||||
t.Fatalf("normalised = %v, want true", normalised["speedUpCredits"])
|
||||
normalised := normalizePreferences(map[string]any{"speedUpCredits": false})
|
||||
if _, present := normalised["speedUpCredits"]; present {
|
||||
t.Fatal("a stored speedUpCredits must be dropped, not carried forward")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user