Validate providers and retain complete run debugging context

This commit is contained in:
2026-10-09 23:21:01 +01:00
parent f3d829bea5
commit 08b8647d5b
51 changed files with 1036 additions and 159 deletions
+17 -4
View File
@@ -48,8 +48,16 @@ func TestPipelineEditPickerHasTabNavigationFuzzySearchAndRetainedDraft(t *testin
m.editorInput.SetValue("nv")
updated, cmd := m.Update(tea.KeyMsg{Type: tea.KeyEnter})
m = updated.(Model)
if cmd == nil || m.editorOpen {
t.Fatal("editor selection did not launch")
if cmd != nil || m.editorOpen || m.mutationCommand == nil {
t.Fatal("editor selection did not require confirmation")
}
if items, _ := draft.List(); len(items) != 0 {
t.Fatal("draft created before approval")
}
updated, cmd = m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'y'}})
m = updated.(Model)
if cmd == nil {
t.Fatal("approved editor did not launch")
}
items, err := draft.List()
if err != nil || len(items) != 1 || items[0].BaseVersion != 4 || items[0].Server != m.url {
@@ -77,8 +85,13 @@ func TestNewPickerSupportsBothEditorsWithoutCreatingDraftOnCancel(t *testing.T)
m.editorInput.SetValue(choice)
updated, cmd := m.Update(tea.KeyMsg{Type: tea.KeyEnter})
m = updated.(Model)
if cmd == nil || m.editorOpen || m.confirmOpen || m.submitID != "" {
t.Fatal("new choice did not launch editor or bypassed publication")
if cmd != nil || m.editorOpen || m.mutationCommand == nil || m.confirmOpen || m.submitID != "" {
t.Fatal("new choice did not require approval or bypassed publication")
}
updated, cmd = m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'y'}})
m = updated.(Model)
if cmd == nil {
t.Fatal("approved editor did not launch")
}
}
items, err := draft.List()