mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
refactor to ensure code doesn't depend on integration code
This commit is contained in:
@ -12,10 +12,10 @@ import (
|
||||
// through this struct we assert on the state of the lazygit gui
|
||||
|
||||
type Assert struct {
|
||||
gui integrationTypes.GuiAdapter
|
||||
gui integrationTypes.GuiDriver
|
||||
}
|
||||
|
||||
func NewAssert(gui integrationTypes.GuiAdapter) *Assert {
|
||||
func NewAssert(gui integrationTypes.GuiDriver) *Assert {
|
||||
return &Assert{gui: gui}
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,13 @@ import (
|
||||
)
|
||||
|
||||
type Input struct {
|
||||
gui integrationTypes.GuiAdapter
|
||||
gui integrationTypes.GuiDriver
|
||||
keys config.KeybindingConfig
|
||||
assert *Assert
|
||||
pushKeyDelay int
|
||||
}
|
||||
|
||||
func NewInput(gui integrationTypes.GuiAdapter, keys config.KeybindingConfig, assert *Assert, pushKeyDelay int) *Input {
|
||||
func NewInput(gui integrationTypes.GuiDriver, keys config.KeybindingConfig, assert *Assert, pushKeyDelay int) *Input {
|
||||
return &Input{
|
||||
gui: gui,
|
||||
keys: keys,
|
||||
|
@ -81,7 +81,7 @@ func (self *IntegrationTest) SetupRepo(shell *Shell) {
|
||||
}
|
||||
|
||||
// I want access to all contexts, the model, the ability to press a key, the ability to log,
|
||||
func (self *IntegrationTest) Run(gui integrationTypes.GuiAdapter) {
|
||||
func (self *IntegrationTest) Run(gui integrationTypes.GuiDriver) {
|
||||
shell := NewShell()
|
||||
assert := NewAssert(gui)
|
||||
keys := gui.Keys()
|
||||
|
Reference in New Issue
Block a user