1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +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

@ -11,6 +11,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/integration/components"
"github.com/jesseduffield/lazygit/pkg/integration/tests/bisect"
"github.com/jesseduffield/lazygit/pkg/integration/tests/branch"
"github.com/jesseduffield/lazygit/pkg/integration/tests/cherry_pick"
"github.com/jesseduffield/lazygit/pkg/integration/tests/commit"
"github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands"
"github.com/jesseduffield/lazygit/pkg/integration/tests/interactive_rebase"
@ -33,6 +34,8 @@ var tests = []*components.IntegrationTest{
custom_commands.MenuFromCommand,
bisect.Basic,
bisect.FromOtherBranch,
cherry_pick.CherryPick,
cherry_pick.CherryPickConflicts,
}
func GetTests() []*components.IntegrationTest {
@ -55,6 +58,11 @@ func GetTests() []*components.IntegrationTest {
return nil
}
// the shared directory won't itself contain tests: only shared helper functions
if filepath.Base(filepath.Dir(path)) == "shared" {
return nil
}
nameFromPath := components.TestNameFromFilePath(path)
if !testNamesSet.Includes(nameFromPath) {
missingTestNames = append(missingTestNames, nameFromPath)