mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-10 04:07:18 +02:00
3ebba5f32c
SplitCommitMessageAndDescription splits at the first '\n\n' that it finds (if there is one), which in this case is between the two paragraphs of the description. This is wrong.
43 lines
1.1 KiB
Go
43 lines
1.1 KiB
Go
package components
|
|
|
|
type CommitDescriptionPanelDriver struct {
|
|
t *TestDriver
|
|
}
|
|
|
|
func (self *CommitDescriptionPanelDriver) getViewDriver() *ViewDriver {
|
|
return self.t.Views().CommitDescription()
|
|
}
|
|
|
|
// asserts on the current context of the description
|
|
func (self *CommitDescriptionPanelDriver) Content(expected *TextMatcher) *CommitDescriptionPanelDriver {
|
|
self.getViewDriver().Content(expected)
|
|
|
|
return self
|
|
}
|
|
|
|
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.pressFast(self.t.keys.Universal.Confirm)
|
|
return self
|
|
}
|
|
|
|
func (self *CommitDescriptionPanelDriver) Title(expected *TextMatcher) *CommitDescriptionPanelDriver {
|
|
self.getViewDriver().Title(expected)
|
|
|
|
return self
|
|
}
|
|
|
|
func (self *CommitDescriptionPanelDriver) Cancel() {
|
|
self.getViewDriver().PressEscape()
|
|
}
|