1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-28 04:14:56 +03:00

start refactoring gui

This commit is contained in:
Jesse Duffield
2022-01-28 20:44:36 +11:00
parent fa8571e1f4
commit a90b6efded
61 changed files with 1779 additions and 1522 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands/patch"
"github.com/jesseduffield/lazygit/pkg/gui/popup"
"github.com/stretchr/testify/assert"
)
@@ -144,8 +145,8 @@ func TestDoesntIncreaseContextInDiffViewInContextWhenInPatchBuildingMode(t *test
gui.Git.Patch.PatchManager.Start("from", "to", false, false)
errorCount := 0
gui.PopupHandler = &TestPopupHandler{
onError: func(message string) error {
gui.PopupHandler = &popup.TestPopupHandler{
OnErrorMsg: func(message string) error {
assert.Equal(t, gui.Tr.CantChangeContextSizeError, message)
errorCount += 1
return nil
@@ -166,8 +167,8 @@ func TestDoesntDecreaseContextInDiffViewInContextWhenInPatchBuildingMode(t *test
gui.Git.Patch.PatchManager.Start("from", "to", false, false)
errorCount := 0
gui.PopupHandler = &TestPopupHandler{
onError: func(message string) error {
gui.PopupHandler = &popup.TestPopupHandler{
OnErrorMsg: func(message string) error {
assert.Equal(t, gui.Tr.CantChangeContextSizeError, message)
errorCount += 1
return nil