|
7 | 7 | "github.com/gookit/color" |
8 | 8 | "github.com/jesseduffield/lazygit/pkg/commands/models" |
9 | 9 | "github.com/jesseduffield/lazygit/pkg/commands/patch" |
| 10 | + "github.com/jesseduffield/lazygit/pkg/common" |
10 | 11 | "github.com/jesseduffield/lazygit/pkg/config" |
11 | 12 | "github.com/jesseduffield/lazygit/pkg/gui/filetree" |
12 | 13 | "github.com/jesseduffield/lazygit/pkg/utils" |
@@ -87,7 +88,8 @@ func TestRenderFileTree(t *testing.T) { |
87 | 88 |
|
88 | 89 | for _, s := range scenarios { |
89 | 90 | t.Run(s.name, func(t *testing.T) { |
90 | | - viewModel := filetree.NewFileTree(func() []*models.File { return s.files }, utils.NewDummyLog(), true) |
| 91 | + common := common.NewDummyCommon() |
| 92 | + viewModel := filetree.NewFileTree(func() []*models.File { return s.files }, common, true) |
91 | 93 | viewModel.SetTree() |
92 | 94 | for _, path := range s.collapsedPaths { |
93 | 95 | viewModel.ToggleCollapsed(path) |
@@ -151,7 +153,8 @@ func TestRenderCommitFileTree(t *testing.T) { |
151 | 153 | t.Run(s.name, func(t *testing.T) { |
152 | 154 | hashPool := &utils.StringPool{} |
153 | 155 |
|
154 | | - viewModel := filetree.NewCommitFileTreeViewModel(func() []*models.CommitFile { return s.files }, utils.NewDummyLog(), true) |
| 156 | + common := common.NewDummyCommon() |
| 157 | + viewModel := filetree.NewCommitFileTreeViewModel(func() []*models.CommitFile { return s.files }, common, true) |
155 | 158 | viewModel.SetRef(models.NewCommit(hashPool, models.NewCommitOpts{Hash: "1234"})) |
156 | 159 | viewModel.SetTree() |
157 | 160 | for _, path := range s.collapsedPaths { |
|
0 commit comments