diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-02-24 21:42:27 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-02-25 11:35:41 +1100 |
commit | db011d8e34b9fef0bd01badc4b856ec401831a27 (patch) | |
tree | 77ca03c95c2cf08953fc77f50808d5e61e46d2ac /pkg/gui/gui_driver.go | |
parent | 752526c8807550173b1a2d994aa845e51315ee76 (diff) |
Improve staging panel integration tests
Diffstat (limited to 'pkg/gui/gui_driver.go')
-rw-r--r-- | pkg/gui/gui_driver.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/gui_driver.go b/pkg/gui/gui_driver.go index d9735c2fe..35b6a870d 100644 --- a/pkg/gui/gui_driver.go +++ b/pkg/gui/gui_driver.go @@ -49,6 +49,15 @@ func (self *GuiDriver) CurrentContext() types.Context { return self.gui.c.CurrentContext() } +func (self *GuiDriver) ContextForView(viewName string) types.Context { + context, ok := self.gui.contextForView(viewName) + if !ok { + return nil + } + + return context +} + func (self *GuiDriver) Fail(message string) { currentView := self.gui.g.CurrentView() fullMessage := fmt.Sprintf( |