summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-03-23 15:40:07 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-03-26 22:23:50 +0100
commitba85f93fb343d86a00686911411b139fcc613497 (patch)
tree32d7c28e7e8299ef7fcd0d8769d8de08d30f9522 /pkg/integration/tests
parentcdbec3997dac0801483f19382a0f0382fcea48f5 (diff)
Extend delete_update_ref_todo test to actually test what it was supposed to
In the test we simply removed the update-ref todo but didn't make any other changes to the todos. This should really have kept everything the way it was, including the other branch head. The fact that the star was gone was really because of the bug that we are going to fix later in the branch. Change the test so that it also makes a change before the update-ref todo; this way we test that the star is gone because we deleted the update-ref, not because of the bug. To guard against the bug, we add another assertion for the branches view to test that both branches are still there. This currently fails.
Diffstat (limited to 'pkg/integration/tests')
-rw-r--r--pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go b/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go
index 51691fb99..1969be58e 100644
--- a/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go
+++ b/pkg/integration/tests/interactive_rebase/delete_update_ref_todo.go
@@ -50,6 +50,8 @@ var DeleteUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{
Contains("pick").Contains("CI commit 02"),
Contains("CI ◯ <-- YOU ARE HERE --- commit 01"),
).
+ NavigateToLine(Contains("commit 02")).
+ Press(keys.Universal.Remove).
Tap(func() {
t.Common().ContinueRebase()
}).
@@ -58,8 +60,15 @@ var DeleteUpdateRefTodo = NewIntegrationTest(NewIntegrationTestArgs{
Contains("CI ◯ commit 05"),
Contains("CI ◯ commit 04"),
Contains("CI ◯ commit 03"), // No star on this commit, so there's no branch head here
- Contains("CI ◯ commit 02"),
Contains("CI ◯ commit 01"),
)
+
+ t.Views().Branches().
+ Lines(
+ Contains("branch2"),
+ /* branch1 was deleted, which is wrong:
+ Contains("branch1"),
+ */
+ )
},
})