mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
move shell into test driver
This commit is contained in:
@ -14,7 +14,7 @@ var Commit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.CreateFile("myfile", "myfile content")
|
||||
shell.CreateFile("myfile2", "myfile2 content")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(0)
|
||||
|
||||
t.Views().Files().
|
||||
|
@ -13,7 +13,7 @@ var CommitMultiline = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.CreateFile("myfile", "myfile content")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(0)
|
||||
|
||||
t.Views().Files().
|
||||
|
@ -16,7 +16,7 @@ var NewBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
EmptyCommit("commit 2").
|
||||
EmptyCommit("commit 3")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(3)
|
||||
|
||||
t.Views().Commits().
|
||||
|
@ -15,7 +15,7 @@ var Revert = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.GitAddAll()
|
||||
shell.Commit("first commit")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(1)
|
||||
|
||||
t.Views().Commits().
|
||||
|
@ -15,7 +15,7 @@ var Staged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
CreateFile("myfile", "myfile content\nwith a second line").
|
||||
CreateFile("myfile2", "myfile2 content")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(0)
|
||||
|
||||
t.Views().Files().
|
||||
|
@ -15,7 +15,7 @@ var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
CreateFile("myfile", "myfile content\nwith a second line").
|
||||
CreateFile("myfile2", "myfile2 content")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(0)
|
||||
|
||||
// stage the file
|
||||
|
@ -17,7 +17,7 @@ var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
CreateFile("myfile", "myfile content\nwith a second line").
|
||||
CreateFile("myfile2", "myfile2 content")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Model().CommitCount(0)
|
||||
|
||||
t.Views().Files().
|
||||
|
Reference in New Issue
Block a user