Offer nvim or OpenCode when creating a pipeline
This commit is contained in:
@@ -40,8 +40,14 @@ func TestCreateAndSubmit(t *testing.T) {
|
||||
var editor tea.Cmd
|
||||
updated, editor = m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'n'}})
|
||||
m = updated.(Model)
|
||||
if editor == nil {
|
||||
t.Fatal("n should launch authoring directly, without a questionnaire")
|
||||
if editor == nil || !m.editorOpen || !m.editorDraft.createOnly {
|
||||
t.Fatal("n should offer an editor for a new create-only draft")
|
||||
}
|
||||
m.editorInput.SetValue("ocd")
|
||||
updated, editor = m.Update(tea.KeyMsg{Type: tea.KeyEnter})
|
||||
m = updated.(Model)
|
||||
if editor == nil || m.editorOpen {
|
||||
t.Fatal("new editor choice did not launch")
|
||||
}
|
||||
// Editor lifecycle is smoke-tested separately; feed its completion here.
|
||||
source := pipeline.Template([]string{"a", "b"}, true)
|
||||
|
||||
Reference in New Issue
Block a user