-
-
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.
feat: let the staging secondary panel change view mode
- Loading branch information
Showing
3 changed files
with
58 additions
and
1 deletion.
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
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,47 @@ | ||
package staging | ||
|
||
import ( | ||
"github.com/jesseduffield/lazygit/pkg/config" | ||
. "github.com/jesseduffield/lazygit/pkg/integration/components" | ||
) | ||
|
||
var DiffChangeScreenMode = NewIntegrationTest(NewIntegrationTestArgs{ | ||
Description: "Change the staged changes screen mode", | ||
ExtraCmdArgs: []string{}, | ||
Skip: false, | ||
SetupConfig: func(config *config.AppConfig) {}, | ||
SetupRepo: func(shell *Shell) { | ||
shell.CreateFile("file", "first line\nsecond line") | ||
}, | ||
Run: func(t *TestDriver, keys config.KeybindingConfig) { | ||
t.Views().Files(). | ||
Focus(). | ||
PressEnter() | ||
|
||
t.Views().Staging(). | ||
IsFocused(). | ||
PressPrimaryAction(). | ||
Title(Equals("Unstaged changes")). | ||
Content(Contains("+second line").DoesNotContain("+first line")). | ||
PressTab() | ||
|
||
t.Views().StagingSecondary(). | ||
IsFocused(). | ||
Title(Equals("Staged changes")). | ||
Content(Contains("+first line").DoesNotContain("+second line")). | ||
Press(keys.Universal.NextScreenMode). | ||
Tap(func() { | ||
t.Views().AppStatus(). | ||
IsInvisible() | ||
t.Views().Staging(). | ||
IsVisible() | ||
}). | ||
Press(keys.Universal.NextScreenMode). | ||
Tap(func() { | ||
t.Views().AppStatus(). | ||
IsInvisible() | ||
t.Views().Staging(). | ||
IsInvisible() | ||
}) | ||
}, | ||
}) |
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