mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
introduce gui adapter
This commit is contained in:
parent
225c563c63
commit
46ae55f91e
20 changed files with 763 additions and 297 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue