1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

add integration tests for cherry picking

This commit is contained in:
Jesse Duffield
2022-09-16 22:15:02 -07:00
parent 9351af3829
commit 74acb3e86a
166 changed files with 351 additions and 404 deletions

View File

@ -0,0 +1,49 @@
package shared
import (
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var OriginalFileContent = `
This
Is
The
Original
File
`
var FirstChangeFileContent = `
This
Is
The
First Change
File
`
var SecondChangeFileContent = `
This
Is
The
Second Change
File
`
// prepares us for a rebase/merge that has conflicts
var MergeConflictsSetup = func(shell *Shell) {
shell.
NewBranch("original-branch").
EmptyCommit("one").
EmptyCommit("two").
EmptyCommit("three").
CreateFileAndAdd("file", OriginalFileContent).
Commit("original").
NewBranch("first-change-branch").
UpdateFileAndAdd("file", FirstChangeFileContent).
Commit("first change").
Checkout("original-branch").
NewBranch("second-change-branch").
UpdateFileAndAdd("file", SecondChangeFileContent).
Commit("second change").
EmptyCommit("second-change-branch unrelated change").
Checkout("first-change-branch")
}