mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Add integration test for accordion mode
This commit is contained in:
@@ -522,9 +522,29 @@ var RuneReplacements = map[rune]string{
|
||||
}
|
||||
|
||||
func (gui *Gui) initGocui(headless bool, test integrationTypes.IntegrationTest) (*gocui.Gui, error) {
|
||||
playRecording := test != nil && os.Getenv(components.SANDBOX_ENV_VAR) != "true"
|
||||
runInSandbox := os.Getenv(components.SANDBOX_ENV_VAR) == "true"
|
||||
playRecording := test != nil && !runInSandbox
|
||||
|
||||
g, err := gocui.NewGui(gocui.OutputTrue, OverlappingEdges, playRecording, headless, RuneReplacements)
|
||||
width, height := 0, 0
|
||||
if test != nil {
|
||||
if test.RequiresHeadless() {
|
||||
if runInSandbox {
|
||||
panic("Test requires headless, can't run in sandbox")
|
||||
}
|
||||
headless = true
|
||||
}
|
||||
width, height = test.HeadlessDimensions()
|
||||
}
|
||||
|
||||
g, err := gocui.NewGui(gocui.NewGuiOpts{
|
||||
OutputMode: gocui.OutputTrue,
|
||||
SupportOverlaps: OverlappingEdges,
|
||||
PlayRecording: playRecording,
|
||||
Headless: headless,
|
||||
RuneReplacements: RuneReplacements,
|
||||
Width: width,
|
||||
Height: height,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user