move shell into test driver
This commit is contained in:
@@ -17,7 +17,7 @@ var CheckoutByName = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Checkout("master").
|
||||
EmptyCommit("blah")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Lines(
|
||||
|
||||
@@ -16,7 +16,7 @@ var Delete = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
NewBranch("branch-one").
|
||||
NewBranch("branch-two")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Lines(
|
||||
|
||||
@@ -14,7 +14,7 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Commits().TopLines(
|
||||
Contains("first change"),
|
||||
Contains("original"),
|
||||
|
||||
@@ -17,7 +17,7 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.EmptyCommit("to remove")
|
||||
shell.EmptyCommit("to keep")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Lines(
|
||||
|
||||
@@ -20,7 +20,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.Checkout("current-branch")
|
||||
shell.EmptyCommit("current-branch commit")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Commits().Lines(
|
||||
Contains("current-branch commit"),
|
||||
Contains("root commit"),
|
||||
|
||||
@@ -20,7 +20,7 @@ var Suggestions = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
NewBranch("other-new-branch-2").
|
||||
NewBranch("other-new-branch-3")
|
||||
},
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Press(keys.Branches.CheckoutBranchByName)
|
||||
|
||||
Reference in New Issue
Block a user