From 027a5babebc0435f04888d2d8bc8278abf56393a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 30 Oct 2026 21:12:07 +0100 Subject: [PATCH] Add a test showing that the bisect menu mislabels the selected commit After marking the first commit as good or bad, the bisect menu acts on the selected commit until git knows both a good and a bad commit. Its entries call that commit the "current commit" though, as if it was the commit that git wants the user to test. Co-Authored-By: Claude Opus 5.5 --- pkg/integration/tests/bisect/skip.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pkg/integration/tests/bisect/skip.go b/pkg/integration/tests/bisect/skip.go index 7c9ef4aea..d3f92f744 100644 --- a/pkg/integration/tests/bisect/skip.go +++ b/pkg/integration/tests/bisect/skip.go @@ -27,7 +27,26 @@ var Skip = NewIntegrationTest(NewIntegrationTestArgs{ NavigateToLine(Contains("commit-01")). Press(keys.Commits.ViewBisectOptions). Tap(func() { - t.ExpectPopup().Menu().Title(Equals("Bisect")).Select(MatchesRegexp(`Mark .* as good`)).Confirm() + t.ExpectPopup().Menu().Title(Equals("Bisect")). + // There's no current commit yet, so the entries act on the + // selected commit: + /* EXPECTED: + Lines( + Contains("b Mark commit").Contains("as bad"), + Contains("g Mark commit").Contains("as good"), + Contains("s Skip commit"), + Contains("r Reset bisect"), + Contains("Cancel"), + ). + ACTUAL: */ + Lines( + Contains("b Mark current commit").Contains("as bad"), + Contains("g Mark current commit").Contains("as good"), + Contains("s Skip current commit"), + Contains("r Reset bisect"), + Contains("Cancel"), + ). + Select(MatchesRegexp(`Mark .* as good`)).Confirm() t.Views().Information().Content(Contains("Bisecting")) }). Lines(