package thintest import ( "io" "net/http" "strings" "testing" ) // TestPagesSettingsRail: Paul, 2026-11-10: "The settings nav should // probably replace the main nav on this view, right?" Every Settings page // carries the Settings nav in the rail itself: "‹ Equipo" first (to the // Conversation without scripts), then the sections, Add a connection // under Connections, the current one marked. The rail marks its nav as // arriving only when the person crossed into or out of Settings. func TestPagesSettingsRail(t *testing.T) { r := &toolRig{rig: newRig(t)} owner := r.inst.Cookie() get := func(path, referer string) string { t.Helper() req, _ := http.NewRequest("GET", r.inst.URL+path, nil) req.AddCookie(owner) if referer != "" { req.Header.Set("Referer", r.inst.URL+referer) } res, err := http.DefaultClient.Do(req) if err != nil { t.Fatal(err) } defer res.Body.Close() raw, _ := io.ReadAll(res.Body) if res.StatusCode != 200 { t.Fatalf("GET %s: %d", path, res.StatusCode) } return string(raw) } rail := func(page string) string { _, after, ok := strings.Cut(page, "