mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-12-05 23:18:28 +02:00
Rename test files to match test names
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package custom_commands
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var BasicCmdAtRuntime = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using a custom command provided at runtime to create a new file",
|
||||
ExtraCmdArgs: "",
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Files().
|
||||
IsEmpty().
|
||||
IsFocused().
|
||||
Press(keys.Universal.ExecuteCustomCommand)
|
||||
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom Command:")).
|
||||
Type("touch file.txt").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Files.RefreshFiles)
|
||||
|
||||
t.Views().Files().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("file.txt"),
|
||||
)
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user