Overlays: review r1 fixes
This commit is contained in:
41 files changed
+770
-278
No files matched your search
+10
-5
@@ -92,14 +92,19 @@ func TestContextMenuDisabled(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestContextMenuSnapshot(t *testing.T) {
|
||||
snapshot(t, "context_menu", 460, 320, func(c *ui.Context) {
|
||||
a := &menuApp{}
|
||||
a := &menuApp{}
|
||||
overlaySnapshot(t, "context_menu", 460, 320, func(c *ui.Context) {
|
||||
ui.Column(c).Padding(20).Children(func() {
|
||||
row := ui.Row(c).Height(36).FillWidth().Padding(0, 12).AlignItems(ui.Center).Background(Tokens(c).Selection)
|
||||
row.Children(func() { ui.Text(c, "Letter to the Countess") })
|
||||
anchor := ui.Box(c).Absolute().Left(140).Top(48).Size(1, 1)
|
||||
open := true
|
||||
popupMenuOpen(c, anchor, &open, a.build)
|
||||
ContextMenu(c, row, ContextMenuOptions{}, a.build)
|
||||
})
|
||||
}, func(tt *ui.Tester) {
|
||||
tt.RightClickAt(160, 40)
|
||||
r, ok := tt.Find("Pinned")
|
||||
if !ok {
|
||||
t.Fatal("menu did not open")
|
||||
}
|
||||
tt.Move(r.X+4, r.Y+4) // hover highlight on Pinned
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user