add helper functions for popups in tests

This commit is contained in:
Jesse Duffield 2022-12-24 17:48:57 +11:00
parent aedfce2845
commit b623ecf898
40 changed files with 380 additions and 402 deletions

View file

@ -64,8 +64,8 @@ func TestAssertionFailure(t *testing.T) {
test := NewIntegrationTest(NewIntegrationTestArgs{
Description: unitTestDescription,
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
input.PressKeys("a")
input.PressKeys("b")
input.Press("a")
input.Press("b")
assert.CommitCount(2)
},
})
@ -91,8 +91,8 @@ func TestSuccess(t *testing.T) {
test := NewIntegrationTest(NewIntegrationTestArgs{
Description: unitTestDescription,
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
input.PressKeys("a")
input.PressKeys("b")
input.Press("a")
input.Press("b")
assert.CommitCount(0)
},
})