mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
introduce gui adapter
This commit is contained in:
@ -10,6 +10,10 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
type IntegrationTest interface {
|
||||
Run(guiAdapter *GuiAdapterImpl)
|
||||
}
|
||||
|
||||
func (gui *Gui) handleTestMode() {
|
||||
if integration.PlayingIntegrationTest() {
|
||||
test, ok := integration.CurrentIntegrationTest()
|
||||
@ -21,17 +25,7 @@ func (gui *Gui) handleTestMode() {
|
||||
go func() {
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
|
||||
shell := &integration.ShellImpl{}
|
||||
assert := &AssertImpl{gui: gui}
|
||||
keys := gui.Config.GetUserConfig().Keybinding
|
||||
input := NewInputImpl(gui, keys, assert, integration.KeyPressDelay())
|
||||
|
||||
test.Run(
|
||||
shell,
|
||||
input,
|
||||
assert,
|
||||
gui.c.UserConfig.Keybinding,
|
||||
)
|
||||
test.Run(&GuiAdapterImpl{gui: gui})
|
||||
|
||||
gui.g.Update(func(*gocui.Gui) error {
|
||||
return gocui.ErrQuit
|
||||
|
Reference in New Issue
Block a user