oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1//go:build browser || webkit
2
3package thintest
4
5import (
6 "testing"
7
8 "amadan.net/oficina/equipo/internal/wire"
9)
10
11// newAlignRig is the roll-up conversation (a report that needs a merge
12// decision, with its decision card after it) plus a question whose words
13// wrap on a phone, so every Roster shape is on one screen.
14func newAlignRig(t *testing.T) *rollupRig {
15 r := newRollupRig(t)
16 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" {
17 t.Fatalf("ask: %+v", res)
18 }
19 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 {
20 t.Fatal(err)
21 }
22 r.wait("replied", func(c *Conversation) bool { return c.Turns[r.turn].State == wire.TurnReplied })
23 return r
24}
25