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

+17
View File
@@ -59,3 +59,20 @@ func TestPasteImagePreviewSnapshot(t *testing.T) {
ui.Column(c).Padding(20).Children(func() { PasteImagePreview(c, pasteImages()) })
})
}
func TestPasteImagePreviewKeyboard(t *testing.T) {
removed := ""
tt := ui.NewTester(func(c *ui.Context) {
Use(c, Settings{})
ui.Column(c).Padding(16).Children(func() {
if id, ok := PasteImagePreview(c, pasteImages()).Removed(); ok {
removed = id
}
})
}, 400, 160)
tt.Key(0, ui.KeyTab)
tt.Key(0, ui.KeyEnter)
if removed != "a" {
t.Fatalf("removed %q, want a", removed)
}
}