1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 22:33:07 +02:00

Fix more unstable tests (#4721)

Similar to what was done in 457cdce61d, and for the same reason.
This commit is contained in:
Stefan Haller
2025-07-10 09:02:41 +02:00
committed by GitHub
7 changed files with 13 additions and 2 deletions

View File

@ -9,7 +9,9 @@ var Checkout = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Checkout a commit as a detached head, or checkout an existing branch at a commit",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupConfig: func(config *config.AppConfig) {
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("one")
shell.EmptyCommit("two")

View File

@ -37,6 +37,8 @@ var SuggestionsCommand = NewIntegrationTest(NewIntegrationTestArgs{
},
},
}
cfg.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Branches().

View File

@ -37,6 +37,8 @@ var SuggestionsPreset = NewIntegrationTest(NewIntegrationTestArgs{
},
},
}
cfg.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Branches().

View File

@ -9,7 +9,9 @@ var NestedFilter = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Filter in the several nested panels and verify the filters are preserved as you escape back to the surface",
ExtraCmdArgs: []string{},
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupConfig: func(config *config.AppConfig) {
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
SetupRepo: func(shell *Shell) {
// need to create some branches, each with their own commits
shell.NewBranch("branch-gold")

View File

@ -11,6 +11,7 @@ var FetchAndAutoForwardBranchesAllBranches = NewIntegrationTest(NewIntegrationTe
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.GetUserConfig().Git.AutoForwardBranches = "allBranches"
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
SetupRepo: func(shell *Shell) {
shell.CreateNCommits(3)

View File

@ -11,6 +11,7 @@ var FetchAndAutoForwardBranchesNone = NewIntegrationTest(NewIntegrationTestArgs{
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.GetUserConfig().Git.AutoForwardBranches = "none"
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
SetupRepo: func(shell *Shell) {
shell.CreateNCommits(3)

View File

@ -11,6 +11,7 @@ var FetchAndAutoForwardBranchesOnlyMainBranches = NewIntegrationTest(NewIntegrat
Skip: false,
SetupConfig: func(config *config.AppConfig) {
config.GetUserConfig().Git.AutoForwardBranches = "onlyMainBranches"
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
},
SetupRepo: func(shell *Shell) {
shell.CreateNCommits(3)