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:
49
pkg/integration/tests/shared/conflicts.go
Normal file
49
pkg/integration/tests/shared/conflicts.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user