Fix Android group browser scrolling
This commit is contained in:
@@ -775,6 +775,37 @@ func TestUIPhoneGroupBrowserToggleDoesNotChangeCurrentGroupToolsState(t *testing
|
||||
}
|
||||
}
|
||||
|
||||
func TestUIPhoneGroupBarDoesNotClampScrollableContentHeight(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
u := newUIWithModel("phone", vault.Model{
|
||||
Groups: [][]string{
|
||||
{"Crew"},
|
||||
{"Crew", "One"},
|
||||
{"Crew", "Two"},
|
||||
{"Crew", "Three"},
|
||||
{"Crew", "Four"},
|
||||
{"Crew", "Five"},
|
||||
{"Crew", "Six"},
|
||||
{"Crew", "Seven"},
|
||||
{"Crew", "Eight"},
|
||||
},
|
||||
})
|
||||
u.setCurrentPath([]string{"Crew"})
|
||||
|
||||
ops := new(op.Ops)
|
||||
gtx := layout.Context{
|
||||
Ops: ops,
|
||||
Constraints: layout.Exact(image.Pt(1080, 2400)),
|
||||
}
|
||||
|
||||
dims := u.groupBar(gtx)
|
||||
minOldCap := gtx.Dp(unit.Dp(220))
|
||||
if dims.Size.Y <= minOldCap {
|
||||
t.Fatalf("groupBar() phone height = %d, want > %d to avoid nested-scroll clamp", dims.Size.Y, minOldCap)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUIPhoneStartsWithGroupToolsCollapsed(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user