mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-06 13:00:59 -04:00
Add a test showing that a current bisect commit far down isn't selected
The commits view loads the first 300 commits only. If the range to bisect is longer than about 600 commits, the commit that git wants the user to test is further down than that. It isn't loaded, so we can't select it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ee07abe508
commit
990913dd63
@@ -0,0 +1,31 @@
|
||||
package bisect
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var SelectCurrentCommitInLongRange = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Select the current bisect commit when it is further down than the commits that we load at first",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
for i := range 700 {
|
||||
shell.EmptyCommit(fmt.Sprintf("commit %03d", i+1))
|
||||
}
|
||||
shell.StartBisect("HEAD", "HEAD~699")
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {
|
||||
cfg.GetUserConfig().Git.Log.ShowGraph = "never"
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
/* EXPECTED:
|
||||
SelectedLine(Contains("<-- current"))
|
||||
ACTUAL: */
|
||||
SelectedLine(Contains("commit 700"))
|
||||
},
|
||||
})
|
||||
@@ -40,6 +40,7 @@ var tests = []*components.IntegrationTest{
|
||||
bisect.ChooseTerms,
|
||||
bisect.FromOtherBranch,
|
||||
bisect.SelectCurrentCommit,
|
||||
bisect.SelectCurrentCommitInLongRange,
|
||||
bisect.Skip,
|
||||
branch.CheckoutAutostash,
|
||||
branch.CheckoutByName,
|
||||
|
||||
Reference in New Issue
Block a user