1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/integration/tests/misc/confirm_on_quit.go
2022-12-28 11:00:22 +11:00

27 lines
676 B
Go

package misc
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var ConfirmOnQuit = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Quitting with a confirm prompt",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.UserConfig.ConfirmOnQuit = true
},
SetupRepo: func(shell *Shell) {},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Files().
IsFocused().
Press(keys.Universal.Quit)
t.ExpectPopup().Confirmation().
Title(Equals("")).
Content(Contains("Are you sure you want to quit?")).
Confirm()
},
})