1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02: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

@ -21,30 +21,30 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
input.SwitchToBranchesWindow()
assert.CurrentViewName("localBranches")
assert.MatchSelectedLine(Contains("first-change-branch"))
assert.SelectedLine(Contains("first-change-branch"))
input.NextItem()
assert.MatchSelectedLine(Contains("second-change-branch"))
assert.SelectedLine(Contains("second-change-branch"))
input.PressKeys(keys.Branches.RebaseBranch)
assert.InConfirm()
assert.MatchCurrentViewContent(Contains("Are you sure you want to rebase 'first-change-branch' on top of 'second-change-branch'?"))
assert.CurrentViewContent(Contains("Are you sure you want to rebase 'first-change-branch' on top of 'second-change-branch'?"))
input.Confirm()
assert.MatchViewContent("information", Contains("rebasing"))
assert.ViewContent("information", Contains("rebasing"))
assert.InConfirm()
assert.MatchCurrentViewContent(Contains("Conflicts!"))
assert.CurrentViewContent(Contains("Conflicts!"))
input.Confirm()
assert.CurrentViewName("files")
assert.MatchSelectedLine(Contains("file"))
assert.SelectedLine(Contains("file"))
input.SwitchToCommitsWindow()
assert.MatchSelectedLine(Contains("pick")) // this means it's a rebasing commit
assert.SelectedLine(Contains("pick")) // this means it's a rebasing commit
input.NextItem()
input.PressKeys(keys.Universal.Remove)
assert.MatchSelectedLine(Contains("to remove"))
assert.MatchSelectedLine(Contains("drop"))
assert.SelectedLine(Contains("to remove"))
assert.SelectedLine(Contains("drop"))
input.SwitchToFilesWindow()
@ -56,14 +56,14 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
input.PrimaryAction()
assert.InConfirm()
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
assert.CurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
input.Confirm()
assert.MatchViewContent("information", NotContains("rebasing"))
assert.ViewContent("information", NotContains("rebasing"))
// this proves we actually have integrated the changes from second-change-branch
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
assert.MatchViewContent("commits", Contains("to keep"))
assert.MatchViewContent("commits", NotContains("to remove"))
assert.ViewContent("commits", Contains("second-change-branch unrelated change"))
assert.ViewContent("commits", Contains("to keep"))
assert.ViewContent("commits", NotContains("to remove"))
},
})