1
0
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:
Andrew Hynes
2022-09-15 23:11:27 -02:30
parent e189546acb
commit db9373662a
3 changed files with 40 additions and 0 deletions

View 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)
},
})