mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
add helper functions for popups in tests
This commit is contained in:
@ -61,23 +61,13 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
) {
|
||||
assert.WorkingTreeFileCount(0)
|
||||
|
||||
input.PressKeys("a")
|
||||
input.Press("a")
|
||||
|
||||
assert.InPrompt()
|
||||
assert.CurrentViewTitle(Equals("Enter a file name"))
|
||||
input.Type("myfile")
|
||||
input.Confirm()
|
||||
input.Prompt(Equals("Enter a file name"), "myfile")
|
||||
|
||||
assert.InMenu()
|
||||
assert.CurrentViewTitle(Equals("Choose file content"))
|
||||
assert.SelectedLine(Contains("foo"))
|
||||
input.NextItem()
|
||||
assert.SelectedLine(Contains("bar"))
|
||||
input.Confirm()
|
||||
input.Menu(Equals("Choose file content"), Contains("bar"))
|
||||
|
||||
assert.InConfirm()
|
||||
assert.CurrentViewTitle(Equals("Are you sure?"))
|
||||
input.Confirm()
|
||||
input.AcceptConfirmation(Equals("Are you sure?"), Equals("Are you REALLY sure you want to make this file? Up to you buddy."))
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.SelectedLine(Contains("myfile"))
|
||||
|
Reference in New Issue
Block a user