Add test demonstrating a bug with preserving the commit message

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.
This commit is contained in:
Stefan Haller 2023-12-19 16:44:16 +01:00
parent 9a423c388d
commit 3ebba5f32c
3 changed files with 60 additions and 0 deletions

View file

@ -8,6 +8,13 @@ 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)
@ -29,3 +36,7 @@ func (self *CommitDescriptionPanelDriver) Title(expected *TextMatcher) *CommitDe
return self
}
func (self *CommitDescriptionPanelDriver) Cancel() {
self.getViewDriver().PressEscape()
}