1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

migrate open to branches with cli arg test

This commit is contained in:
Jesse Duffield 2023-02-19 13:54:15 +11:00
parent 76a1b501f2
commit 13ee0f0a5d
19 changed files with 19 additions and 47 deletions

View 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()
},
})

View File

@ -27,6 +27,7 @@ var tests = []*components.IntegrationTest{
branch.CheckoutByName,
branch.Delete,
branch.DetachedHead,
branch.OpenWithCliArg,
branch.Rebase,
branch.RebaseAndDrop,
branch.RebaseDoesNotAutosquash,

View File

@ -1 +0,0 @@
ref: refs/heads/master

View File

@ -1,10 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
email = CI@example.com
name = CI

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 commit (initial): blah

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 branch: Created from HEAD

View File

@ -1 +0,0 @@
45fe0608335366a31a1ad6dacbdcc6b17d31a5b6

View File

@ -1 +0,0 @@
45fe0608335366a31a1ad6dacbdcc6b17d31a5b6

View File

@ -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}]}

View File

@ -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

View File

@ -1,5 +0,0 @@
{
"description": "Open lazygit to the branches panel",
"speed": 10,
"extraCmdArgs": "branch"
}