-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Expand file tree
/
Copy pathinitial_side_panel_not_first_tab.go
More file actions
35 lines (33 loc) · 976 Bytes
/
Copy pathinitial_side_panel_not_first_tab.go
File metadata and controls
35 lines (33 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package ui
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var InitialSidePanelNotFirstTab = NewIntegrationTest(NewIntegrationTestArgs{
Description: "gui.initialSidePanel names a tab that isn't the first one of its panel, so it must be brought to the front",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(cfg *config.AppConfig) {
cfg.GetUserConfig().Gui.SidePanels = []config.SidePanel{
{"status"},
{"files"},
{"branches"},
{"reflog", "commits"},
{"stash"},
}
cfg.GetUserConfig().Gui.InitialSidePanel = "commits"
},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("one")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
// Commits is shown in front of the reflog tab it shares a panel with,
// rather than being focused behind it.
t.Views().Commits().
IsActiveTab().
IsFocused().
Lines(
Contains("one"),
)
},
})