mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-18 03:49:50 -06:00
It checks that the text goes in at the cursor, and that a tab turns into spaces instead of switching to the summary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
904 B
Go
32 lines
904 B
Go
package commit
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
var PasteIntoCommitDescription = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "Paste text into the commit description with the terminal's paste command",
|
|
ExtraCmdArgs: []string{},
|
|
Skip: false,
|
|
SetupConfig: func(config *config.AppConfig) {},
|
|
SetupRepo: func(shell *Shell) {
|
|
shell.CreateFileAndAdd("file", "file content")
|
|
},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
t.Views().Files().
|
|
Focus().
|
|
Press(keys.Files.CommitChanges)
|
|
|
|
t.ExpectPopup().CommitMessagePanel().
|
|
Type("subject").
|
|
SwitchToDescription().
|
|
Type("last line").
|
|
GoToBeginning().
|
|
Paste("first line\n\tindented line\n").
|
|
Content(Equals("first line\n indented line\nlast line"))
|
|
|
|
t.ExpectPopup().CommitDescriptionPanel()
|
|
},
|
|
})
|