1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

migrate more tests

This commit is contained in:
Jesse Duffield
2023-02-22 21:57:32 +11:00
parent 22c10479d5
commit eabe7f462a
258 changed files with 380 additions and 548 deletions

View File

@ -159,6 +159,19 @@ func (self *TestDriver) ExpectClipboard(matcher *matcher) {
})
}
func (self *TestDriver) ExpectSearch() *SearchDriver {
self.inSearch()
return &SearchDriver{t: self}
}
func (self *TestDriver) inSearch() {
self.assertWithRetries(func() (bool, string) {
currentView := self.gui.CurrentContext().GetView()
return currentView.Name() == "search", "Expected search prompt to be focused"
})
}
// for making assertions through git itself
func (self *TestDriver) Git() *Git {
return &Git{assertionHelper: self.assertionHelper, shell: self.shell}