1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-04 04:22:37 +03:00

refactor prompt handling in integration tests

This commit is contained in:
Jesse Duffield
2022-12-27 10:50:00 +11:00
parent 17140e1d8d
commit c976839a63
12 changed files with 114 additions and 25 deletions

View File

@@ -215,18 +215,10 @@ func (self *Input) NavigateToListItem(matcher *matcher) {
}
}
func (self *Input) AcceptConfirmation(title *matcher, content *matcher) {
func (self *Input) InConfirm() *ConfirmationAsserter {
self.assert.InConfirm()
self.assert.CurrentView().Title(title)
self.assert.CurrentView().Content(content)
self.Confirm()
}
func (self *Input) DenyConfirmation(title *matcher, content *matcher) {
self.assert.InConfirm()
self.assert.CurrentView().Title(title)
self.assert.CurrentView().Content(content)
self.Cancel()
return &ConfirmationAsserter{assert: self.assert, input: self}
}
func (self *Input) Prompt(title *matcher, textToType string) {