summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/branch/reset.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-26 11:12:56 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-12-26 12:20:13 +1100
commit9a6f21ce429fedd949fdf9853c6ebf4892f858fd (patch)
treed8ee0c4ad1e993319caf53e0554186f6103fb1d7 /pkg/integration/tests/branch/reset.go
parentfa0414777fcf266a05b777e2e8b7d487fd56f376 (diff)
cleaner test assertions
Diffstat (limited to 'pkg/integration/tests/branch/reset.go')
-rw-r--r--pkg/integration/tests/branch/reset.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/integration/tests/branch/reset.go b/pkg/integration/tests/branch/reset.go
index 4895a2cd8..d7b2db5a3 100644
--- a/pkg/integration/tests/branch/reset.go
+++ b/pkg/integration/tests/branch/reset.go
@@ -21,15 +21,14 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
shell.EmptyCommit("current-branch commit")
},
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
- assert.ViewLines("commits",
+ assert.View("commits").Lines(
Contains("current-branch commit"),
Contains("root commit"),
)
input.SwitchToBranchesWindow()
- assert.CurrentViewName("localBranches")
- assert.CurrentViewLines(
+ assert.CurrentView().Name("localBranches").Lines(
Contains("current-branch"),
Contains("other-branch"),
)
@@ -40,12 +39,11 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
input.Menu(Contains("reset to other-branch"), Contains("hard reset"))
// ensure that we've returned from the menu before continuing
- assert.CurrentViewName("localBranches")
+ assert.CurrentView().Name("localBranches")
// assert that we now have the expected commits in the commit panel
input.SwitchToCommitsWindow()
- assert.CurrentViewName("commits")
- assert.CurrentViewLines(
+ assert.CurrentView().Name("commits").Lines(
Contains("other-branch commit"),
Contains("root commit"),
)