/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
pkg/integration/tests/ui/hide_side_panel.go
33 строки
1014 B
Stefan Haller
Add integration tests for configuring the side panels
23 июн 2026, 15:15
23 июн 2026, 15:15
196f820
Код
Авторство
О чём код?
package ui import ( "github.com/jesseduffield/lazygit/pkg/config" . "github.com/jesseduffield/lazygit/pkg/integration/components" ) var HideSidePanel = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Hide a side panel by omitting it from gui.sidePanels", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(cfg *config.AppConfig) { // No stash panel. cfg.GetUserConfig().Gui.SidePanels = []config.SidePanel{ {"status"}, {"files", "worktrees", "submodules"}, {"branches", "remotes", "tags"}, {"commits", "reflog"}, } }, SetupRepo: func(shell *Shell) { shell.CreateNCommits(2) }, Run: func(t *TestDriver, keys config.KeybindingConfig) { // Commits is now the last panel; cycling forward from it wraps around to // the status panel, skipping the hidden stash panel entirely. t.Views().Files().IsFocused(). Press(keys.Universal.JumpToBlock[3]) t.Views().Commits().IsFocused(). Press(keys.Universal.NextBlock) t.Views().Status().IsFocused() }, })