mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-29 00:51:35 +02:00
Use ErrorToast instead of error panel when invoking a disabled command
This commit is contained in:
@ -37,12 +37,11 @@ var Delete = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Tooltip(Contains("You cannot delete the checked out branch!")).
|
||||
Title(Equals("Delete branch 'branch-three'?")).
|
||||
Select(Contains("Delete local branch")).
|
||||
Confirm()
|
||||
t.ExpectPopup().
|
||||
Alert().
|
||||
Title(Equals("Error")).
|
||||
Content(Contains("You cannot delete the checked out branch!")).
|
||||
Confirm()
|
||||
Confirm().
|
||||
Tap(func() {
|
||||
t.ExpectToast(Contains("You cannot delete the checked out branch!"))
|
||||
}).
|
||||
Cancel()
|
||||
}).
|
||||
SelectNextItem().
|
||||
Press(keys.Universal.Remove).
|
||||
|
@ -48,11 +48,11 @@ var RebaseToUpstream = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Title(Equals("Upstream options")).
|
||||
Select(Contains("Rebase checked-out branch onto upstream of selected branch")).
|
||||
Tooltip(Contains("Disabled: The selected branch has no upstream (or the upstream is not stored locally)")).
|
||||
Confirm()
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
Content(Equals("The selected branch has no upstream (or the upstream is not stored locally)")).
|
||||
Confirm()
|
||||
Confirm().
|
||||
Tap(func() {
|
||||
t.ExpectToast(Equals("Disabled: The selected branch has no upstream (or the upstream is not stored locally)"))
|
||||
}).
|
||||
Cancel()
|
||||
}).
|
||||
SelectNextItem().
|
||||
Lines(
|
||||
|
@ -42,11 +42,11 @@ var ResetToUpstream = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Title(Equals("Upstream options")).
|
||||
Select(Contains("Reset checked-out branch onto upstream of selected branch")).
|
||||
Tooltip(Contains("Disabled: The selected branch has no upstream (or the upstream is not stored locally)")).
|
||||
Confirm()
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
Content(Equals("The selected branch has no upstream (or the upstream is not stored locally)")).
|
||||
Confirm()
|
||||
Confirm().
|
||||
Tap(func() {
|
||||
t.ExpectToast(Equals("Disabled: The selected branch has no upstream (or the upstream is not stored locally)"))
|
||||
}).
|
||||
Cancel()
|
||||
}).
|
||||
SelectNextItem().
|
||||
Lines(
|
||||
|
Reference in New Issue
Block a user