better namespacing for assertions

This commit is contained in:
Jesse Duffield 2022-12-27 15:22:31 +11:00
parent be30cbb375
commit 09e80e5f2a
36 changed files with 328 additions and 294 deletions

View file

@ -17,7 +17,7 @@ var NewBranch = NewIntegrationTest(NewIntegrationTestArgs{
EmptyCommit("commit 3")
},
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
assert.CommitCount(3)
assert.Model().CommitCount(3)
input.SwitchToCommitsView()
assert.Views().Current().Lines(
@ -32,7 +32,7 @@ var NewBranch = NewIntegrationTest(NewIntegrationTestArgs{
branchName := "my-branch-name"
input.Prompt().Title(Equals("New Branch Name")).Type(branchName).Confirm()
assert.CurrentBranchName(branchName)
assert.Model().CurrentBranchName(branchName)
assert.Views().ByName("commits").Lines(
Contains("commit 2"),