diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-22 14:05:42 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-07-22 14:36:35 +1000 |
commit | 7807b403229cb57f261d97d15a76d0b35b15e19a (patch) | |
tree | 6e243e0a712a644e579e44fe055cd1054bf51523 /pkg/integration/tests/tag/create_while_committing.go | |
parent | b284970bac62364c2cccf6a2408d4584ae93056d (diff) |
Better tag creation UX
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message
prompt.
I've had to update other uses of that prompt to allow the summary and description labels to
be passed in
Diffstat (limited to 'pkg/integration/tests/tag/create_while_committing.go')
-rw-r--r-- | pkg/integration/tests/tag/create_while_committing.go | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkg/integration/tests/tag/create_while_committing.go b/pkg/integration/tests/tag/create_while_committing.go new file mode 100644 index 000000000..88d31f759 --- /dev/null +++ b/pkg/integration/tests/tag/create_while_committing.go @@ -0,0 +1,37 @@ +package tag + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var CreateWhileCommitting = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Draft a commit message, escape out, and make a tag. Verify the draft message doesn't appear in the tag create prompt", + ExtraCmdArgs: []string{}, + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.EmptyCommit("initial commit") + shell.CreateFileAndAdd("file.txt", "file contents") + }, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.Views().Files(). + Press(keys.Files.CommitChanges). + Tap(func() { + t.ExpectPopup().CommitMessagePanel(). + Title(Equals("Commit summary")). + Type("draft message"). + Cancel() + }) + + t.Views().Tags(). + Focus(). + IsEmpty(). + Press(keys.Universal.New). + Tap(func() { + t.ExpectPopup().CommitMessagePanel(). + Title(Equals("Tag name")). + InitialText(Equals("")) + }) + }, +}) |