summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/cherry_pick
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-24 17:01:26 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-12-24 19:14:52 +1100
commitaedfce28459bc59865b516dba2ee480a5d0972f1 (patch)
tree6bc47a03cce14f5daeeeb27534b326bce939b553 /pkg/integration/tests/cherry_pick
parentc19f52255c1d5496713e4f4caba47382fd10c9fc (diff)
refactor to not have Match at the start of assert method names, because it reads better that way
Diffstat (limited to 'pkg/integration/tests/cherry_pick')
-rw-r--r--pkg/integration/tests/cherry_pick/cherry_pick.go26
-rw-r--r--pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go36
2 files changed, 31 insertions, 31 deletions
diff --git a/pkg/integration/tests/cherry_pick/cherry_pick.go b/pkg/integration/tests/cherry_pick/cherry_pick.go
index 0f5715434..7cbf6a70a 100644
--- a/pkg/integration/tests/cherry_pick/cherry_pick.go
+++ b/pkg/integration/tests/cherry_pick/cherry_pick.go
@@ -27,40 +27,40 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
input.SwitchToBranchesWindow()
assert.CurrentViewName("localBranches")
- assert.MatchSelectedLine(Contains("first-branch"))
+ assert.SelectedLine(Contains("first-branch"))
input.NextItem()
- assert.MatchSelectedLine(Contains("second-branch"))
+ assert.SelectedLine(Contains("second-branch"))
input.Enter()
assert.CurrentViewName("subCommits")
- assert.MatchSelectedLine(Contains("four"))
+ assert.SelectedLine(Contains("four"))
input.PressKeys(keys.Commits.CherryPickCopy)
- assert.MatchViewContent("information", Contains("1 commit copied"))
+ assert.ViewContent("information", Contains("1 commit copied"))
input.NextItem()
- assert.MatchSelectedLine(Contains("three"))
+ assert.SelectedLine(Contains("three"))
input.PressKeys(keys.Commits.CherryPickCopy)
- assert.MatchViewContent("information", Contains("2 commits copied"))
+ assert.ViewContent("information", Contains("2 commits copied"))
input.SwitchToCommitsWindow()
assert.CurrentViewName("commits")
- assert.MatchSelectedLine(Contains("two"))
+ assert.SelectedLine(Contains("two"))
input.PressKeys(keys.Commits.PasteCommits)
assert.InAlert()
- assert.MatchCurrentViewContent(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?"))
+ assert.CurrentViewContent(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?"))
input.Confirm()
assert.CurrentViewName("commits")
- assert.MatchSelectedLine(Contains("four"))
+ assert.SelectedLine(Contains("four"))
input.NextItem()
- assert.MatchSelectedLine(Contains("three"))
+ assert.SelectedLine(Contains("three"))
input.NextItem()
- assert.MatchSelectedLine(Contains("two"))
+ assert.SelectedLine(Contains("two"))
- assert.MatchViewContent("information", Contains("2 commits copied"))
+ assert.ViewContent("information", Contains("2 commits copied"))
input.PressKeys(keys.Universal.Return)
- assert.MatchViewContent("information", NotContains("commits copied"))
+ assert.ViewContent("information", NotContains("commits copied"))
},
})
diff --git a/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go b/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go
index e747d8e4d..99005ad8e 100644
--- a/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go
+++ b/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go
@@ -18,37 +18,37 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
input.SwitchToBranchesWindow()
assert.CurrentViewName("localBranches")
- assert.MatchSelectedLine(Contains("first-change-branch"))
+ assert.SelectedLine(Contains("first-change-branch"))
input.NextItem()
- assert.MatchSelectedLine(Contains("second-change-branch"))
+ assert.SelectedLine(Contains("second-change-branch"))
input.Enter()
assert.CurrentViewName("subCommits")
- assert.MatchSelectedLine(Contains("second-change-branch unrelated change"))
+ assert.SelectedLine(Contains("second-change-branch unrelated change"))
input.PressKeys(keys.Commits.CherryPickCopy)
- assert.MatchViewContent("information", Contains("1 commit copied"))
+ assert.ViewContent("information", Contains("1 commit copied"))
input.NextItem()
- assert.MatchSelectedLine(Contains("second change"))
+ assert.SelectedLine(Contains("second change"))
input.PressKeys(keys.Commits.CherryPickCopy)
- assert.MatchViewContent("information", Contains("2 commits copied"))
+ assert.ViewContent("information", Contains("2 commits copied"))
input.SwitchToCommitsWindow()
assert.CurrentViewName("commits")
- assert.MatchSelectedLine(Contains("first change"))
+ assert.SelectedLine(Contains("first change"))
input.PressKeys(keys.Commits.PasteCommits)
assert.InAlert()
- assert.MatchCurrentViewContent(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?"))
+ assert.CurrentViewContent(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?"))
input.Confirm()
- assert.MatchCurrentViewContent(Contains("Conflicts!"))
+ assert.CurrentViewContent(Contains("Conflicts!"))
input.Confirm()
assert.CurrentViewName("files")
- assert.MatchSelectedLine(Contains("file"))
+ assert.SelectedLine(Contains("file"))
// not using Confirm() convenience method because I suspect we might change this
// keybinding to something more bespoke
@@ -60,7 +60,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
input.PrimaryAction()
assert.InConfirm()
- assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
+ assert.CurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
input.Confirm()
assert.CurrentViewName("files")
@@ -69,19 +69,19 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
input.SwitchToCommitsWindow()
assert.CurrentViewName("commits")
- assert.MatchSelectedLine(Contains("second-change-branch unrelated change"))
+ assert.SelectedLine(Contains("second-change-branch unrelated change"))
input.NextItem()
- assert.MatchSelectedLine(Contains("second change"))
+ assert.SelectedLine(Contains("second change"))
// because we picked 'Second change' when resolving the conflict,
// we now see this commit as having replaced First Change with Second Change,
// as opposed to replacing 'Original' with 'Second change'
- assert.MatchMainViewContent(Contains("-First Change"))
- assert.MatchMainViewContent(Contains("+Second Change"))
+ assert.MainViewContent(Contains("-First Change"))
+ assert.MainViewContent(Contains("+Second Change"))
input.NextItem()
- assert.MatchSelectedLine(Contains("first change"))
+ assert.SelectedLine(Contains("first change"))
- assert.MatchViewContent("information", Contains("2 commits copied"))
+ assert.ViewContent("information", Contains("2 commits copied"))
input.PressKeys(keys.Universal.Return)
- assert.MatchViewContent("information", NotContains("commits copied"))
+ assert.ViewContent("information", NotContains("commits copied"))
},
})