blob: 9ea100f4f060a7bd0176b9585a18272cd1431c37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package branch
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var CreateTag = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Create a new tag on branch",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.
CreateNCommits(10).
NewBranch("new-branch").
EmptyCommit("new commit")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Branches().
Focus().
Lines(
MatchesRegexp(`\*\s*new-branch`).IsSelected(),
MatchesRegexp(`master`),
).
SelectNextItem().
Press(keys.Branches.CreateTag)
t.ExpectPopup().CommitMessagePanel().
Title(Equals("Tag name")).
Type("new-tag").
Confirm()
t.Views().Tags().Focus().
Lines(
MatchesRegexp(`new-tag`).IsSelected(),
)
t.Git().
TagNamesAt("HEAD", []string{}).
TagNamesAt("master", []string{"new-tag"})
},
})
|