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 <noreply@anthropic.com>
This commit is contained in:
Stefan Haller
2026-10-31 11:27:58 +01:00
co-authored by Claude Opus 5.5
parent 08065f0294
commit 027a5babeb
+20 -1
View File
@@ -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(