move shell into test driver

This commit is contained in:
Jesse Duffield
2022-12-27 21:47:37 +11:00
parent 78b495f50a
commit c5050ecabd
39 changed files with 108 additions and 131 deletions

View File

@@ -18,7 +18,7 @@ var Rename = NewIntegrationTest(NewIntegrationTestArgs{
CreateFileAndAdd("file-2", "change to stash2").
StashWithMessage("bar")
},
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Stash().
Focus().
Lines(

View File

@@ -15,7 +15,7 @@ var Stash = NewIntegrationTest(NewIntegrationTestArgs{
shell.CreateFile("file", "content")
shell.GitAddAll()
},
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Model().StashCount(0)
t.Model().WorkingTreeFileCount(1)

View File

@@ -16,7 +16,7 @@ var StashIncludingUntrackedFiles = NewIntegrationTest(NewIntegrationTestArgs{
shell.CreateFile("file_2", "content")
shell.GitAdd("file_1")
},
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Model().StashCount(0)
t.Model().WorkingTreeFileCount(2)