package thintest import ( "net/url" "regexp" "strings" "testing" ) // TestPagesEmptyConversationStarters: the empty conversation is a drawing // hidden from screen readers, a heading and a named group of three real // buttons (Paul, 2026-11-20: "something that just entices you to type a // first message"). Without script a starter is a GET that opens the // conversation with its words in the composer; any other value drafts // nothing. func TestPagesEmptyConversationStarters(t *testing.T) { // A rig with no message sent: the conversation is empty. r := &toolRig{rig: newRig(t)} owner := r.inst.Cookie() page := r.get(owner, "/conversation", 200) welcome := regexp.MustCompile(`(?s)
  • .*?
  • `).FindString(page) for _, want := range []string{ `

    What needs doing?

    `, `
    `, ``, ``, ``, } { if !strings.Contains(welcome, want) { t.Fatalf("empty conversation lacks %q:\n%s", want, welcome) } } if strings.Contains(page, "Your coordinator picks the project") { t.Fatal("the old empty line is still there") } for k, draft := range map[string]string{"bug": "Fix a bug where ", "feature": "Plan a feature that ", "project": "What’s the latest on "} { if c := r.get(owner, "/conversation?start="+k, 200); !strings.Contains(c, `autofocus>`+draft+``) { t.Fatalf("start=%s composer:\n%s", k, regexp.MustCompile(`(?s)