mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-06-20 01:19:23 +02:00
rename input to t
This commit is contained in:
@@ -23,8 +23,8 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
EmptyCommit("four").
|
||||
Checkout("first-branch")
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, keys config.KeybindingConfig) {
|
||||
input.Views().Branches().
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("first-branch"),
|
||||
@@ -34,7 +34,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SelectNextItem().
|
||||
PressEnter()
|
||||
|
||||
input.Views().SubCommits().
|
||||
t.Views().SubCommits().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("four").IsSelected(),
|
||||
@@ -44,14 +44,14 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
// copy commits 'four' and 'three'
|
||||
Press(keys.Commits.CherryPickCopy).
|
||||
Tap(func() {
|
||||
input.Views().Information().Content(Contains("1 commit copied"))
|
||||
t.Views().Information().Content(Contains("1 commit copied"))
|
||||
}).
|
||||
SelectNextItem().
|
||||
Press(keys.Commits.CherryPickCopy)
|
||||
|
||||
input.Views().Information().Content(Contains("2 commits copied"))
|
||||
t.Views().Information().Content(Contains("2 commits copied"))
|
||||
|
||||
input.Views().Commits().
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("two").IsSelected(),
|
||||
@@ -60,7 +60,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Press(keys.Commits.PasteCommits).
|
||||
Tap(func() {
|
||||
input.ExpectAlert().
|
||||
t.ExpectAlert().
|
||||
Title(Equals("Cherry-Pick")).
|
||||
Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).
|
||||
Confirm()
|
||||
@@ -74,11 +74,11 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Tap(func() {
|
||||
// we need to manually exit out of cherry pick mode
|
||||
input.Views().Information().Content(Contains("2 commits copied"))
|
||||
t.Views().Information().Content(Contains("2 commits copied"))
|
||||
}).
|
||||
PressEscape().
|
||||
Tap(func() {
|
||||
input.Views().Information().Content(DoesNotContain("commits copied"))
|
||||
t.Views().Information().Content(DoesNotContain("commits copied"))
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
@@ -14,8 +14,8 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shared.MergeConflictsSetup(shell)
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, keys config.KeybindingConfig) {
|
||||
input.Views().Branches().
|
||||
Run: func(shell *Shell, t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Branches().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains("first-change-branch"),
|
||||
@@ -25,7 +25,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SelectNextItem().
|
||||
PressEnter()
|
||||
|
||||
input.Views().SubCommits().
|
||||
t.Views().SubCommits().
|
||||
IsFocused().
|
||||
TopLines(
|
||||
Contains("second-change-branch unrelated change"),
|
||||
@@ -33,46 +33,46 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Press(keys.Commits.CherryPickCopy).
|
||||
Tap(func() {
|
||||
input.Views().Information().Content(Contains("1 commit copied"))
|
||||
t.Views().Information().Content(Contains("1 commit copied"))
|
||||
}).
|
||||
SelectNextItem().
|
||||
Press(keys.Commits.CherryPickCopy)
|
||||
|
||||
input.Views().Information().Content(Contains("2 commits copied"))
|
||||
t.Views().Information().Content(Contains("2 commits copied"))
|
||||
|
||||
input.Views().Commits().
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
TopLines(
|
||||
Contains("first change"),
|
||||
).
|
||||
Press(keys.Commits.PasteCommits)
|
||||
|
||||
input.ExpectAlert().Title(Equals("Cherry-Pick")).Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).Confirm()
|
||||
t.ExpectAlert().Title(Equals("Cherry-Pick")).Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).Confirm()
|
||||
|
||||
input.ExpectConfirmation().
|
||||
t.ExpectConfirmation().
|
||||
Title(Equals("Auto-merge failed")).
|
||||
Content(Contains("Conflicts!")).
|
||||
Confirm()
|
||||
|
||||
input.Views().Files().
|
||||
t.Views().Files().
|
||||
IsFocused().
|
||||
SelectedLine(Contains("file")).
|
||||
PressEnter()
|
||||
|
||||
input.Views().MergeConflicts().
|
||||
t.Views().MergeConflicts().
|
||||
IsFocused().
|
||||
// picking 'Second change'
|
||||
SelectNextItem().
|
||||
PressPrimaryAction()
|
||||
|
||||
input.ExpectConfirmation().
|
||||
t.ExpectConfirmation().
|
||||
Title(Equals("continue")).
|
||||
Content(Contains("all merge conflicts resolved. Continue?")).
|
||||
Confirm()
|
||||
|
||||
input.Model().WorkingTreeFileCount(0)
|
||||
t.Model().WorkingTreeFileCount(0)
|
||||
|
||||
input.Views().Commits().
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
TopLines(
|
||||
Contains("second-change-branch unrelated change"),
|
||||
@@ -84,15 +84,15 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
// because we picked 'Second change' when resolving the conflict,
|
||||
// we now see this commit as having replaced First Change with Second Change,
|
||||
// as opposed to replacing 'Original' with 'Second change'
|
||||
input.Views().Main().
|
||||
t.Views().Main().
|
||||
Content(Contains("-First Change")).
|
||||
Content(Contains("+Second Change"))
|
||||
|
||||
input.Views().Information().Content(Contains("2 commits copied"))
|
||||
t.Views().Information().Content(Contains("2 commits copied"))
|
||||
}).
|
||||
PressEscape().
|
||||
Tap(func() {
|
||||
input.Views().Information().Content(DoesNotContain("commits copied"))
|
||||
t.Views().Information().Content(DoesNotContain("commits copied"))
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user