1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

remove dependency on model

This commit is contained in:
Jesse Duffield
2022-12-27 22:52:20 +11:00
parent c5050ecabd
commit ed93e0a2b0
32 changed files with 200 additions and 178 deletions

View File

@ -16,17 +16,25 @@ var Stash = NewIntegrationTest(NewIntegrationTestArgs{
shell.GitAddAll()
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Model().StashCount(0)
t.Model().WorkingTreeFileCount(1)
t.Views().Stash().
IsEmpty()
t.Views().Files().
Lines(
Contains("file"),
).
Press(keys.Files.ViewStashOptions)
t.ExpectMenu().Title(Equals("Stash options")).Select(MatchesRegexp("stash all changes$")).Confirm()
t.ExpectPrompt().Title(Equals("Stash changes")).Type("my stashed file").Confirm()
t.Model().StashCount(1)
t.Model().WorkingTreeFileCount(0)
t.Views().Stash().
Lines(
Contains("my stashed file"),
)
t.Views().Files().
IsEmpty()
},
})