")
grp := strings.Index(out, ``)
if nav < 0 || drop < nav || sum < drop || grp < sum {
t.Fatalf("nav=%d details=%d summary=%d grp=%d\n%s", nav, drop, sum, grp, out)
}
if !strings.Contains(out, `Filters`) {
t.Errorf("summary does not head with its word:\n%s", out)
}
// state and label are both in force, so both are named
for _, want := range []string{`open`, `bug`} {
if !strings.Contains(out, want) {
t.Errorf("summary does not name %q:\n%s", want, out)
}
}
if n := strings.Count(out, ""); n != 1 {
t.Errorf("details not closed once: %d", n)
}
}
// The column leads the list in the markup, because below 62rem it is a
// control above what it narrows rather than a note after it (#237).
func TestSidecolPrecedesTheList(t *testing.T) {
facets := listFacets(url.Values{"state": {"open"}}, []string{"open"}, "open", nil, nil, false)
out := renderIssues(t, facets)
if i, j := strings.Index(out, `class="sidecol"`), strings.Index(out, `class="colmain"`); i < 0 || j < i {
t.Errorf("sidecol=%d colmain=%d", i, j)
}
}