diff --git a/controller/internal/web/nav_accordion_test.go b/controller/internal/web/nav_accordion_test.go new file mode 100644 index 0000000..1d09d41 --- /dev/null +++ b/controller/internal/web/nav_accordion_test.go @@ -0,0 +1,137 @@ +package web + +import ( + "regexp" + "strings" + "testing" +) + +// v0.146.0 nav polish. The sidebar's collapsible groups are a PROGRESSIVE ENHANCEMENT: the server +// marks the group owning the active page with .is-open, so the correct group is already open before +// any JS runs and stays open if JS never runs at all. That server-side half is what these tests +// pin — the part a browser screenshot would confirm only for whichever page happened to be open. +// +// Red-proof: drop the `{{if $storageOpen}} is-open{{end}}` (or the matching aria-expanded) from +// layout.html and TestNavGroup_ActiveGroupRendersOpenServerSide fails. + +// navGroupRe finds a sidebar group