mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
test: add test for basic stash
This commit is contained in:
27
pkg/integration/tests/stash/stash.go
Normal file
27
pkg/integration/tests/stash/stash.go
Normal file
@ -0,0 +1,27 @@
|
||||
package stash
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var Stash = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Stashing files",
|
||||
ExtraCmdArgs: "",
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("initial commit")
|
||||
shell.CreateFile("file", "content")
|
||||
shell.GitAddAll()
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
assert.StashCount(0)
|
||||
|
||||
input.PressKeys(keys.Files.ViewStashOptions)
|
||||
input.Confirm()
|
||||
input.Confirm()
|
||||
|
||||
assert.StashCount(1)
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user