2021-07-22 16:44:16 +02:00
|
|
|
package gui
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/commands"
|
2021-07-22 19:45:43 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
2021-07-22 16:44:16 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/i18n"
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/updates"
|
2021-07-22 19:45:43 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
2021-07-22 16:44:16 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewDummyGui creates a new dummy GUI for testing
|
|
|
|
func NewDummyUpdater() *updates.Updater {
|
2021-08-27 09:00:53 +02:00
|
|
|
newAppConfig := config.NewDummyAppConfig()
|
|
|
|
DummyUpdater, _ := updates.NewUpdater(utils.NewDummyLog(), newAppConfig, oscommands.NewDummyOSCommand(), i18n.NewTranslationSet(utils.NewDummyLog(), newAppConfig.GetUserConfig().Gui.Language))
|
2021-07-22 19:45:43 +02:00
|
|
|
return DummyUpdater
|
2021-07-22 16:44:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewDummyGui() *Gui {
|
2021-08-27 09:00:53 +02:00
|
|
|
newAppConfig := config.NewDummyAppConfig()
|
|
|
|
DummyGui, _ := NewGui(utils.NewDummyLog(), commands.NewDummyGitCommand(), oscommands.NewDummyOSCommand(), i18n.NewTranslationSet(utils.NewDummyLog(), newAppConfig.GetUserConfig().Gui.Language), newAppConfig, NewDummyUpdater(), "", false)
|
2021-07-22 16:44:16 +02:00
|
|
|
return DummyGui
|
|
|
|
}
|