mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-21 12:16:54 +02:00
The double use of the term "Custom Command" for both shell commands and user-configured keybindings was confusing.
32 lines
871 B
Go
32 lines
871 B
Go
package shell_commands
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
var EditHistory = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "Edit an entry from the custom commands history",
|
|
ExtraCmdArgs: []string{},
|
|
Skip: false,
|
|
SetupRepo: func(shell *Shell) {},
|
|
SetupConfig: func(cfg *config.AppConfig) {},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
|
t.ExpectPopup().Prompt().
|
|
Title(Equals("Shell command:")).
|
|
Type("echo x").
|
|
Confirm()
|
|
|
|
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
|
t.ExpectPopup().Prompt().
|
|
Title(Equals("Shell command:")).
|
|
Type("ec").
|
|
SuggestionLines(
|
|
Equals("echo x"),
|
|
).
|
|
EditSuggestion(Equals("echo x")).
|
|
InitialText(Equals("echo x"))
|
|
},
|
|
})
|