Skip to content

Commit c2aab81

Browse files
authored
Fix more unstable tests (#4721)
Similar to what was done in 457cdce, and for the same reason.
2 parents 656cb32 + bf19475 commit c2aab81

File tree

7 files changed

+13
-2
lines changed

7 files changed

+13
-2
lines changed

pkg/integration/tests/commit/checkout.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ var Checkout = NewIntegrationTest(NewIntegrationTestArgs{
99
Description: "Checkout a commit as a detached head, or checkout an existing branch at a commit",
1010
ExtraCmdArgs: []string{},
1111
Skip: false,
12-
SetupConfig: func(config *config.AppConfig) {},
12+
SetupConfig: func(config *config.AppConfig) {
13+
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
14+
},
1315
SetupRepo: func(shell *Shell) {
1416
shell.EmptyCommit("one")
1517
shell.EmptyCommit("two")

pkg/integration/tests/custom_commands/suggestions_command.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ var SuggestionsCommand = NewIntegrationTest(NewIntegrationTestArgs{
3737
},
3838
},
3939
}
40+
41+
cfg.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
4042
},
4143
Run: func(t *TestDriver, keys config.KeybindingConfig) {
4244
t.Views().Branches().

pkg/integration/tests/custom_commands/suggestions_preset.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ var SuggestionsPreset = NewIntegrationTest(NewIntegrationTestArgs{
3737
},
3838
},
3939
}
40+
41+
cfg.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
4042
},
4143
Run: func(t *TestDriver, keys config.KeybindingConfig) {
4244
t.Views().Branches().

pkg/integration/tests/filter_and_search/nested_filter.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ var NestedFilter = NewIntegrationTest(NewIntegrationTestArgs{
99
Description: "Filter in the several nested panels and verify the filters are preserved as you escape back to the surface",
1010
ExtraCmdArgs: []string{},
1111
Skip: false,
12-
SetupConfig: func(config *config.AppConfig) {},
12+
SetupConfig: func(config *config.AppConfig) {
13+
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
14+
},
1315
SetupRepo: func(shell *Shell) {
1416
// need to create some branches, each with their own commits
1517
shell.NewBranch("branch-gold")

pkg/integration/tests/sync/fetch_and_auto_forward_branches_all_branches.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var FetchAndAutoForwardBranchesAllBranches = NewIntegrationTest(NewIntegrationTe
1111
Skip: false,
1212
SetupConfig: func(config *config.AppConfig) {
1313
config.GetUserConfig().Git.AutoForwardBranches = "allBranches"
14+
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
1415
},
1516
SetupRepo: func(shell *Shell) {
1617
shell.CreateNCommits(3)

pkg/integration/tests/sync/fetch_and_auto_forward_branches_none.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var FetchAndAutoForwardBranchesNone = NewIntegrationTest(NewIntegrationTestArgs{
1111
Skip: false,
1212
SetupConfig: func(config *config.AppConfig) {
1313
config.GetUserConfig().Git.AutoForwardBranches = "none"
14+
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
1415
},
1516
SetupRepo: func(shell *Shell) {
1617
shell.CreateNCommits(3)

pkg/integration/tests/sync/fetch_and_auto_forward_branches_only_main_branches.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var FetchAndAutoForwardBranchesOnlyMainBranches = NewIntegrationTest(NewIntegrat
1111
Skip: false,
1212
SetupConfig: func(config *config.AppConfig) {
1313
config.GetUserConfig().Git.AutoForwardBranches = "onlyMainBranches"
14+
config.GetUserConfig().Git.LocalBranchSortOrder = "alphabetical"
1415
},
1516
SetupRepo: func(shell *Shell) {
1617
shell.CreateNCommits(3)

0 commit comments

Comments
 (0)