mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Demonstrate that toggling whitespace undims the panel beneath the main view
Toggling whitespace re-focuses the side panel to re-render the diff, which also re-derives that panel's highlight — as though the panel had the focus, which it doesn't. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dd01d67879
commit
e8009599e0
|
|
@ -530,6 +530,7 @@ var tests = []*components.IntegrationTest{
|
|||
ui.SwitchRepoMovesTheSelection,
|
||||
ui.SwitchTabFromMenu,
|
||||
ui.SwitchTabWithPanelJumpKeys,
|
||||
ui.ToggleWhitespaceKeepsUnfocusedSelectionDimmed,
|
||||
ui.UnfocusedListHidesSelectionWhenEmptied,
|
||||
ui.UnfocusedListShowsSelectionWhenFilled,
|
||||
undo.UndoCheckoutAndDrop,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var ToggleWhitespaceKeepsUnfocusedSelectionDimmed = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Toggling whitespace from the main view leaves the panel beneath it showing a dimmed selection",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.CreateFileAndAdd("file1", "one\n")
|
||||
shell.Commit("one")
|
||||
shell.UpdateFile("file1", " one\n")
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Files().
|
||||
IsFocused().
|
||||
Lines(Contains("file1")).
|
||||
Press(keys.Universal.FocusMainView)
|
||||
|
||||
t.Views().Main().
|
||||
IsFocused().
|
||||
Press(keys.Universal.ToggleWhitespaceInDiffView)
|
||||
|
||||
t.Views().Files().
|
||||
/* EXPECTED:
|
||||
SelectionIsInactive()
|
||||
ACTUAL: */
|
||||
SelectionIsActive()
|
||||
},
|
||||
})
|
||||
Loading…
Reference in a new issue