Skip to content

Commit

Permalink
show file tree by default in integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Feb 26, 2023
1 parent f7e8b2d commit 45d45d2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
4 changes: 1 addition & 3 deletions pkg/integration/tests/file/dir_with_untracked_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ var DirWithUntrackedFile = NewIntegrationTest(NewIntegrationTestArgs{
Description: "When selecting a directory that contains an untracked file, we should not get an error",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.UserConfig.Gui.ShowFileTree = true
},
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.CreateDir("dir")
shell.CreateFile("dir/file", "foo")
Expand Down
6 changes: 3 additions & 3 deletions pkg/integration/tests/file/discard_staged_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ var DiscardStagedChanges = NewIntegrationTest(NewIntegrationTestArgs{
IsFocused().
Lines(
Contains(` M file2`).IsSelected(),
Contains(` M fileToRemove`),
Contains(`?? file3`),
Contains(` M fileToRemove`),
).
SelectNextItem().
NavigateToLine(Contains(`fileToRemove`)).
PressPrimaryAction().
Lines(
Contains(` M file2`),
Contains(`M fileToRemove`).IsSelected(),
Contains(`?? file3`),
Contains(`M fileToRemove`).IsSelected(),
).
Press(keys.Files.ViewResetOptions)

Expand Down
4 changes: 1 addition & 3 deletions pkg/integration/tests/sync/fetch_prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ var FetchPrune = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Fetch from the remote with the 'prune' option set in the git config",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.UserConfig.Git.AutoFetch = false
},
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
// This option makes it so that git checks for deleted branches in the remote
// upon fetching.
Expand Down
4 changes: 1 addition & 3 deletions pkg/integration/tests/ui/switch_tab_from_menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ var SwitchTabFromMenu = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Switch tab via the options menu",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.UserConfig.Git.AutoFetch = false
},
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
Expand Down
2 changes: 0 additions & 2 deletions test/default_test_config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ gui:
- bold
SelectedRangeBgcolor:
- reverse
# TODO: we should update most tests to use a file tree now that it's the default
showFileTree: false
git:
# We don't want to run any periodic background git commands because it'll introduce race conditions and flakiness.
# If we need to refresh something from within the test (which should only really happen if we've invoked a
Expand Down

0 comments on commit 45d45d2

Please sign in to comment.