mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +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:
@ -34,17 +34,17 @@ var AmendMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert.CurrentViewName("commits")
|
||||
|
||||
mergeCommitMessage := "Merge branch 'feature-branch' into development-branch"
|
||||
assert.MatchHeadCommitMessage(Contains(mergeCommitMessage))
|
||||
assert.HeadCommitMessage(Contains(mergeCommitMessage))
|
||||
|
||||
input.PressKeys(keys.Commits.AmendToCommit)
|
||||
input.ProceedWhenAsked(Contains("Are you sure you want to amend this commit with your staged files?"))
|
||||
|
||||
// assuring we haven't added a brand new commit
|
||||
assert.CommitCount(3)
|
||||
assert.MatchHeadCommitMessage(Contains(mergeCommitMessage))
|
||||
assert.HeadCommitMessage(Contains(mergeCommitMessage))
|
||||
|
||||
// assuring the post-merge file shows up in the merge commit.
|
||||
assert.MatchMainViewContent(Contains(postMergeFilename))
|
||||
assert.MatchMainViewContent(Contains("++" + postMergeFileContent))
|
||||
assert.MainViewContent(Contains(postMergeFilename))
|
||||
assert.MainViewContent(Contains("++" + postMergeFileContent))
|
||||
},
|
||||
})
|
||||
|
@ -20,19 +20,19 @@ var One = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
input.NavigateToListItemContainingText("commit 02")
|
||||
input.PressKeys(keys.Universal.Edit)
|
||||
assert.MatchSelectedLine(Contains("YOU ARE HERE"))
|
||||
assert.SelectedLine(Contains("YOU ARE HERE"))
|
||||
|
||||
input.PreviousItem()
|
||||
input.PressKeys(keys.Commits.MarkCommitAsFixup)
|
||||
assert.MatchSelectedLine(Contains("fixup"))
|
||||
assert.SelectedLine(Contains("fixup"))
|
||||
|
||||
input.PreviousItem()
|
||||
input.PressKeys(keys.Universal.Remove)
|
||||
assert.MatchSelectedLine(Contains("drop"))
|
||||
assert.SelectedLine(Contains("drop"))
|
||||
|
||||
input.PreviousItem()
|
||||
input.PressKeys(keys.Commits.SquashDown)
|
||||
assert.MatchSelectedLine(Contains("squash"))
|
||||
assert.SelectedLine(Contains("squash"))
|
||||
|
||||
input.ContinueRebase()
|
||||
|
||||
|
Reference in New Issue
Block a user