mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
combine assert and input structs, clean up interface
This commit is contained in:
@ -56,24 +56,25 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Run: func(
|
||||
shell *Shell,
|
||||
input *Input,
|
||||
assert *Assert,
|
||||
keys config.KeybindingConfig,
|
||||
) {
|
||||
assert.Model().WorkingTreeFileCount(0)
|
||||
input.Model().WorkingTreeFileCount(0)
|
||||
|
||||
input.Press("a")
|
||||
input.Views().Files().
|
||||
IsFocused().
|
||||
Press("a")
|
||||
|
||||
input.Prompt().Title(Equals("Enter a file name")).Type("myfile").Confirm()
|
||||
input.ExpectPrompt().Title(Equals("Enter a file name")).Type("myfile").Confirm()
|
||||
|
||||
input.Menu().Title(Equals("Choose file content")).Select(Contains("bar")).Confirm()
|
||||
input.ExpectMenu().Title(Equals("Choose file content")).Select(Contains("bar")).Confirm()
|
||||
|
||||
input.Confirmation().
|
||||
input.ExpectConfirmation().
|
||||
Title(Equals("Are you sure?")).
|
||||
Content(Equals("Are you REALLY sure you want to make this file? Up to you buddy.")).
|
||||
Confirm()
|
||||
|
||||
assert.Model().WorkingTreeFileCount(1)
|
||||
assert.Views().Current().SelectedLine(Contains("myfile"))
|
||||
assert.Views().Main().Content(Contains("BAR"))
|
||||
input.Model().WorkingTreeFileCount(1)
|
||||
input.Views().Files().SelectedLine(Contains("myfile"))
|
||||
input.Views().Main().Content(Contains("BAR"))
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user