forked from jesseduffield/lazygit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e5b570
commit 38aa5b8
Showing
4 changed files
with
46 additions
and
55 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
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,45 @@ | ||
package file | ||
|
||
import ( | ||
"github.com/jesseduffield/lazygit/pkg/config" | ||
. "github.com/jesseduffield/lazygit/pkg/integration/components" | ||
) | ||
|
||
var StageChildrenRangeSelect = NewIntegrationTest(NewIntegrationTestArgs{ | ||
Description: "Stage a range of files/folders and their children using range select", | ||
ExtraCmdArgs: []string{}, | ||
Skip: false, | ||
SetupConfig: func(config *config.AppConfig) { | ||
}, | ||
SetupRepo: func(shell *Shell) { | ||
shell.CreateFile("foo", "") | ||
shell.CreateFile("foobar", "") | ||
shell.CreateFile("baz/file", "") | ||
shell.CreateFile("bazbam/file", "") | ||
}, | ||
Run: func(t *TestDriver, keys config.KeybindingConfig) { | ||
t.Views().Files(). | ||
IsFocused(). | ||
Lines( | ||
Contains("▼ baz").IsSelected(), | ||
Contains(" ??").Contains("file"), | ||
Contains("▼ bazbam"), | ||
Contains(" ??").Contains("file"), | ||
Contains("??").Contains("foo"), | ||
Contains("??").Contains("foobar"), | ||
). | ||
// Select everything | ||
Press(keys.Universal.ToggleRangeSelect). | ||
NavigateToLine(Contains("foobar")). | ||
// Stage | ||
PressPrimaryAction(). | ||
Lines( | ||
Contains("▼ baz").IsSelected(), | ||
Contains(" A ").Contains("file").IsSelected(), | ||
Contains("▼ bazbam").IsSelected(), | ||
Contains(" A ").Contains("file").IsSelected(), | ||
Contains("A ").Contains("foo").IsSelected(), | ||
Contains("A ").Contains("foobar").IsSelected(), | ||
) | ||
}, | ||
}) |
This file was deleted.
Oops, something went wrong.
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