mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Add demo test variant
We're piggybacking on our existing integration test framework to record demos that we can include in our docs
This commit is contained in:
@ -42,7 +42,11 @@ func (self *GuiDriver) PressKey(keyStr string) {
|
||||
0,
|
||||
)
|
||||
|
||||
// wait until lazygit is idle (i.e. all processing is done) before continuing
|
||||
self.waitTillIdle()
|
||||
}
|
||||
|
||||
// wait until lazygit is idle (i.e. all processing is done) before continuing
|
||||
func (self *GuiDriver) waitTillIdle() {
|
||||
<-self.isIdleChan
|
||||
}
|
||||
|
||||
@ -111,3 +115,13 @@ func (self *GuiDriver) View(viewName string) *gocui.View {
|
||||
}
|
||||
return view
|
||||
}
|
||||
|
||||
func (self *GuiDriver) SetCaption(caption string) {
|
||||
self.gui.setCaption(caption)
|
||||
self.waitTillIdle()
|
||||
}
|
||||
|
||||
func (self *GuiDriver) SetCaptionPrefix(prefix string) {
|
||||
self.gui.setCaptionPrefix(prefix)
|
||||
self.waitTillIdle()
|
||||
}
|
||||
|
Reference in New Issue
Block a user