2021-07-22 15:44:16 +01:00
|
|
|
package gui
|
|
|
|
|
|
|
|
import (
|
2021-07-22 19:45:43 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
2021-07-22 15:44:16 +01:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/updates"
|
2021-07-22 19:45:43 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
2021-07-22 15:44:16 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewDummyGui creates a new dummy GUI for testing
|
|
|
|
func NewDummyUpdater() *updates.Updater {
|
2021-08-27 15:00:53 +08:00
|
|
|
newAppConfig := config.NewDummyAppConfig()
|
2021-12-29 12:03:35 +11:00
|
|
|
dummyUpdater, _ := updates.NewUpdater(utils.NewDummyCommon(), newAppConfig, oscommands.NewDummyOSCommand())
|
2021-12-06 21:08:36 +11:00
|
|
|
return dummyUpdater
|
2021-07-22 15:44:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewDummyGui() *Gui {
|
2021-08-27 15:00:53 +08:00
|
|
|
newAppConfig := config.NewDummyAppConfig()
|
2022-01-02 10:34:33 +11:00
|
|
|
dummyGui, _ := NewGui(utils.NewDummyCommon(), newAppConfig, utils.NewDummyGitConfig(), NewDummyUpdater(), "", false)
|
2021-12-06 21:08:36 +11:00
|
|
|
return dummyGui
|
2021-07-22 15:44:16 +01:00
|
|
|
}
|