Run tasks directly with language-independent project tools
This commit is contained in:
@@ -41,7 +41,7 @@ func TestCLIPickerAndMultilinePrompt(t *testing.T) {
|
||||
m.runPrompt.SetValue("line one\nline two")
|
||||
updated, _ = m.updateRunForm(tea.KeyMsg{Type: tea.KeyCtrlS})
|
||||
m = updated.(Model)
|
||||
if m.runForm != 2 || m.runTask != "line one\nline two" {
|
||||
if m.runForm != 0 || !m.runOpen || m.runTask != "line one\nline two" {
|
||||
t.Fatal("multiline prompt lost")
|
||||
}
|
||||
}
|
||||
@@ -61,12 +61,12 @@ func TestDashboardRunUsesInvocationDirectory(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCLISuppliedArgumentsStillRequireConfirmation(t *testing.T) {
|
||||
func TestCLISuppliedArgumentsStartWithoutConfirmation(t *testing.T) {
|
||||
m := NewRun(context.Background(), "", RunOptions{Pipeline: "test", Prompt: "task", Workspace: "/repos/a"})
|
||||
m.detail = &protocol.PipelineDetail{PipelineSummary: protocol.PipelineSummary{ID: 1, Name: "test", Version: 1}}
|
||||
updated, _ := m.configureCLIRun()
|
||||
m = updated.(Model)
|
||||
if m.runForm != 3 || m.runOpen || m.runTask != "task" || m.runWorkspace != "/repos/a" {
|
||||
t.Fatal("arguments skipped approval or lost repository")
|
||||
if m.runForm != 0 || !m.runOpen || m.runTask != "task" || m.runWorkspace != "/repos/a" {
|
||||
t.Fatal("supplied task did not start immediately or lost repository")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user