File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,7 @@ var tests = []*components.IntegrationTest{
211211 tag .Reset ,
212212 ui .Accordion ,
213213 ui .DoublePopup ,
214+ ui .EmptyMenu ,
214215 ui .SwitchTabFromMenu ,
215216 undo .UndoCheckoutAndDrop ,
216217 undo .UndoDrop ,
Original file line number Diff line number Diff line change 1+ package ui
2+
3+ import (
4+ "github.com/jesseduffield/lazygit/pkg/config"
5+ . "github.com/jesseduffield/lazygit/pkg/integration/components"
6+ )
7+
8+ var EmptyMenu = NewIntegrationTest (NewIntegrationTestArgs {
9+ Description : "Verify that we don't crash on an empty menu" ,
10+ ExtraCmdArgs : []string {},
11+ Skip : false ,
12+ SetupConfig : func (config * config.AppConfig ) {},
13+ SetupRepo : func (shell * Shell ) {
14+ },
15+ Run : func (t * TestDriver , keys config.KeybindingConfig ) {
16+ t .Views ().Files ().
17+ IsFocused ().
18+ Press (keys .Universal .OptionMenu )
19+
20+ t .Views ().Menu ().
21+ IsFocused ().
22+ // a string that filters everything out
23+ FilterOrSearch ("ljasldkjaslkdjalskdjalsdjaslkd" ).
24+ IsEmpty ().
25+ Press (keys .Universal .Select )
26+
27+ // back in the files view, selecting the non-existing menu item was a no-op
28+ t .Views ().Files ().
29+ IsFocused ()
30+ },
31+ })
You can’t perform that action at this time.
0 commit comments