package tui import ( "strings" "testing" "git.a-wan.net/alan/pipelines/internal/protocol" ) // TestEvidenceLinesShowEffectiveModel proves the Evidence pane renders the // provider/model a step actually ran with, so a launch-time override is visible // rather than the pinned model. func TestEvidenceLinesShowEffectiveModel(t *testing.T) { step := protocol.RunStep{Sequence: 1, Stage: "one", Status: "completed", Outcome: "success", Provider: "acme", Model: "strong"} text := strings.Join(evidenceLines(step), "\n") if !strings.Contains(text, "acme/strong") { t.Fatalf("evidence pane omitted the effective model:\n%s", text) } // A non-model step records no provider/model and shows no model line. plain := strings.Join(evidenceLines(protocol.RunStep{Sequence: 2, Stage: "note", Status: "completed", Outcome: "success"}), "\n") if strings.Contains(plain, "Ran with model:") { t.Fatalf("non-model step claimed a model:\n%s", plain) } }