//go:build browser || webkit package thintest import ( "testing" "amadan.net/oficina/equipo/internal/wire" ) // newAlignRig is the roll-up conversation (a report that needs a merge // decision, with its decision card after it) plus a question whose words // wrap on a phone, so every Roster shape is on one screen. func newAlignRig(t *testing.T) *rollupRig { r := newRollupRig(t) if res := r.call("align-q", wire.ToolAskPerson, map[string]any{"question": "Yes. What should the website be about, and what would you like visitors to do there?", "options": []string{}}); res.Code != "asked" { t.Fatalf("ask: %+v", res) } if err := r.runner.Send(r.ctx, "align-reply", wire.FrameReply, wire.Reply{TurnID: r.turn, Attempt: 1, Text: "One question before I start."}); err != nil { t.Fatal(err) } r.wait("replied", func(c *Conversation) bool { return c.Turns[r.turn].State == wire.TurnReplied }) return r }