WIP components (as built)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 15:51:57 -04:00
1 parent a22527cceb
commit ade219840e
70 files changed
+2610 -235

No files matched your search

+13
View File
@@ -4,6 +4,7 @@ import (
"testing"
"github.com/egoist/mygo/ui"
"mujicaui/theme"
)
func TestModeSelectorClickAndArrows(t *testing.T) {
@@ -60,3 +61,15 @@ func TestModeSelectorSnapshot(t *testing.T) {
})
})
}
func TestModeSelectorSelectionSurface(t *testing.T) {
mode := ModeResearch
tt := ui.NewTester(func(c *ui.Context) { Use(c, Settings{}); ModeSelector(c, &mode, ModeSelectorOptions{}) }, 600, 100)
tt.SetPreferences(ui.Preferences{ReduceMotion: true, TextScale: 1})
b, _ := tt.Find("Deep research")
pixel := tt.Image().RGBAAt(int(b.X+4), int(b.Y+4))
k := theme.Light()
if pixel.R != k.Selection.R || pixel.G != k.Selection.G || pixel.B != k.Selection.B {
t.Fatalf("selected surface %v, want Selection %v", pixel, k.Selection)
}
}