mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-08 22:52:12 +02:00
Don't wait in integration tests when running in headless mode
There's no point in spending time waiting in this case, as nobody can see it.
This commit is contained in:
@@ -84,6 +84,8 @@ func (self *fakeGuiDriver) NextToast() *string {
|
||||
|
||||
func (self *fakeGuiDriver) CheckAllToastsAcknowledged() {}
|
||||
|
||||
func (self *fakeGuiDriver) Headless() bool { return false }
|
||||
|
||||
func TestManualFailure(t *testing.T) {
|
||||
test := NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: unitTestDescription,
|
||||
|
@@ -601,7 +601,9 @@ func (self *ViewDriver) SetCaptionPrefix(prefix string) *ViewDriver {
|
||||
}
|
||||
|
||||
func (self *ViewDriver) Wait(milliseconds int) *ViewDriver {
|
||||
self.t.Wait(milliseconds)
|
||||
if !self.t.gui.Headless() {
|
||||
self.t.Wait(milliseconds)
|
||||
}
|
||||
|
||||
return self
|
||||
}
|
||||
|
Reference in New Issue
Block a user