1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Support matchers on integers in integration tests

This commit is contained in:
Jesse Duffield
2023-06-03 15:12:31 +10:00
parent e98935f83e
commit dd34adb36c
15 changed files with 220 additions and 146 deletions

View File

@ -10,7 +10,7 @@ func (self *PromptDriver) getViewDriver() *ViewDriver {
}
// asserts that the popup has the expected title
func (self *PromptDriver) Title(expected *Matcher) *PromptDriver {
func (self *PromptDriver) Title(expected *TextMatcher) *PromptDriver {
self.getViewDriver().Title(expected)
self.hasCheckedTitle = true
@ -19,7 +19,7 @@ func (self *PromptDriver) Title(expected *Matcher) *PromptDriver {
}
// asserts on the text initially present in the prompt
func (self *PromptDriver) InitialText(expected *Matcher) *PromptDriver {
func (self *PromptDriver) InitialText(expected *TextMatcher) *PromptDriver {
self.getViewDriver().Content(expected)
return self
@ -55,13 +55,13 @@ func (self *PromptDriver) checkNecessaryChecksCompleted() {
}
}
func (self *PromptDriver) SuggestionLines(matchers ...*Matcher) *PromptDriver {
func (self *PromptDriver) SuggestionLines(matchers ...*TextMatcher) *PromptDriver {
self.t.Views().Suggestions().Lines(matchers...)
return self
}
func (self *PromptDriver) SuggestionTopLines(matchers ...*Matcher) *PromptDriver {
func (self *PromptDriver) SuggestionTopLines(matchers ...*TextMatcher) *PromptDriver {
self.t.Views().Suggestions().TopLines(matchers...)
return self
@ -75,7 +75,7 @@ func (self *PromptDriver) ConfirmFirstSuggestion() {
PressEnter()
}
func (self *PromptDriver) ConfirmSuggestion(matcher *Matcher) {
func (self *PromptDriver) ConfirmSuggestion(matcher *TextMatcher) {
self.t.press(self.t.keys.Universal.TogglePanel)
self.t.Views().Suggestions().
IsFocused().