summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-01-31 12:16:55 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-03-09 07:55:22 +0100
commitdfb45ba893200f09cdeceef281de65169757059c (patch)
tree3c71a9b47698d47eb8058728b579a5c930830748
parent314efe25394349c3aeb602b826bcbe9560599660 (diff)
Extend squash_fixups_in_current_branch test to check the selection
This shows a problem with the wrong commit being selected after squashing.
-rw-r--r--pkg/integration/tests/interactive_rebase/squash_fixups_in_current_branch.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/integration/tests/interactive_rebase/squash_fixups_in_current_branch.go b/pkg/integration/tests/interactive_rebase/squash_fixups_in_current_branch.go
index 636810533..75bfbf159 100644
--- a/pkg/integration/tests/interactive_rebase/squash_fixups_in_current_branch.go
+++ b/pkg/integration/tests/interactive_rebase/squash_fixups_in_current_branch.go
@@ -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"))