mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-05 00:59:19 +02:00
add helper functions for popups in tests
This commit is contained in:
@ -20,18 +20,13 @@ var Revert = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
input.SwitchToCommitsWindow()
|
||||
|
||||
input.PressKeys(keys.Commits.RevertCommit)
|
||||
assert.InConfirm()
|
||||
assert.CurrentViewTitle(Equals("Revert commit"))
|
||||
assert.CurrentViewContent(MatchesRegexp("Are you sure you want to revert \\w+?"))
|
||||
input.Confirm()
|
||||
input.Press(keys.Commits.RevertCommit)
|
||||
input.AcceptConfirmation(Equals("Revert commit"), MatchesRegexp(`Are you sure you want to revert \w+?`))
|
||||
|
||||
assert.CommitCount(2)
|
||||
assert.HeadCommitMessage(Contains("Revert \"first commit\""))
|
||||
input.PreviousItem()
|
||||
assert.MainViewContent(Contains("-myfile content"))
|
||||
assert.FileSystemPathNotPresent("myfile")
|
||||
|
||||
input.Wait(10)
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user