mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
migrate open to branches with cli arg test
This commit is contained in:
parent
76a1b501f2
commit
13ee0f0a5d
19 changed files with 19 additions and 47 deletions
18
pkg/integration/tests/branch/open_with_cli_arg.go
Normal file
18
pkg/integration/tests/branch/open_with_cli_arg.go
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
package branch
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var OpenWithCliArg = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Open straight to branches panel using a CLI arg",
|
||||||
|
ExtraCmdArgs: "branch",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Branches().IsFocused()
|
||||||
|
},
|
||||||
|
})
|
|
@ -27,6 +27,7 @@ var tests = []*components.IntegrationTest{
|
||||||
branch.CheckoutByName,
|
branch.CheckoutByName,
|
||||||
branch.Delete,
|
branch.Delete,
|
||||||
branch.DetachedHead,
|
branch.DetachedHead,
|
||||||
|
branch.OpenWithCliArg,
|
||||||
branch.Rebase,
|
branch.Rebase,
|
||||||
branch.RebaseAndDrop,
|
branch.RebaseAndDrop,
|
||||||
branch.RebaseDoesNotAutosquash,
|
branch.RebaseDoesNotAutosquash,
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
blah
|
|
|
@ -1 +0,0 @@
|
||||||
ref: refs/heads/master
|
|
|
@ -1,10 +0,0 @@
|
||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = false
|
|
||||||
logallrefupdates = true
|
|
||||||
ignorecase = true
|
|
||||||
precomposeunicode = true
|
|
||||||
[user]
|
|
||||||
email = CI@example.com
|
|
||||||
name = CI
|
|
|
@ -1 +0,0 @@
|
||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
Binary file not shown.
|
@ -1,7 +0,0 @@
|
||||||
# git ls-files --others --exclude-from=.git/info/exclude
|
|
||||||
# Lines that start with '#' are comments.
|
|
||||||
# For a project mostly in C, the following would be a good set of
|
|
||||||
# exclude patterns (uncomment them if you want to use them):
|
|
||||||
# *.[oa]
|
|
||||||
# *~
|
|
||||||
.DS_Store
|
|
|
@ -1,3 +0,0 @@
|
||||||
0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 commit (initial): blah
|
|
||||||
45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 checkout: moving from master to other
|
|
||||||
45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768291 +1000 checkout: moving from other to master
|
|
|
@ -1 +0,0 @@
|
||||||
0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 commit (initial): blah
|
|
|
@ -1 +0,0 @@
|
||||||
0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 branch: Created from HEAD
|
|
Binary file not shown.
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
45fe0608335366a31a1ad6dacbdcc6b17d31a5b6
|
|
|
@ -1 +0,0 @@
|
||||||
45fe0608335366a31a1ad6dacbdcc6b17d31a5b6
|
|
|
@ -1 +0,0 @@
|
||||||
{"KeyEvents":[{"Timestamp":620,"Mod":0,"Key":258,"Ch":0},{"Timestamp":995,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1865,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd $1
|
|
||||||
|
|
||||||
git init
|
|
||||||
|
|
||||||
git config user.email "CI@example.com"
|
|
||||||
git config user.name "CI"
|
|
||||||
|
|
||||||
git commit --allow-empty -m "blah"
|
|
||||||
|
|
||||||
git checkout -b other
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"description": "Open lazygit to the branches panel",
|
|
||||||
"speed": 10,
|
|
||||||
"extraCmdArgs": "branch"
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue