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

introduce ViewLines functions

This commit is contained in:
Jesse Duffield
2022-12-25 11:38:00 +11:00
parent b623ecf898
commit 5d2584a188
14 changed files with 217 additions and 61 deletions

View File

@ -18,9 +18,20 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
input.SwitchToBranchesWindow()
assert.CurrentViewName("localBranches")
assert.SelectedLine(Contains("first-change-branch"))
assert.ViewLines(
"localBranches",
Contains("first-change-branch"),
Contains("second-change-branch"),
Contains("original-branch"),
)
assert.ViewTopLines(
"commits",
Contains("first change"),
Contains("original"),
)
input.NextItem()
assert.SelectedLine(Contains("second-change-branch"))
input.Press(keys.Branches.RebaseBranch)
input.AcceptConfirmation(Equals("Rebasing"), Contains("Are you sure you want to rebase 'first-change-branch' on top of 'second-change-branch'?"))
@ -43,7 +54,11 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
assert.ViewContent("information", NotContains("rebasing"))
// this proves we actually have integrated the changes from second-change-branch
assert.ViewContent("commits", Contains("second-change-branch unrelated change"))
assert.ViewTopLines(
"commits",
Contains("second-change-branch unrelated change"),
Contains("second change"),
Contains("original"),
)
},
})