-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration test for disabling tab switching w/jump keys
- Loading branch information
1 parent
9d1fcb7
commit ad25bb3
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
pkg/integration/tests/ui/disable_switch_tab_with_panel_jump_keys.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ui | ||
|
||
import ( | ||
"github.com/jesseduffield/lazygit/pkg/config" | ||
. "github.com/jesseduffield/lazygit/pkg/integration/components" | ||
) | ||
|
||
var DisableSwitchTabWithPanelJumpKeys = NewIntegrationTest(NewIntegrationTestArgs{ | ||
Description: "Disable switching tabs with the panel jump keys", | ||
ExtraCmdArgs: []string{}, | ||
Skip: false, | ||
SetupConfig: func(config *config.AppConfig) { | ||
config.GetUserConfig().Gui.SwitchTabsWithPanelJumpKeys = false | ||
}, | ||
SetupRepo: func(shell *Shell) { | ||
}, | ||
Run: func(t *TestDriver, keys config.KeybindingConfig) { | ||
t.Views().Status().Focus(). | ||
Press(keys.Universal.JumpToBlock[1]) | ||
t.Views().Files().IsFocused(). | ||
Press(keys.Universal.JumpToBlock[1]) | ||
|
||
// Despite jumping to an already focused panel, | ||
// the tab should not change from the base files view | ||
t.Views().Files().IsFocused() | ||
}, | ||
}) |