mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
add tap function
This commit is contained in:
@ -38,34 +38,28 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
input.Views().Commits().
|
||||
Focus().
|
||||
SelectedLine(Contains("commit 10")).
|
||||
NavigateToListItem(Contains("commit 09"))
|
||||
NavigateToListItem(Contains("commit 09")).
|
||||
Tap(func() {
|
||||
markCommitAsBad()
|
||||
|
||||
markCommitAsBad()
|
||||
|
||||
input.Views().Information().Content(Contains("bisecting"))
|
||||
|
||||
input.Views().Commits().
|
||||
IsFocused().
|
||||
input.Views().Information().Content(Contains("bisecting"))
|
||||
}).
|
||||
SelectedLine(Contains("<-- bad")).
|
||||
NavigateToListItem(Contains("commit 02"))
|
||||
NavigateToListItem(Contains("commit 02")).
|
||||
Tap(markCommitAsGood).
|
||||
// lazygit will land us in the commit between our good and bad commits.
|
||||
SelectedLine(Contains("commit 05").Contains("<-- current")).
|
||||
Tap(markCommitAsBad).
|
||||
SelectedLine(Contains("commit 04").Contains("<-- current")).
|
||||
Tap(func() {
|
||||
markCommitAsGood()
|
||||
|
||||
markCommitAsGood()
|
||||
// commit 5 is the culprit because we marked 4 as good and 5 as bad.
|
||||
input.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm()
|
||||
}).
|
||||
IsFocused().
|
||||
Content(Contains("commit 04"))
|
||||
|
||||
// lazygit will land us in the commit between our good and bad commits.
|
||||
input.Views().Commits().IsFocused().
|
||||
SelectedLine(Contains("commit 05").Contains("<-- current"))
|
||||
|
||||
markCommitAsBad()
|
||||
|
||||
input.Views().Commits().IsFocused().
|
||||
SelectedLine(Contains("commit 04").Contains("<-- current"))
|
||||
|
||||
markCommitAsGood()
|
||||
|
||||
// commit 5 is the culprit because we marked 4 as good and 5 as bad.
|
||||
input.ExpectAlert().Title(Equals("Bisect complete")).Content(MatchesRegexp("(?s)commit 05.*Do you want to reset")).Confirm()
|
||||
|
||||
input.Views().Commits().IsFocused().Content(Contains("commit 04"))
|
||||
input.Views().Information().Content(DoesNotContain("bisecting"))
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user