MCPcopy
hub / github.com/jesseduffield/lazygit / GuiDriver

Interface GuiDriver

pkg/integration/types/types.go:24–50  ·  view source on GitHub ↗

this is the interface through which our integration tests interact with the lazygit gui

Source from the content-addressed store, hash-verified

22
23// this is the interface through which our integration tests interact with the lazygit gui
24type GuiDriver interface {
25 PressKey(string)
26 Click(int, int)
27 Keys() config.KeybindingConfig
28 CurrentContext() types.Context
29 ContextForView(viewName string) types.Context
30 Fail(message string)
31 // These two log methods are for the sake of debugging while testing. There's no need to actually
32 // commit any logging.
33 // logs to the normal place that you log to i.e. viewable with `lazygit --logs`
34 Log(message string)
35 // logs in the actual UI (in the commands panel)
36 LogUI(message string)
37 CheckedOutRef() *models.Branch
38 // the view that appears to the right of the side panel
39 MainView() *gocui.View
40 // the other view that sometimes appears to the right of the side panel
41 // e.g. when we're showing both staged and unstaged changes
42 SecondaryView() *gocui.View
43 View(viewName string) *gocui.View
44 SetCaption(caption string)
45 SetCaptionPrefix(prefix string)
46 // Pop the next toast that was displayed; returns nil if there was none
47 NextToast() *string
48 CheckAllToastsAcknowledged()
49 Headless() bool
50}

Callers 74

pressMethod · 0.65
pressFastMethod · 0.65
clickMethod · 0.65
range_select.goFile · 0.65
click_to_focus.goFile · 0.65
RunMethod · 0.65
renderEachFilePatchMethod · 0.65
AllFilesInPatchMethod · 0.65

Implementers 2

fakeGuiDriverpkg/integration/components/test_test.g
GuiDriverpkg/gui/gui_driver.go

Calls

no outgoing calls

Tested by

no test coverage detected