Choices: review r1 fixes

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:11:39 -04:00
1 parent cfdccfec5c
commit 82471ab0bf
40 files changed
+774 -209

No files matched your search

+2 -14
View File
@@ -21,7 +21,7 @@ func TestRangeSliderKeysPerThumb(t *testing.T) {
low, high, changes := 20.0, 80.0, 0
tt := rangeTester(&low, &high, RangeSliderOptions{Step: 10, Label: "Price"}, &changes)
tt.Key(0, ui.KeyTab)
if !tt.Focused("Price minimum, 20") {
if !tt.Focused("Price minimum") {
t.Fatal("first Tab did not focus the low thumb")
}
tt.Key(0, ui.KeyRight)
@@ -37,7 +37,7 @@ func TestRangeSliderKeysPerThumb(t *testing.T) {
t.Fatalf("low crossed high: %v", low)
}
tt.Key(0, ui.KeyTab)
if !tt.Focused("Price maximum, 80") {
if !tt.Focused("Price maximum") {
t.Fatal("second Tab did not focus the high thumb")
}
tt.Key(0, ui.KeyLeft)
@@ -77,18 +77,6 @@ func TestRangeSliderOrdersSwappedEnds(t *testing.T) {
}
}
func TestRangeSliderDisabled(t *testing.T) {
low, high, changes := 20.0, 40.0, 0
tt := rangeTester(&low, &high, RangeSliderOptions{Disabled: true}, &changes)
tt.Key(0, ui.KeyTab)
tt.Key(0, ui.KeyRight)
tt.Press(150, 18)
tt.Release(150, 18)
if low != 20 || high != 40 || changes != 0 {
t.Fatalf("disabled moved: %v..%v", low, high)
}
}
func TestRangeSliderSnapshot(t *testing.T) {
snapshot(t, "range_slider", 420, 170, func(c *ui.Context) {
a, b := 20.0, 70.0