mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
Use ErrorToast instead of error panel when invoking a disabled command
This commit is contained in:
@ -30,12 +30,11 @@ var CopyMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Title(Equals("Copy to clipboard")).
|
||||
Select(Contains("File name")).
|
||||
Tooltip(Equals("Disabled: Nothing to copy")).
|
||||
Confirm()
|
||||
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
Content(Equals("Nothing to copy")).
|
||||
Confirm()
|
||||
Confirm().
|
||||
Tap(func() {
|
||||
t.ExpectToast(Equals("Disabled: Nothing to copy"))
|
||||
}).
|
||||
Cancel()
|
||||
})
|
||||
|
||||
t.Shell().
|
||||
@ -56,12 +55,11 @@ var CopyMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Title(Equals("Copy to clipboard")).
|
||||
Select(Contains("Diff of selected file")).
|
||||
Tooltip(Contains("Disabled: Nothing to copy")).
|
||||
Confirm()
|
||||
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
Content(Equals("Nothing to copy")).
|
||||
Confirm()
|
||||
Confirm().
|
||||
Tap(func() {
|
||||
t.ExpectToast(Equals("Disabled: Nothing to copy"))
|
||||
}).
|
||||
Cancel()
|
||||
}).
|
||||
Press(keys.Files.CopyFileInfoToClipboard).
|
||||
Tap(func() {
|
||||
@ -69,12 +67,11 @@ var CopyMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Title(Equals("Copy to clipboard")).
|
||||
Select(Contains("Diff of all files")).
|
||||
Tooltip(Contains("Disabled: Nothing to copy")).
|
||||
Confirm()
|
||||
|
||||
t.ExpectPopup().Alert().
|
||||
Title(Equals("Error")).
|
||||
Content(Equals("Nothing to copy")).
|
||||
Confirm()
|
||||
Confirm().
|
||||
Tap(func() {
|
||||
t.ExpectToast(Equals("Disabled: Nothing to copy"))
|
||||
}).
|
||||
Cancel()
|
||||
})
|
||||
|
||||
t.Shell().
|
||||
|
Reference in New Issue
Block a user