1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

add tap function

This commit is contained in:
Jesse Duffield
2022-12-27 21:25:11 +11:00
parent b166b8f776
commit 53e06b71ae
19 changed files with 210 additions and 230 deletions

View File

@ -24,20 +24,18 @@ var Delete = NewIntegrationTest(NewIntegrationTestArgs{
MatchesRegexp(`branch-one`),
MatchesRegexp(`master`),
).
Press(keys.Universal.Remove)
input.ExpectAlert().Title(Equals("Error")).Content(Contains("You cannot delete the checked out branch!")).Confirm()
input.Views().Branches().
Press(keys.Universal.Remove).
Tap(func() {
input.ExpectAlert().Title(Equals("Error")).Content(Contains("You cannot delete the checked out branch!")).Confirm()
}).
SelectNextItem().
Press(keys.Universal.Remove)
input.ExpectConfirmation().
Title(Equals("Delete Branch")).
Content(Contains("Are you sure you want to delete the branch 'branch-one'?")).
Confirm()
input.Views().Branches().IsFocused().
Press(keys.Universal.Remove).
Tap(func() {
input.ExpectConfirmation().
Title(Equals("Delete Branch")).
Content(Contains("Are you sure you want to delete the branch 'branch-one'?")).
Confirm()
}).
Lines(
MatchesRegexp(`\*.*branch-two`),
MatchesRegexp(`master`).IsSelected(),