1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00
lazygit/pkg/integration/tests/demo/commit_graph.go
Jesse Duffield 621229bb09 Default to half-screen mode when filtering files or using the git-arg CLI arg
It should have been half-screen from the get-go. I think I just used
full-screen to make demos look nicer. Now that we have a CLI arg for the
screen mode we can make use of that in the demos.
2025-01-02 16:10:58 +11:00

74 lines
1.4 KiB
Go

package demo
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var CommitGraph = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Show commit graph",
ExtraCmdArgs: []string{"log", "--screen-mode=full"},
Skip: false,
IsDemo: true,
SetupConfig: func(config *config.AppConfig) {
setDefaultDemoConfig(config)
setGeneratedAuthorColours(config)
},
SetupRepo: func(shell *Shell) {
shell.CreateRepoHistory()
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.SetCaptionPrefix("View commit log")
t.Wait(1000)
t.Views().Commits().
IsFocused().
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100).
SelectNextItem().
Wait(100)
},
})