mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-28 04:14:56 +03:00
add popup handler for easier testing
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCanDeactivatePopupContextsWithoutViews(t *testing.T) {
|
||||
contexts := []func(gui *Gui) Context {
|
||||
contexts := []func(gui *Gui) Context{
|
||||
func(gui *Gui) Context { return gui.State.Contexts.Credentials },
|
||||
func(gui *Gui) Context { return gui.State.Contexts.Confirmation },
|
||||
func(gui *Gui) Context { return gui.State.Contexts.CommitMessage },
|
||||
@@ -20,7 +20,7 @@ func TestCanDeactivatePopupContextsWithoutViews(t *testing.T) {
|
||||
context := c(gui)
|
||||
gui.g = &gocui.Gui{}
|
||||
|
||||
gui.deactivateContext(context)
|
||||
_ = gui.deactivateContext(context)
|
||||
|
||||
// This really only checks a prerequisit, not the effect of deactivateContext
|
||||
view, _ := gui.g.View(context.GetViewName())
|
||||
@@ -32,7 +32,7 @@ func TestCanDeactivateCommitFilesContextsWithoutViews(t *testing.T) {
|
||||
gui := NewDummyGui()
|
||||
gui.g = &gocui.Gui{}
|
||||
|
||||
gui.deactivateContext(gui.State.Contexts.CommitFiles)
|
||||
_ = gui.deactivateContext(gui.State.Contexts.CommitFiles)
|
||||
|
||||
// This really only checks a prerequisite, not the effect of deactivateContext
|
||||
view, _ := gui.g.View(gui.State.Contexts.CommitFiles.GetViewName())
|
||||
|
||||
Reference in New Issue
Block a user