1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-07 22:02:56 +03:00

refactor to not have Match at the start of assert method names, because it reads better that way

This commit is contained in:
Jesse Duffield
2022-12-24 17:01:26 +11:00
parent c19f52255c
commit aedfce2845
36 changed files with 208 additions and 208 deletions

View File

@@ -31,39 +31,39 @@ var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{
markCommitAsGood := func() {
viewBisectOptions()
assert.MatchSelectedLine(Contains("bad"))
assert.SelectedLine(Contains("bad"))
input.NextItem()
assert.MatchSelectedLine(Contains("good"))
assert.SelectedLine(Contains("good"))
input.Confirm()
}
assert.MatchViewContent("information", Contains("bisecting"))
assert.ViewContent("information", Contains("bisecting"))
assert.AtLeastOneCommit()
input.SwitchToCommitsWindow()
assert.MatchSelectedLine(Contains("<-- bad"))
assert.MatchSelectedLine(Contains("commit 08"))
assert.SelectedLine(Contains("<-- bad"))
assert.SelectedLine(Contains("commit 08"))
input.NextItem()
assert.MatchSelectedLine(Contains("<-- current"))
assert.MatchSelectedLine(Contains("commit 07"))
assert.SelectedLine(Contains("<-- current"))
assert.SelectedLine(Contains("commit 07"))
markCommitAsGood()
assert.InAlert()
assert.MatchCurrentViewContent(Contains("Bisect complete!"))
assert.MatchCurrentViewContent(Contains("commit 08"))
assert.MatchCurrentViewContent(Contains("Do you want to reset"))
assert.CurrentViewContent(Contains("Bisect complete!"))
assert.CurrentViewContent(Contains("commit 08"))
assert.CurrentViewContent(Contains("Do you want to reset"))
input.Confirm()
assert.MatchViewContent("information", NotContains("bisecting"))
assert.ViewContent("information", NotContains("bisecting"))
// back in master branch which just had the one commit
assert.CurrentViewName("commits")
assert.CommitCount(1)
assert.MatchSelectedLine(Contains("only commit on master"))
assert.SelectedLine(Contains("only commit on master"))
},
})