Extend squash_fixups_in_current_branch test to check the selection

This shows a problem with the wrong commit being selected after squashing.
This commit is contained in:
Stefan Haller 2024-01-31 12:16:55 +01:00
parent 314efe2539
commit dfb45ba893

View file

@ -27,10 +27,12 @@ var SquashFixupsInCurrentBranch = NewIntegrationTest(NewIntegrationTestArgs{
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Commits().
Focus().
SelectNextItem().
SelectNextItem().
Lines(
Contains("fixup! commit 01"),
Contains("commit 02"),
Contains("commit 01"),
Contains("commit 01").IsSelected(),
Contains("fixup! master commit"),
Contains("master commit"),
).
@ -44,7 +46,7 @@ var SquashFixupsInCurrentBranch = NewIntegrationTest(NewIntegrationTestArgs{
Lines(
Contains("commit 02"),
Contains("commit 01"),
Contains("fixup! master commit"),
Contains("fixup! master commit").IsSelected(), // wrong, we want the previous line
Contains("master commit"),
).
NavigateToLine(Contains("commit 01"))