summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/branch
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-09-09 21:11:05 -0700
committerJesse Duffield <jessedduffield@gmail.com>2022-09-16 08:42:39 -0700
commit7af7af27c6252b862989d11f930787e5b370b119 (patch)
treea12b68c82de17aafb3b3479e81aae363a4cdec4e /pkg/integration/tests/branch
parent7b757d1cfe88363aa52a660d53838478243eca00 (diff)
various changes to improve integration tests
Diffstat (limited to 'pkg/integration/tests/branch')
-rw-r--r--pkg/integration/tests/branch/rebase.go2
-rw-r--r--pkg/integration/tests/branch/rebase_and_drop.go11
2 files changed, 10 insertions, 3 deletions
diff --git a/pkg/integration/tests/branch/rebase.go b/pkg/integration/tests/branch/rebase.go
index eda7567e7..8b414b794 100644
--- a/pkg/integration/tests/branch/rebase.go
+++ b/pkg/integration/tests/branch/rebase.go
@@ -84,9 +84,11 @@ var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
assert.CurrentViewName("mergeConflicts")
input.PrimaryAction()
+ assert.MatchViewContent("information", Contains("rebasing"))
assert.InConfirm()
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
input.Confirm()
+ assert.MatchViewContent("information", NotContains("rebasing"))
// this proves we actually have integrated the changes from second-change-branch
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
diff --git a/pkg/integration/tests/branch/rebase_and_drop.go b/pkg/integration/tests/branch/rebase_and_drop.go
index 18ffdd820..d87919a0a 100644
--- a/pkg/integration/tests/branch/rebase_and_drop.go
+++ b/pkg/integration/tests/branch/rebase_and_drop.go
@@ -13,7 +13,7 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
SetupRepo: func(shell *Shell) {
commonRebaseSetup(shell)
// addin a couple additional commits so that we can drop one
- shell.EmptyCommit("to drop")
+ shell.EmptyCommit("to remove")
shell.EmptyCommit("to keep")
},
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
@@ -29,6 +29,8 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
assert.MatchCurrentViewContent(Contains("Are you sure you want to rebase 'first-change-branch' onto 'second-change-branch'?"))
input.Confirm()
+ assert.MatchViewContent("information", Contains("rebasing"))
+
assert.InConfirm()
assert.MatchCurrentViewContent(Contains("Conflicts!"))
input.Confirm()
@@ -37,9 +39,10 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
assert.MatchSelectedLine(Contains("file"))
input.SwitchToCommitsWindow()
+ assert.MatchSelectedLine(Contains("pick")) // this means it's a rebasing commit
input.NextItem()
input.PressKeys(keys.Universal.Remove)
- assert.MatchSelectedLine(Contains("to drop"))
+ assert.MatchSelectedLine(Contains("to remove"))
assert.MatchSelectedLine(Contains("drop"))
input.SwitchToFilesWindow()
@@ -55,9 +58,11 @@ var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
input.Confirm()
+ assert.MatchViewContent("information", NotContains("rebasing"))
+
// this proves we actually have integrated the changes from second-change-branch
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
assert.MatchViewContent("commits", Contains("to keep"))
- assert.MatchViewContent("commits", NotContains("to drop"))
+ assert.MatchViewContent("commits", NotContains("to remove"))
},
})