mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
migrate staging tests
This commit is contained in:
@ -28,7 +28,21 @@ func (self *CommitMessagePanelDriver) AddNewline() *CommitMessagePanelDriver {
|
||||
}
|
||||
|
||||
func (self *CommitMessagePanelDriver) Clear() *CommitMessagePanelDriver {
|
||||
panic("Clear method not yet implemented!")
|
||||
// clearing multiple times in case there's multiple lines
|
||||
// (the clear button only clears a single line at a time)
|
||||
maxAttempts := 100
|
||||
for i := 0; i < maxAttempts+1; i++ {
|
||||
if self.getViewDriver().getView().Buffer() == "" {
|
||||
break
|
||||
}
|
||||
|
||||
self.t.press(ClearKey)
|
||||
if i == maxAttempts {
|
||||
panic("failed to clear commit message panel")
|
||||
}
|
||||
}
|
||||
|
||||
return self
|
||||
}
|
||||
|
||||
func (self *CommitMessagePanelDriver) Confirm() {
|
||||
|
Reference in New Issue
Block a user