1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-10 11:10:18 +02:00
lazygit/pkg/integration/components/commit_description_panel_driver.go
Jesse Duffield 7807b40322 Better tag creation UX
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message
prompt.

I've had to update other uses of that prompt to allow the summary and description labels to
be passed in
2023-07-22 14:36:35 +10:00

32 lines
810 B
Go

package components
type CommitDescriptionPanelDriver struct {
t *TestDriver
}
func (self *CommitDescriptionPanelDriver) getViewDriver() *ViewDriver {
return self.t.Views().CommitDescription()
}
func (self *CommitDescriptionPanelDriver) Type(value string) *CommitDescriptionPanelDriver {
self.t.typeContent(value)
return self
}
func (self *CommitDescriptionPanelDriver) SwitchToSummary() *CommitMessagePanelDriver {
self.getViewDriver().PressTab()
return &CommitMessagePanelDriver{t: self.t}
}
func (self *CommitDescriptionPanelDriver) AddNewline() *CommitDescriptionPanelDriver {
self.t.press(self.t.keys.Universal.Confirm)
return self
}
func (self *CommitDescriptionPanelDriver) Title(expected *TextMatcher) *CommitDescriptionPanelDriver {
self.getViewDriver().Title(expected)
return self
}