mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 05:15:53 +02:00
show namesake for child views
This commit is contained in:
parent
13b90ac37f
commit
ad7703df65
32 changed files with 766 additions and 649 deletions
|
@ -26,43 +26,23 @@ func TestGetBindingSections(t *testing.T) {
|
|||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "stage file",
|
||||
},
|
||||
},
|
||||
expected: []*bindingSection{
|
||||
{
|
||||
title: "Files Panel",
|
||||
title: "Files",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "stage file",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "one binding with context",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Description: "stage file",
|
||||
Contexts: []string{"submodules"},
|
||||
},
|
||||
},
|
||||
expected: []*bindingSection{
|
||||
{
|
||||
title: "Files Panel (Submodules)",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Description: "stage file",
|
||||
Contexts: []string{"submodules"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "global binding",
|
||||
bindings: []*types.Binding{
|
||||
|
@ -101,23 +81,10 @@ func TestGetBindingSections(t *testing.T) {
|
|||
Description: "drop submodule",
|
||||
Contexts: []string{"submodules"},
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Description: "revert commit",
|
||||
},
|
||||
},
|
||||
expected: []*bindingSection{
|
||||
{
|
||||
title: "Commits Panel",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "commits",
|
||||
Description: "revert commit",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Files Panel (Files)",
|
||||
title: "Files",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
|
@ -132,7 +99,7 @@ func TestGetBindingSections(t *testing.T) {
|
|||
},
|
||||
},
|
||||
{
|
||||
title: "Files Panel (Submodules)",
|
||||
title: "Submodules",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
|
@ -148,19 +115,23 @@ func TestGetBindingSections(t *testing.T) {
|
|||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "stage file",
|
||||
},
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "unstage file",
|
||||
},
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "scroll",
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "revert commit",
|
||||
},
|
||||
},
|
||||
|
@ -170,29 +141,33 @@ func TestGetBindingSections(t *testing.T) {
|
|||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "scroll",
|
||||
Tag: "navigation",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Commits Panel",
|
||||
title: "Commits",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "revert commit",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Files Panel",
|
||||
title: "Files",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "stage file",
|
||||
},
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "unstage file",
|
||||
},
|
||||
},
|
||||
|
@ -204,28 +179,34 @@ func TestGetBindingSections(t *testing.T) {
|
|||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "stage file",
|
||||
},
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "unstage file",
|
||||
},
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "scroll",
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "revert commit",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "scroll",
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "page up",
|
||||
Tag: "navigation",
|
||||
},
|
||||
|
@ -236,34 +217,39 @@ func TestGetBindingSections(t *testing.T) {
|
|||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "scroll",
|
||||
Tag: "navigation",
|
||||
},
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "page up",
|
||||
Tag: "navigation",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Commits Panel",
|
||||
title: "Commits",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "commits",
|
||||
Contexts: []string{"commits"},
|
||||
Description: "revert commit",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Files Panel",
|
||||
title: "Files",
|
||||
bindings: []*types.Binding{
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "stage file",
|
||||
},
|
||||
{
|
||||
ViewName: "files",
|
||||
Contexts: []string{"files"},
|
||||
Description: "unstage file",
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue